On Thu, Mar 23, 2006 at 12:22:50PM +0900, KAMEZAWA Hiroyuki wrote: > On 23 Mar 2006 03:43:06 +0100 > Andi Kleen <[EMAIL PROTECTED]> wrote: > > > > > Don't do that. > > The x86-64 kernel will preallocate memmaps when everything is enabled soon. > > Ok that won't concern your IA64 machine immediately. > > > > > > I read hotadd-reserve patches again.. Okay, please preallocate if you want. > > Problem I found is: > 1) Goto's rebuild_zonelist patch will not work if CONFIG_MEMORY_HOTPLUG=n. > rebuild zonelist is necessary when the system has just memory < 4G at > boot, > and hot add memory > 4G. because x86_64 has DMA32, ZONE_NORAML is not > included into > zonelist at boot time if system doesn't have memory >4G at boot. > > 2) zone and node's spanned_pages and present_pages are not incremented. you > should do.
Thanks for the review. All good points. Will fix. I think I just can force the higher zones to be built at boot when there are any SRATs > 4GB. I will also add some throttling to prevent the kernel not booting in the "1TB of hotplug ram" scenario you outlined. Probably just limit the memory map preallocated to not more than some percentage of the free RAM. Just need to figure out a good limit. Currently mem_map costs about 1.5% of RAM, so not allocating more than e.g. 5% of RAM to hotplug memmaps would limit the hotplug memory on a 1GB machine to 3GB. Hmm, maybe 10% but users could be annoyed if they lose that much memory due to hotplug. Another problem is that mem_map needs to be contiguous by node, but that can be handled with existing functions by checking the e820 map. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
