On 04/11/2014 04:00 AM, David Rientjes wrote: > On Thu, 10 Apr 2014, Naoya Horiguchi wrote: >> > Yes, that's right, but it seems to me that just node_start_pfn and node_end_pfn >> > is not enough because there can be holes (without any page struct backed) inside >> > [node_start_pfn, node_end_pfn), and it's not aware of memory hotplug. >> > > So? Who cares if there are non-addressable holes in part of the span? > Ulrich, correct me if I'm wrong, but it seems you're looking for just a > address-to-nodeid mapping (or pfn-to-nodeid mapping) and aren't actually > expecting that there are no holes in a node for things like acpi or I/O or > reserved memory. ... > I think trying to represent holes and handling different memory models and > hotplug in special ways is complete overkill. This isn't just about memory hotplug or different memory models. There are systems out there today, in production, that have layouts like this: |------Node0-----| |------Node1-----| and this: |------Node0-----| |-Node1-| For those systems, this interface has no meaning. Given a page in the shared-span areas, this interface provides no way to figure out which node it is in. If you want a non-portable hack that just works on one system, I'd suggest parsing the existing firmware tables. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>