Re: [RFCv3][PATCH 4/4] show page size in /proc/$pid/numa_maps

From: David Rientjes
Date: Wed Oct 05 2011 - 15:26:04 EST

On Wed, 5 Oct 2011, Eric Dumazet wrote:

> > How does it break old scripts?
> >
> Old scripts just parse numa_maps, and on typical machines where
> hugepages are not used, they dont have to care about page size.
> They assume pages are 4KB.
> Adding a new word (pagesize=...) might break them, but personally I dont
> care.

If your script is only parsing numa_maps, then Dave's effort is actually
allowing them to be fixed rather than breaking them. We could silently
continue to export the page counts without specifying the size (hugetlb
pages are counted in their true hugepage size, THP pages are counted in
PAGE_SIZE units), but then a script would always be broken unless they use
smaps as well. Dave's addition of pagesize allows numa_maps to stand on
its own and actually be useful when hugepages are used.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at