Re: [Lhms-devel] [RFC/PATCH: 002/010] Memory hotplug for new nodes with pgdat allocation. (Wait table and zonelists initalization)

From: Yasunori Goto
Date: Tue Feb 14 2006 - 02:33:34 EST


Sorry for late response....

> On Fri, 2006-02-10 at 23:20 +0900, Yasunori Goto wrote:
> > This patch is to initialize wait table and zonelists for new pgdat.
> > When new node is added, free_area_init_node() is called to initialize
> > pgdat. But, wait table must be allocated by kmalloc (not bootmem) for
> > it.
> > And, zonelists is accessed from any other process every time,
> > So, stop_machine_run() is used for safety update.
>
> I do notice that you're not using init_currently_empty_zone() to
> initialize currently empty zones. Why?

Did you mention about here in free_area_init_core()?
I recall about here.

:
if (!size)
continue;

zonetable_add(zone, nid, j, zone_start_pfn, size);
zone_wait_table_init(zone, size);
init_currently_empty_zone(zone, zone_start_pfn, size);
zone_start_pfn += size;
:

All of zone_size[] is set zero at new_pgdat_init().
So, init_currently_empty_zone() is not called at this point. Indeed.

However, when __add_section() is called for first section on the node
after that, hot_add_zone_init() is called, and it calls
init_currently_empty_zone().

--- pgdat2.orig/mm/memory_hotplug.c 2006-02-10 16:59:51.000000000 +0900
+++ pgdat2/mm/memory_hotplug.c 2006-02-10 17:02:34.000000000 +0900
@@ -48,6 +48,8 @@ static int __add_section(struct zone *zo

ret = sparse_add_one_section(zone, phys_start_pfn, nr_pages);

+ hot_add_zone_init(zone, phys_start_pfn, PAGES_PER_SECTION);
+

Thanks.

--
Yasunori Goto


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/