* [PATCH] memory-hotplug: mm/Kconfig: move auto selects from MEMORY_HOTPLUG to MEMORY_HOTREMOVE as needed
@ 2013-01-18 7:54 Lin Feng
2013-01-18 13:58 ` Michal Hocko
2013-02-21 21:18 ` [patch -mm] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap fix fix fix fix fix David Rientjes
0 siblings, 2 replies; 4+ messages in thread
From: Lin Feng @ 2013-01-18 7:54 UTC (permalink / raw)
To: akpm, kamezawa.hiroyu
Cc: mhocko, mel, minchan, aquini, linux-mm, linux-kernel, wency,
tangchen, laijs, Lin Feng
Since we have 2 config options called MEMORY_HOTPLUG and MEMORY_HOTREMOVE
used for memory hot-add and hot-remove separately, and codes in function
register_page_bootmem_info_node() are only used for collecting infomation
for hot-remove(commit 04753278), so move it to MEMORY_HOTREMOVE.
Besides page_isolation.c selected by MEMORY_ISOLATION under MEMORY_HOTPLUG
is also such case, move it too.
Signed-off-by: Lin Feng <linfeng@cn.fujitsu.com>
---
mm/Kconfig | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index f8c5799..a96c010 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -172,8 +172,6 @@ config HAVE_BOOTMEM_INFO_NODE
# eventually, we can have this option just 'select SPARSEMEM'
config MEMORY_HOTPLUG
bool "Allow for memory hot-add"
- select MEMORY_ISOLATION
- select HAVE_BOOTMEM_INFO_NODE if X86_64
depends on SPARSEMEM || X86_64_ACPI_NUMA
depends on HOTPLUG && ARCH_ENABLE_MEMORY_HOTPLUG
depends on (IA64 || X86 || PPC_BOOK3S_64 || SUPERH || S390)
@@ -184,6 +182,8 @@ config MEMORY_HOTPLUG_SPARSE
config MEMORY_HOTREMOVE
bool "Allow for memory hot remove"
+ select MEMORY_ISOLATION
+ select HAVE_BOOTMEM_INFO_NODE if X86_64
depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE
depends on MIGRATION
--
1.7.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] memory-hotplug: mm/Kconfig: move auto selects from MEMORY_HOTPLUG to MEMORY_HOTREMOVE as needed
2013-01-18 7:54 [PATCH] memory-hotplug: mm/Kconfig: move auto selects from MEMORY_HOTPLUG to MEMORY_HOTREMOVE as needed Lin Feng
@ 2013-01-18 13:58 ` Michal Hocko
2013-01-21 1:50 ` Lin Feng
2013-02-21 21:18 ` [patch -mm] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap fix fix fix fix fix David Rientjes
1 sibling, 1 reply; 4+ messages in thread
From: Michal Hocko @ 2013-01-18 13:58 UTC (permalink / raw)
To: Lin Feng
Cc: akpm, kamezawa.hiroyu, mel, minchan, aquini, linux-mm,
linux-kernel, wency, tangchen, laijs
On Fri 18-01-13 15:54:36, Lin Feng wrote:
> Besides page_isolation.c selected by MEMORY_ISOLATION under MEMORY_HOTPLUG
> is also such case, move it too.
Yes, it seems that only HOTREMOVE needs MEMORY_ISOLATION but that should
be done in a separate patch as this change is already upstream and
should be merged separately. It would also be nice to mention which
functions are we talking about. AFAICS:
alloc_migrate_target, test_pages_isolated, start_isolate_page_range and
undo_isolate_page_range.
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] memory-hotplug: mm/Kconfig: move auto selects from MEMORY_HOTPLUG to MEMORY_HOTREMOVE as needed
2013-01-18 13:58 ` Michal Hocko
@ 2013-01-21 1:50 ` Lin Feng
0 siblings, 0 replies; 4+ messages in thread
From: Lin Feng @ 2013-01-21 1:50 UTC (permalink / raw)
To: Michal Hocko; +Cc: akpm, kamezawa.hiroyu, linux-mm, linux-kernel
Hi Michal,
On 01/18/2013 09:58 PM, Michal Hocko wrote:
> On Fri 18-01-13 15:54:36, Lin Feng wrote:
>> Besides page_isolation.c selected by MEMORY_ISOLATION under MEMORY_HOTPLUG
>> is also such case, move it too.
>
> Yes, it seems that only HOTREMOVE needs MEMORY_ISOLATION but that should
> be done in a separate patch as this change is already upstream and
> should be merged separately. It would also be nice to mention which
I didn't notice such rules before, I will take care next time :)
> functions are we talking about. AFAICS:
> alloc_migrate_target, test_pages_isolated, start_isolate_page_range and
> undo_isolate_page_range.
>
Anyway, thanks all your good suggestions for the fixes in this series.
thanks again,
linfeng
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch -mm] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap fix fix fix fix fix
2013-01-18 7:54 [PATCH] memory-hotplug: mm/Kconfig: move auto selects from MEMORY_HOTPLUG to MEMORY_HOTREMOVE as needed Lin Feng
2013-01-18 13:58 ` Michal Hocko
@ 2013-02-21 21:18 ` David Rientjes
1 sibling, 0 replies; 4+ messages in thread
From: David Rientjes @ 2013-02-21 21:18 UTC (permalink / raw)
To: Andrew Morton
Cc: Lin Feng, KAMEZAWA Hiroyuki, mhocko, linux-mm, linux-kernel,
Wen Congyang, Yasuaki Ishimatsu, Tang Chen, Lai Jiangshan
Fixes
mm/memory_hotplug.c:133:13: warning: 'register_page_bootmem_info_section' defined but not used [-Wunused-function]
by defining the function only in configurations where it is used.
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/memory_hotplug.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -129,6 +129,7 @@ void __ref put_page_bootmem(struct page *page)
}
+#ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE
#ifndef CONFIG_SPARSEMEM_VMEMMAP
static void register_page_bootmem_info_section(unsigned long start_pfn)
{
@@ -163,7 +164,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
get_page_bootmem(section_nr, page, MIX_SECTION_INFO);
}
-#else
+#else /* CONFIG_SPARSEMEM_VMEMMAP */
static void register_page_bootmem_info_section(unsigned long start_pfn)
{
unsigned long *usemap, mapsize, section_nr, i;
@@ -188,9 +189,8 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
for (i = 0; i < mapsize; i++, page++)
get_page_bootmem(section_nr, page, MIX_SECTION_INFO);
}
-#endif
+#endif /* !CONFIG_SPARSEMEM_VMEMMAP */
-#ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE
void register_page_bootmem_info_node(struct pglist_data *pgdat)
{
unsigned long i, pfn, end_pfn, nr_pages;
@@ -232,7 +232,7 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
register_page_bootmem_info_section(pfn);
}
}
-#endif
+#endif /* CONFIG_HAVE_BOOTMEM_INFO_NODE */
static void grow_zone_span(struct zone *zone, unsigned long start_pfn,
unsigned long end_pfn)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-21 21:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 7:54 [PATCH] memory-hotplug: mm/Kconfig: move auto selects from MEMORY_HOTPLUG to MEMORY_HOTREMOVE as needed Lin Feng
2013-01-18 13:58 ` Michal Hocko
2013-01-21 1:50 ` Lin Feng
2013-02-21 21:18 ` [patch -mm] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap fix fix fix fix fix David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox