On Wed, 2010-03-10 at 02:27 +0800, Prarit Bhargava wrote: > > Matthew Garrett wrote: > > On Tue, Mar 09, 2010 at 09:12:03AM -0500, Prarit Bhargava wrote: > > > >> New sockets have on-die memory controllers. This means that in certain > >> HW configurations the memory behind the socket comes and goes as the socket > >> is physically enabled and disabled. > >> > >> Since the cpu bringup code does on node memory allocations, the memory on the > >> added socket must be onlined first. > >> > >> Add a .config option to automatically online hot added memory, and enable it > >> in the acpi memory add path. > >> > > > > This seems like the right thing to do. > > > > > >> +config ACPI_HOTPLUG_MEMORY_AUTO_ONLINE > >> + bool "Automatically online hotplugged memory" > >> + depends on ACPI_HOTPLUG_MEMORY > >> + default n > >> > > > > default !S390? default x86? > > > > I've been inquiring about this. It seems that some vendors want the > capability to manually bring memory online. I'm trying to get more > details as this doesn't seem intuitive. It seems to me that if you add > memory you want to online it right now. > > > > >> + result = online_pages(info->start_addr >> PAGE_SHIFT, > >> + info->length >> PAGE_SHIFT); > >> + if (!result) > >> + set_memory_state(info->start_addr, MEM_ONLINE); > >> + else > >> + printk("Memory online failed.\n"); > >> > > > > That probably wants to be more descriptive and have a loglevel. > > Oops. I'm very bad about setting the loglevel's on my printk's ;) ... > I'll fix that in the next patch. One note is that the hot-added memory will be automatically onlined. And we had better add an interface so that the user-space can quiry whether the hot-added memory is automatically onlined. Otherwise the user-space will receive the corresponding event and online hot-added memory again. In such case it will get some error messages. > > > What > > happens if this fails? The CPU presumably can't be brought up? > > > > That's a good question... After thinking about it I think that > acpi_processor_add() must check the node to see if it has memory before > bringing the cpu online. Why do we need to see whether the memory is onlined before bringing cpu to online state? It seems that there is no dependency between cpu online and memory online. Thanks. > > I'll code that up, test, and repost. > > P. > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html