diff for duplicates of <50CE823F.7020700@cn.fujitsu.com> diff --git a/a/2.txt b/N1/2.txt index 8b13789..9cc2fbb 100644 --- a/a/2.txt +++ b/N1/2.txt @@ -1 +1,85 @@ +>From f03a9e6ce870b381482bcb1901361d784a9aee4a Mon Sep 17 00:00:00 2001 +From: Lai Jiangshan <laijs@cn.fujitsu.com> +Date: Wed, 12 Dec 2012 22:49:15 +0900 +Subject: [PART4 Patch v2 2/2] memory_hotplug: allow online/offline memory to result movable node +Now, memory management can handle movable node or nodes which don't have +any normal memory, so we can dynamic configure and add movable node by: + + online a ZONE_MOVABLE memory from a previous offline node + offline the last normal memory which result a non-normal-memory-node + +movable-node is very important for power-saving, hardware partitioning and +high-available-system(hardware fault management). + +Cc: Jiang Liu <jiang.liu@huawei.com> +Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> +Cc: Minchan Kim <minchan.kim@gmail.com> +Cc: Mel Gorman <mgorman@suse.de> +Cc: David Rientjes <rientjes@google.com> +Cc: Yinghai Lu <yinghai@kernel.org> +Cc: Rusty Russell <rusty@rustcorp.com.au> +Cc: Greg KH <greg@kroah.com> +Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> +Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> +Tested-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> +--- + mm/memory_hotplug.c | 22 ++++++++++++++++++++++ + 1 files changed, 22 insertions(+), 0 deletions(-) + +diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c +index 5c19c83..db0e6fb 100644 +--- a/mm/memory_hotplug.c ++++ b/mm/memory_hotplug.c +@@ -581,11 +581,22 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, + return 0; + } + ++#ifdef CONFIG_MOVABLE_NODE ++/* ++ * When CONFIG_MOVABLE_NODE, we permit onlining of a node which doesn't have ++ * normal memory. ++ */ ++static bool can_online_high_movable(struct zone *zone) ++{ ++ return true; ++} ++#else /* #ifdef CONFIG_MOVABLE_NODE */ + /* ensure every online node has NORMAL memory */ + static bool can_online_high_movable(struct zone *zone) + { + return node_state(zone_to_nid(zone), N_NORMAL_MEMORY); + } ++#endif /* #ifdef CONFIG_MOVABLE_NODE */ + + /* check which state of node_states will be changed when online memory */ + static void node_states_check_changes_online(unsigned long nr_pages, +@@ -1089,6 +1100,16 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn) + return offlined; + } + ++#ifdef CONFIG_MOVABLE_NODE ++/* ++ * When CONFIG_MOVABLE_NODE, we permit offlining of a node which doesn't have ++ * normal memory. ++ */ ++static bool can_offline_normal(struct zone *zone, unsigned long nr_pages) ++{ ++ return true; ++} ++#else /* #ifdef CONFIG_MOVABLE_NODE */ + /* ensure the node has NORMAL memory if it is still online */ + static bool can_offline_normal(struct zone *zone, unsigned long nr_pages) + { +@@ -1112,6 +1133,7 @@ static bool can_offline_normal(struct zone *zone, unsigned long nr_pages) + */ + return present_pages == 0; + } ++#endif /* #ifdef CONFIG_MOVABLE_NODE */ + + /* check which state of node_states will be changed when offline memory */ + static void node_states_check_changes_offline(unsigned long nr_pages, +-- +1.7.1 diff --git a/a/content_digest b/N1/content_digest index d48721b..7636cc6 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -109,5 +109,90 @@ "\01:2\0" "fn\00002-memory_hotplug-allow-online-offline-memory-to-result.patch\0" "b\0" + ">From f03a9e6ce870b381482bcb1901361d784a9aee4a Mon Sep 17 00:00:00 2001\n" + "From: Lai Jiangshan <laijs@cn.fujitsu.com>\n" + "Date: Wed, 12 Dec 2012 22:49:15 +0900\n" + "Subject: [PART4 Patch v2 2/2] memory_hotplug: allow online/offline memory to result movable node\n" + "\n" + "Now, memory management can handle movable node or nodes which don't have\n" + "any normal memory, so we can dynamic configure and add movable node by:\n" + "\n" + "\tonline a ZONE_MOVABLE memory from a previous offline node\n" + "\toffline the last normal memory which result a non-normal-memory-node\n" + "\n" + "movable-node is very important for power-saving, hardware partitioning and\n" + "high-available-system(hardware fault management).\n" + "\n" + "Cc: Jiang Liu <jiang.liu@huawei.com>\n" + "Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\n" + "Cc: Minchan Kim <minchan.kim@gmail.com>\n" + "Cc: Mel Gorman <mgorman@suse.de>\n" + "Cc: David Rientjes <rientjes@google.com>\n" + "Cc: Yinghai Lu <yinghai@kernel.org>\n" + "Cc: Rusty Russell <rusty@rustcorp.com.au>\n" + "Cc: Greg KH <greg@kroah.com>\n" + "Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>\n" + "Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>\n" + "Signed-off-by: Andrew Morton <akpm@linux-foundation.org>\n" + "Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>\n" + "Tested-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>\n" + "---\n" + " mm/memory_hotplug.c | 22 ++++++++++++++++++++++\n" + " 1 files changed, 22 insertions(+), 0 deletions(-)\n" + "\n" + "diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c\n" + "index 5c19c83..db0e6fb 100644\n" + "--- a/mm/memory_hotplug.c\n" + "+++ b/mm/memory_hotplug.c\n" + "@@ -581,11 +581,22 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,\n" + " \treturn 0;\n" + " }\n" + " \n" + "+#ifdef CONFIG_MOVABLE_NODE\n" + "+/*\n" + "+ * When CONFIG_MOVABLE_NODE, we permit onlining of a node which doesn't have\n" + "+ * normal memory.\n" + "+ */\n" + "+static bool can_online_high_movable(struct zone *zone)\n" + "+{\n" + "+\treturn true;\n" + "+}\n" + "+#else /* #ifdef CONFIG_MOVABLE_NODE */\n" + " /* ensure every online node has NORMAL memory */\n" + " static bool can_online_high_movable(struct zone *zone)\n" + " {\n" + " \treturn node_state(zone_to_nid(zone), N_NORMAL_MEMORY);\n" + " }\n" + "+#endif /* #ifdef CONFIG_MOVABLE_NODE */\n" + " \n" + " /* check which state of node_states will be changed when online memory */\n" + " static void node_states_check_changes_online(unsigned long nr_pages,\n" + "@@ -1089,6 +1100,16 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)\n" + " \treturn offlined;\n" + " }\n" + " \n" + "+#ifdef CONFIG_MOVABLE_NODE\n" + "+/*\n" + "+ * When CONFIG_MOVABLE_NODE, we permit offlining of a node which doesn't have\n" + "+ * normal memory.\n" + "+ */\n" + "+static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)\n" + "+{\n" + "+\treturn true;\n" + "+}\n" + "+#else /* #ifdef CONFIG_MOVABLE_NODE */\n" + " /* ensure the node has NORMAL memory if it is still online */\n" + " static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)\n" + " {\n" + "@@ -1112,6 +1133,7 @@ static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)\n" + " \t */\n" + " \treturn present_pages == 0;\n" + " }\n" + "+#endif /* #ifdef CONFIG_MOVABLE_NODE */\n" + " \n" + " /* check which state of node_states will be changed when offline memory */\n" + " static void node_states_check_changes_offline(unsigned long nr_pages,\n" + "-- \n" + 1.7.1 -b4c6200ff49a62d3a06a941784cdf8e4089ff4bec74588d24cf1ff02185f9471 +1816de253bae0ff90fe2664fe8c962a7825d8b2c8ccd783d3b94b3b6973f4032
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.