FROMLIST: mm: replace migrate_[prep|finish] with lru_cache_[disable|enable]
Currently, migrate_[prep|finish] is merely a wrapper of lru_cache_[disable|enable]. There is not much to gain from having additional abstraction. Use lru_cache_[disable|enable] instead of migrate_[prep|finish], which would be more descriptive. note: migrate_prep_local in compaction.c changed into lru_add_drain to avoid CPU schedule cost with involving many other CPUs to keep keep old behavior. Bug: 180018981 Link: https://lore.kernel.org/linux-mm/20210319175127.886124-2-minchan@kernel.org/ Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Minchan Kim <minchan@google.com> Change-Id: I2f298c9ff53c8693527f1207ff25ab76a4ac3ada
This commit is contained in:

committed by
Suren Baghdasaryan

parent
68a4731181
commit
c6bc1396ce
@@ -2275,7 +2275,8 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
|
||||
trace_mm_compaction_begin(start_pfn, cc->migrate_pfn,
|
||||
cc->free_pfn, end_pfn, sync);
|
||||
|
||||
migrate_prep_local();
|
||||
/* lru_add_drain_all could be expensive with involving other CPUs */
|
||||
lru_add_drain();
|
||||
|
||||
while ((ret = compact_finished(cc)) == COMPACT_CONTINUE) {
|
||||
int err;
|
||||
|
Reference in New Issue
Block a user