* Re: [RFC] prefer allocations from nodes w/o CPUs
2004-11-04 16:57 [RFC] prefer allocations from nodes w/o CPUs Jesse Barnes
@ 2004-11-04 17:11 ` Alex Williamson
2004-11-04 17:16 ` Jesse Barnes
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alex Williamson @ 2004-11-04 17:11 UTC (permalink / raw)
To: linux-ia64
On Thu, 2004-11-04 at 08:57 -0800, Jesse Barnes wrote:
> Small patch for the ia64 version of topology.h to make the zonelist building
> code prefer nodes w/o CPUs for allocations. Do any platforms aside from
> Altix have nodes with only memory? If not, then this will only affect sn2,
> otherwise I'm interested in hearing feedback.
Yes, hp sx1000 systems represent interleaved memory in a separate
node w/o cpus.
Alex
--
Alex Williamson HP Linux & Open Source Lab
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFC] prefer allocations from nodes w/o CPUs
2004-11-04 16:57 [RFC] prefer allocations from nodes w/o CPUs Jesse Barnes
2004-11-04 17:11 ` Alex Williamson
@ 2004-11-04 17:16 ` Jesse Barnes
2004-11-04 17:22 ` Alex Williamson
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jesse Barnes @ 2004-11-04 17:16 UTC (permalink / raw)
To: linux-ia64
On Thursday, November 4, 2004 9:11 am, Alex Williamson wrote:
> On Thu, 2004-11-04 at 08:57 -0800, Jesse Barnes wrote:
> > Small patch for the ia64 version of topology.h to make the zonelist
> > building code prefer nodes w/o CPUs for allocations. Do any platforms
> > aside from Altix have nodes with only memory? If not, then this will
> > only affect sn2, otherwise I'm interested in hearing feedback.
>
> Yes, hp sx1000 systems represent interleaved memory in a separate
> node w/o cpus.
So does this patch make sense for those platforms too? Or do we need
something fancier? It'll make nodes w/o CPUs come before nodes with CPUs in
the zonelist (after the local node of course), even if the nodes with CPUs
are closer.
Jesse
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFC] prefer allocations from nodes w/o CPUs
2004-11-04 16:57 [RFC] prefer allocations from nodes w/o CPUs Jesse Barnes
2004-11-04 17:11 ` Alex Williamson
2004-11-04 17:16 ` Jesse Barnes
@ 2004-11-04 17:22 ` Alex Williamson
2004-11-04 17:32 ` Alex Tsariounov
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alex Williamson @ 2004-11-04 17:22 UTC (permalink / raw)
To: linux-ia64
On Thu, 2004-11-04 at 09:16 -0800, Jesse Barnes wrote:
> On Thursday, November 4, 2004 9:11 am, Alex Williamson wrote:
> > On Thu, 2004-11-04 at 08:57 -0800, Jesse Barnes wrote:
> > > Small patch for the ia64 version of topology.h to make the zonelist
> > > building code prefer nodes w/o CPUs for allocations. Do any platforms
> > > aside from Altix have nodes with only memory? If not, then this will
> > > only affect sn2, otherwise I'm interested in hearing feedback.
> >
> > Yes, hp sx1000 systems represent interleaved memory in a separate
> > node w/o cpus.
>
> So does this patch make sense for those platforms too? Or do we need
> something fancier? It'll make nodes w/o CPUs come before nodes with CPUs in
> the zonelist (after the local node of course), even if the nodes with CPUs
> are closer.
That makes sense for us. The interleaved memory should be somewhat
faster than truly remote memory. Depending on the box configuration,
the interleaved memory node could be quite small and we'll run out
quickly, but better to make what use we can from it. Thanks,
Alex
--
Alex Williamson HP Linux & Open Source Lab
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFC] prefer allocations from nodes w/o CPUs
2004-11-04 16:57 [RFC] prefer allocations from nodes w/o CPUs Jesse Barnes
` (2 preceding siblings ...)
2004-11-04 17:22 ` Alex Williamson
@ 2004-11-04 17:32 ` Alex Tsariounov
2004-11-04 17:33 ` Jesse Barnes
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alex Tsariounov @ 2004-11-04 17:32 UTC (permalink / raw)
To: linux-ia64
On Thu, Nov 04, 2004 at 10:11:19AM -0700, Alex Williamson wrote:
> On Thu, 2004-11-04 at 08:57 -0800, Jesse Barnes wrote:
> > Small patch for the ia64 version of topology.h to make the zonelist building
> > code prefer nodes w/o CPUs for allocations. Do any platforms aside from
> > Altix have nodes with only memory? If not, then this will only affect sn2,
> > otherwise I'm interested in hearing feedback.
>
> Yes, hp sx1000 systems represent interleaved memory in a separate
> node w/o cpus.
So what's the ramifications of this patch? Does this mean that
interleaved memory will now be preferably allocated over cell
local memory on sx1000 systems?
Thanks,
Alex Tsariounov
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFC] prefer allocations from nodes w/o CPUs
2004-11-04 16:57 [RFC] prefer allocations from nodes w/o CPUs Jesse Barnes
` (3 preceding siblings ...)
2004-11-04 17:32 ` Alex Tsariounov
@ 2004-11-04 17:33 ` Jesse Barnes
2004-11-04 17:49 ` Jesse Barnes
2004-11-04 17:59 ` Alex Tsariounov
6 siblings, 0 replies; 8+ messages in thread
From: Jesse Barnes @ 2004-11-04 17:33 UTC (permalink / raw)
To: linux-ia64
On Thursday, November 4, 2004 9:32 am, Alex Tsariounov wrote:
> On Thu, Nov 04, 2004 at 10:11:19AM -0700, Alex Williamson wrote:
> > On Thu, 2004-11-04 at 08:57 -0800, Jesse Barnes wrote:
> > > Small patch for the ia64 version of topology.h to make the zonelist
> > > building code prefer nodes w/o CPUs for allocations. Do any platforms
> > > aside from Altix have nodes with only memory? If not, then this will
> > > only affect sn2, otherwise I'm interested in hearing feedback.
> >
> > Yes, hp sx1000 systems represent interleaved memory in a separate
> > node w/o cpus.
>
> So what's the ramifications of this patch? Does this mean that
> interleaved memory will now be preferably allocated over cell
> local memory on sx1000 systems?
Memory local to the node will come first, followed by the closest memory that
doesn't have associated CPUs, followed by memory belonging to other CPUs.
Jesse
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFC] prefer allocations from nodes w/o CPUs
2004-11-04 16:57 [RFC] prefer allocations from nodes w/o CPUs Jesse Barnes
` (4 preceding siblings ...)
2004-11-04 17:33 ` Jesse Barnes
@ 2004-11-04 17:49 ` Jesse Barnes
2004-11-04 17:59 ` Alex Tsariounov
6 siblings, 0 replies; 8+ messages in thread
From: Jesse Barnes @ 2004-11-04 17:49 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
On Thursday, November 4, 2004 9:33 am, Jesse Barnes wrote:
> On Thursday, November 4, 2004 9:32 am, Alex Tsariounov wrote:
> > On Thu, Nov 04, 2004 at 10:11:19AM -0700, Alex Williamson wrote:
> > > On Thu, 2004-11-04 at 08:57 -0800, Jesse Barnes wrote:
> > > > Small patch for the ia64 version of topology.h to make the zonelist
> > > > building code prefer nodes w/o CPUs for allocations. Do any
> > > > platforms aside from Altix have nodes with only memory? If not, then
> > > > this will only affect sn2, otherwise I'm interested in hearing
> > > > feedback.
> > >
> > > Yes, hp sx1000 systems represent interleaved memory in a separate
> > > node w/o cpus.
> >
> > So what's the ramifications of this patch? Does this mean that
> > interleaved memory will now be preferably allocated over cell
> > local memory on sx1000 systems?
>
> Memory local to the node will come first, followed by the closest memory
> that doesn't have associated CPUs, followed by memory belonging to other
> CPUs.
Actually, I lied. There's a bug in find_next_best_node that prevents the
local node from coming first if the PENALTY_FOR_NODE_WITH_CPUS is set high
enough. Here's the fix (I'll send it to Andrew shortly).
Jesse
[-- Attachment #2: local-node-with-penalty-fix.patch --]
[-- Type: text/plain, Size: 446 bytes --]
===== mm/page_alloc.c 1.239 vs edited =====
--- 1.239/mm/page_alloc.c 2004-10-25 13:06:48 -07:00
+++ edited/mm/page_alloc.c 2004-11-04 09:41:23 -08:00
@@ -1213,6 +1213,12 @@
if (test_bit(n, used_node_mask))
continue;
+ /* Use the local node if we haven't already */
+ if (!test_bit(node, used_node_mask)) {
+ best_node = node;
+ break;
+ }
+
/* Use the distance array to find the distance */
val = node_distance(node, n);
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFC] prefer allocations from nodes w/o CPUs
2004-11-04 16:57 [RFC] prefer allocations from nodes w/o CPUs Jesse Barnes
` (5 preceding siblings ...)
2004-11-04 17:49 ` Jesse Barnes
@ 2004-11-04 17:59 ` Alex Tsariounov
6 siblings, 0 replies; 8+ messages in thread
From: Alex Tsariounov @ 2004-11-04 17:59 UTC (permalink / raw)
To: linux-ia64
On Thu, Nov 04, 2004 at 09:49:53AM -0800, Jesse Barnes wrote:
> On Thursday, November 4, 2004 9:33 am, Jesse Barnes wrote:
> > Memory local to the node will come first, followed by the closest memory
> > that doesn't have associated CPUs, followed by memory belonging to other
> > CPUs.
>
> Actually, I lied. There's a bug in find_next_best_node that prevents the
> local node from coming first if the PENALTY_FOR_NODE_WITH_CPUS is set high
> enough. Here's the fix (I'll send it to Andrew shortly).
Great! Thanks for the review.
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread