Re: [PATCH 2 of 4] hotplug-memory: adding non-section-aligned memoryis bad

From: Jeremy Fitzhardinge
Date: Fri Mar 28 2008 - 14:20:09 EST


KAMEZAWA Hiroyuki wrote:
What would happen if I did online_pages(pfn, 1) on each page as I populate it?

I think (hope) it works well. But it seems no one tries to do that.

Well I had immediate problems because I try to use it under spinlock and it calls online_pages -> build_all_zonelists -> stop_machine_run. I can easily rearrange to fix that, but it seems to me that stop_machine_run() is probably too expensive to call thousands of times (one for each page, rather than once per section).

I'm just looking at how I can refactor online_pages() into a function which does the general zone setup stuff, and one for actually onlining pages. The function of online_pages() would remain unchanged for existing users, but I could call the pieces separately at the appropriate times.

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