Messages in this thread | | | Date | Fri, 28 Mar 2008 11:19:24 -0700 | From | Jeremy Fitzhardinge <> | Subject | Re: [PATCH 2 of 4] hotplug-memory: adding non-section-aligned memory is bad |
| |
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
| |