libnuma interleaving oddness

Andi Kleen ak at suse.de
Wed Aug 30 17:19:13 EST 2006


mous pages.
> 
> The order is (with necessary params filled in):
> 
> p = mmap( , newsize, RW, PRIVATE, unlinked_hugetlbfs_heap_fd, );
> 
> numa_interleave_memory(p, newsize);
> 
> mlock(p, newsize); /* causes all the hugepages to be faulted in */
> 
> munlock(p,newsize);
> 
> From what I gathered from the numa manpages, the interleave policy
> should take effect on the mlock, as that is "fault-time" in this
> context. We're forcing the fault, that is.

mlock shouldn't be needed at all here. the new hugetlbfs is supposed
to reserve at mmap time and numa_interleave_memory() sets a VMA 
policy which will should do the right thing no matter when the fault
occurs.

Hmm, maybe mlock() policy() is broken.

-Andi




More information about the Linuxppc-dev mailing list