linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* libnuma interleaving oddness
@ 2006-08-29 23:15 Nishanth Aravamudan
  2006-08-29 23:57 ` Christoph Lameter
  0 siblings, 1 reply; 24+ messages in thread
From: Nishanth Aravamudan @ 2006-08-29 23:15 UTC (permalink / raw)
  To: clameter, ak; +Cc: linux-mm, lnxninja, linuxppc-dev

[Sorry for the double-post, correcting Christoph's address]

Hi,

While trying to add NUMA-awareness to libhugetlbfs' morecore
functionality (hugepage-backed malloc), I ran into an issue on a
ppc64-box with 8 memory nodes, running SLES10. I am using two functions
from libnuma: numa_available() and numa_interleave_memory().  When I ask
numa_interleave_memory() to interleave over all nodes (numa_all_nodes is
the nodemask from libnuma), it exhausts node 0, then moves to node 1,
then node 2, etc, until the allocations are satisfied. If I custom
generate a nodemask, such that bits 1 through 7 are set, but bit 0 is
not, then I get proper interleaving, where the first hugepage is on node
1, the second is on node 2, etc. Similarly, if I set bits 0 through 6 in
a custom nodemask, interleaving works across the requested 7 nodes. But
it has yet to work across all 8.

I don't know if this is a libnuma bug (I extracted out the code from
libnuma, it looked sane; and even reimplemented it in libhugetlbfs for
testing purposes, but got the same results) or a NUMA kernel bug (mbind
is some hairy code...) or a ppc64 bug or maybe not a bug at all.
Regardless, I'm getting somewhat inconsistent behavior. I can provide
more debugging output, or whatever is requested, but I wasn't sure what
to include. I'm hoping someone has heard of or seen something similar?

The test application I'm using makes some mallopt calls then justs
mallocs large chunks in a loop (4096 * 100 bytes). libhugetlbfs is
LD_PRELOAD'd so that we can override malloc.

Thanks,
Nish

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 24+ messages in thread
* libnuma interleaving oddness
@ 2006-08-29 23:02 Nishanth Aravamudan
  0 siblings, 0 replies; 24+ messages in thread
From: Nishanth Aravamudan @ 2006-08-29 23:02 UTC (permalink / raw)
  To: lameter, ak; +Cc: linux-mm, lnxninja, linuxppc-dev

Hi,

While trying to add NUMA-awareness to libhugetlbfs' morecore
functionality (hugepage-backed malloc), I ran into an issue on a
ppc64-box with 8 memory nodes, running SLES10. I am using two functions
from libnuma: numa_available() and numa_interleave_memory().  When I ask
numa_interleave_memory() to interleave over all nodes (numa_all_nodes is
the nodemask from libnuma), it exhausts node 0, then moves to node 1,
then node 2, etc, until the allocations are satisfied. If I custom
generate a nodemask, such that bits 1 through 7 are set, but bit 0 is
not, then I get proper interleaving, where the first hugepage is on node
1, the second is on node 2, etc. Similarly, if I set bits 0 through 6 in
a custom nodemask, interleaving works across the requested 7 nodes. But
it has yet to work across all 8.

I don't know if this is a libnuma bug (I extracted out the code from
libnuma, it looked sane; and even reimplemented it in libhugetlbfs for
testing purposes, but got the same results) or a NUMA kernel bug (mbind
is some hairy code...) or a ppc64 bug or maybe not a bug at all.
Regardless, I'm getting somewhat inconsistent behavior. I can provide
more debugging output, or whatever is requested, but I wasn't sure what
to include. I'm hoping someone has heard of or seen something similar?

The test application I'm using makes some mallopt calls then justs
mallocs large chunks in a loop (4096 * 100 bytes). libhugetlbfs is
LD_PRELOAD'd so that we can override malloc.

Thanks,
Nish

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2006-08-31 16:46 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-29 23:15 libnuma interleaving oddness Nishanth Aravamudan
2006-08-29 23:57 ` Christoph Lameter
2006-08-30  0:21   ` Nishanth Aravamudan
2006-08-30  2:26     ` Nishanth Aravamudan
2006-08-30  4:26       ` Christoph Lameter
2006-08-30  5:31         ` Nishanth Aravamudan
2006-08-30  5:40         ` Tim Pepper
2006-08-30  7:19     ` Andi Kleen
2006-08-30  7:29       ` Nishanth Aravamudan
2006-08-30  7:32         ` Andi Kleen
2006-08-30 18:01           ` Tim Pepper
2006-08-30 18:12             ` Andi Kleen
2006-08-30 18:13             ` Adam Litke
2006-08-30 21:04         ` Christoph Lameter
2006-08-31  6:00           ` Nishanth Aravamudan
2006-08-31  7:47             ` Andi Kleen
2006-08-31 15:49               ` Nishanth Aravamudan
2006-08-31 16:00             ` [PATCH] fix NUMA interleaving for huge pages (was RE: libnuma interleaving oddness) Nishanth Aravamudan
2006-08-31 16:08               ` Adam Litke
2006-08-31 16:19               ` Tim Pepper
2006-08-31 16:37               ` Christoph Lameter
2006-08-30 17:44       ` libnuma interleaving oddness Adam Litke
2006-08-30  7:16   ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2006-08-29 23:02 Nishanth Aravamudan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).