Re: [Lhms-devel] [RFC][PATCH] hot add memory which is not alignedto section

From: KAMEZAWA Hiroyuki
Date: Mon May 01 2006 - 21:31:07 EST


On Mon, 01 May 2006 07:56:32 -0700
Dave Hansen <haveblue@xxxxxxxxxx> wrote:

> The 'struct resource' which gets passed into find_next_system_ram()
> isn't a real resource. Why not just pass a normal start and end address
> in there, and let _it_ do the work?
>
just I don't like return prural values by one function call, I needed start
and end.

> It looks like that whole loop is optimized for being able to online a
> really sparse area without diving into the iomem tables very often.
> This seems like a premature complicating optimization to me.
>
Hmm...complicating ?

> Why not do something like this:
>
> for (i = 0; i < nr_pages; i++) {
> struct page *page = pfn_to_page(pfn + i);
>
> if (page_is_in_io_resource(page))
> continue;
>
> online_page(page);
> onlined_pages++;
> }
>
> That way, you keep the memory_hotplug.c file nice and neat.
>
I'll clean up this later (if I can). maybe adding function like this will work.
-
ioresouce_walk(scan_start, scan_end, callback_func);
-
I don't want to modify structures of resource just for memory hotplug.
Then, I want to avoid list-waliking as much as possible.


> Also, remind me again why you can't just make the SECTION_SIZE match
> your 64MB I/O hole sizes. I forget a lot/ :)
>
ia64 has 1GB SECTION_SIZE as default ;). I don't think our (fujitsu's)
customers can configure and recompile the kernel.


-Kame
P.S. I'm away from network until this week end.

-
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/