On 04/11/2014 03:13 PM, David Rientjes wrote: > What additional information, in your opinion, can we export to assist > userspace in making this determination that $address is on $nid? In the case of overlapping nodes, the only place we actually have *all* of the information is in the 'struct page' itself. Ulrich's original patch obviously _works_, and especially if it's an interface only for debugging purposes, it seems silly to spend virtually any time optimizing it. Keeping it close to pagemap's implementation lessens the likelihood that we'll screw things up. I assume that the original problem was trying to figure out what NUMA affinity a given range of pages mapped in to a _process_ have, and that /proc/$pid/numamaps is too coarse. Is that right, Ulrich? If you want to go the route of calculating and exporting the physical ranges that nodes uniquely own, you've *GOT* to handle the overlaps. Naoya had the right idea. His idea seemed to get shot down with the misunderstanding that node pfn ranges never overlap. The only other question is how many of these kpage* things we're going to put in here until we've exported the entire contents of 'struct page' 5 times over. :) We could add some tracepoints to the pagemap to dump lots of information in to a trace buffer that could be later read back. If you want detailed information (NUMA for instance), you turn the tracepoints and read pagemap for the range you care about. -- 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>