Subject: Re: libnuma interleaving oddness

From: Nishanth Aravamudan <[email-masked]>
Date: Wed, 30 Aug 2006 00:29:48 -0700

On 30.08.2006 [09:19:13 +0200], Andi Kleen wrote:
> 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.

Ok.

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

I took out the mlock() call, and I get the same results, FWIW.

Thanks,
Nish

-- 
Nishanth Aravamudan <[email-masked]>
IBM Linux Technology Center