mm-migrate-make-demotion-knob-depend-on-migration.patch removed from -mm tree
The patch titled
Subject: mm: migrate: make demotion knob depend on migration
has been removed from the -mm tree. Its filename was
mm-migrate-make-demotion-knob-depend-on-migration.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Yang Shi <[email protected]>
Subject: mm: migrate: make demotion knob depend on migration
The memory demotion needs to call migrate_pages() to do the jobs. And it is controlled by a knob, however, the knob doesn't depend on CONFIG_MIGRATION. The knob could be truned on even though MIGRATION is disabled, this will not cause any crash since migrate_pages() would just return -ENOSYS. But it is definitely not optimal to go through demotion path then retry regular swap every time.
And it doesn't make too much sense to have the knob visible to the users when !MIGRATION. Move the related code from mempolicy.[h|c] to migrate.[h|c].
---
include/linux/mempolicy.h | 4 -- include/linux/migrate.h | 4 ++ mm/mempolicy.c | 61 ------------------------------------ mm/migrate.c | 61 ++++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 65 deletions(-)
include/linux/mempolicy.h renamed from include/linux/mempolicy.h~mm-migrate-make-demotion-knob-depend-on-migration +0 -4
@@ -183,8 +183,6 @@ extern bool vma_migratable(struct vm_areextern int mpol_misplaced (struct page *,struct vm_area_struct *,unsigned long );extern void mpol_put_task_policy (struct task_struct *); -extern bool numa_demotion_enabled; -static inline bool mpol_is_preferred_many (struct mempolicy *pol) {return (pol->mode ==MPOL_PREFERRED_MANY );
@@ -300,8 +298,6 @@ static inline nodemask_t *policy_nodemasreturn NULL ; } -#define numa_demotion_enabled false -static inline bool mpol_is_preferred_many (struct mempolicy *pol) {return false;
include/linux/migrate.h renamed from include/linux/migrate.h~mm-migrate-make-demotion-knob-depend-on-migration +4 -0
@@ -40,6 +40,8 @@ extern int migrate_huge_page_move_mappin struct page *newpage, struct page *page);extern int migrate_page_move_mapping (struct address_space *mapping,struct page *newpage,struct page *page,int extra_count); + +extern bool numa_demotion_enabled;#else static inline void putback_movable_pages (struct list_head *l) {}
@@ -65,6 +67,8 @@ static inline int migrate_huge_page_move {return -ENOSYS ; } + +#define numa_demotion_enabled false#endif /* CONFIG_MIGRATION */ #ifdef CONFIG_COMPACTION
mm/mempolicy.c renamed from mm/mempolicy.c~mm-migrate-make-demotion-knob-depend-on-migration +0 -61
64 lines not on this page · raw message
mm/migrate.c renamed from mm/migrate.c~mm-migrate-make-demotion-knob-depend-on-migration +61 -0
64 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are