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
@@ -45,9 +45,6 @@ extern struct page *alloc_migration_target(struct page *page, unsigned long priv
|
||||
extern int isolate_movable_page(struct page *page, isolate_mode_t mode);
|
||||
extern void putback_movable_page(struct page *page);
|
||||
|
||||
extern void migrate_prep(void);
|
||||
extern void migrate_finish(void);
|
||||
extern void migrate_prep_local(void);
|
||||
extern void migrate_page_states(struct page *newpage, struct page *page);
|
||||
extern void migrate_page_copy(struct page *newpage, struct page *page);
|
||||
extern int migrate_huge_page_move_mapping(struct address_space *mapping,
|
||||
@@ -67,10 +64,6 @@ static inline struct page *alloc_migration_target(struct page *page,
|
||||
static inline int isolate_movable_page(struct page *page, isolate_mode_t mode)
|
||||
{ return -EBUSY; }
|
||||
|
||||
static inline int migrate_prep(void) { return -ENOSYS; }
|
||||
static inline int migrate_finish(void) { return -ENOSYS; }
|
||||
static inline int migrate_prep_local(void) { return -ENOSYS; }
|
||||
|
||||
static inline void migrate_page_states(struct page *newpage, struct page *page)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user