Make CONFIG_MIGRATION available for s390
Subsystems (3)
PATCH 1/1 Make CONFIG_MIGRATION available for s390
From: Gerald Schaefer <[email protected]>
We'd like to support CONFIG_MEMORY_HOTREMOVE on s390, which depends on CONFIG_MIGRATION. So far, CONFIG_MIGRATION is only available with NUMA support.
This patch makes CONFIG_MIGRATION selectable for s390. When MIGRATION is enabled w/o NUMA, the kernel won't compile because of a missing "migrate" member in vm_operations_struct and a missing "policy_zone" definition. To avoid this, those are moved from an "#ifdef CONFIG_NUMA" section to "#ifdef CONFIG_MIGRATION".
---
include/linux/mempolicy.h | 6 ++++-- include/linux/mm.h | 2 ++ mm/Kconfig | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-)
include/linux/mempolicy.h +4 -2
@@ -62,6 +62,10 @@ enum {struct mm_struct ; +#ifdef CONFIG_MIGRATION +extern enum zone_type policy_zone; +#endif +#ifdef CONFIG_NUMA /*
@@ -202,8 +206,6 @@ extern struct zonelist *huge_zonelist(st struct mempolicy **mpol, nodemask_t **nodemask);extern unsigned slab_node (struct mempolicy *policy); -extern enum zone_type policy_zone; -static inline void check_highest_zone (enum zone_type k) {if (k > policy_zone && k !=ZONE_MOVABLE )
include/linux/mm.h +2 -0
@@ -193,6 +193,8 @@ struct vm_operations_struct {*/ struct mempolicy *(*get_policy)(struct vm_area_struct *vma,unsigned long addr); +#endif +#ifdef CONFIG_MIGRATION int (*migrate)(struct vm_area_struct *vma,const nodemask_t *from,const nodemask_t *to,unsigned long flags);#endif
mm/Kconfig +1 -1
@@ -174,7 +174,7 @@ config SPLIT_PTLOCK_CPUS config MIGRATION bool "Page migration" def_bool y - depends on NUMA + depends on NUMA || S390 help Allows the migration of the physical location of pages of processes while the virtual addresses are not changed. This is useful for
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · On Fri, 04 Jul 2008 16:58:59 +0200 Gerald Schaefer…
Subject: [PATCH] Make
CONFIG_MIGRATIONavailable for s390From: Gerald Schaefer <[email protected]>
We'd like to support
CONFIG_MEMORY_HOTREMOVEon s390, which depends onCONFIG_MIGRATION. So far,CONFIG_MIGRATIONis only available with NUMA support.
Quoted 8 lines
This patch makes
CONFIG_MIGRATIONselectable for s390. When MIGRATION is enabled w/o NUMA, the kernel won't compile because of a missing "migrate" member invm_operations_structand a missing "policy_zone" definition. To avoid this, those are moved from an "#ifdefCONFIG_NUMA" section to "#ifdefCONFIG_MIGRATION".Signed-off-by Gerald Schaefer <[email protected]>---
Maybe make sense
Quoted 59 lines
include/linux/mempolicy.h | 6 ++++-- include/linux/mm.h | 2 ++ mm/Kconfig | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-)Index:
mylinux-git/include/linux/mempolicy.h
===================================================================include/linux/mempolicy.h +4
-2@@ -62,6 +62,10 @@ enum {struct mm_struct ; +#ifdef CONFIG_MIGRATION +extern enum zone_type policy_zone; +#endif +#ifdef CONFIG_NUMA /* @@ -202,8 +206,6 @@ extern struct zonelist *huge_zonelist(st struct mempolicy **mpol, nodemask_t **nodemask);extern unsigned slab_node (struct mempolicy *policy); -extern enum zone_type policy_zone; -static inline void check_highest_zone (enum zone_type k) {if (k > policy_zone && k !=ZONE_MOVABLE )Index:
mylinux-git/include/linux/mm.h
===================================================================include/linux/mm.h +2
-0@@ -193,6 +193,8 @@ struct vm_operations_struct {*/ struct mempolicy *(*get_policy)(struct vm_area_struct *vma,unsigned long addr); +#endif +#ifdef CONFIG_MIGRATION int (*migrate)(struct vm_area_struct *vma,const nodemask_t *from,const nodemask_t *to,unsigned long flags);#endif Index: mylinux-git/mm/Kconfig
===================================================================mm/Kconfig +1
-2@@ -174,7 +174,7 @@ config SPLIT_PTLOCK_CPUS config MIGRATION bool "Page migration" def_bool y - depends on NUMA + depends on NUMA || S390 help Allows the migration of the physical location of pages of processes while the virtual addresses are not changed. This is useful for --
Quoted 5 lines
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines
mm/Kconfig config SPLIT_PTLOCK_CPUS · line 177
Quoted 5 lines
config MIGRATION
mm/Kconfig +1
-1bool "Page migration" def_bool y - depends on NUMA + depends on NUMA || S390
Hmm. I think ARCH_ENABLE_MEMORY_HOTREMOVE is better than S390.
Bye.
Signature · 8 lines
Yasunori Goto -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Yasunori Goto
Quoted 5 lines
mm/Kconfig config SPLIT_PTLOCK_CPUS · line 177
Quoted 5 lines
config MIGRATION
mm/Kconfig +1
-1bool "Page migration" def_bool y - depends on NUMA + depends on NUMA || S390Hmm. I think
ARCH_ENABLE_MEMORY_HOTREMOVEis better than S390.
Right, that makes more sense. I also noticed that my patch will produce a compile error when CONFIG_NUMA is set but CONFIG_MIGRATION is not, because policy_zone is missing in that case. Since policy_zone is only used for NUMA, a better solution would be to use an "#ifdef CONFIG_NUMA" within vma_migratable(). I will send a new version of the patch.
Thanks,
Gerald
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>