Re: libnuma interleaving oddness
From: Adam Litke <hidden>
Date: 2006-08-30 18:13:06
Also in:
linux-mm
From: Adam Litke <hidden>
Date: 2006-08-30 18:13:06
Also in:
linux-mm
On Wed, 2006-08-30 at 11:01 -0700, Tim Pepper wrote:
On 8/30/06, Andi Kleen [off-list ref] wrote:quoted
Then it's probably some new problem in hugetlbfs.It's something subtle though, because I _am_ able to get interleaving on hugetlbfs with a slightly simplified test case (see previous email) compared to Nish's.quoted
Does it work with shmfs?Haven't tried shmfs, but the following correctly does the expected interleaving with hugepages (although not hugetlbfs backed): shmid = shmget( 0, NR_HUGE_PAGES, IPC_CREAT | SHM_HUGETLB | 0666 ); shmat_addr = shmat( shmid, NULL, 0 ); ... numa_interleave_memory( shmat_addr, SHM_SIZE, &nm ); I'd expect it works fine with non-huge pages, shmfs.
Actually, the above call will yield hugetlbfs backed huge pages. The kernel just prepares the hugetlbfs file for you. See hugetlb_zero_setup(). -- Adam Litke - (agl at us.ibm.com) IBM Linux Technology Center