[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061110213839.GA21928@elte.hu>
Date: Fri, 10 Nov 2006 22:38:39 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Christoph Lameter <clameter@....com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@...el.com>,
"Siddha, Suresh B" <suresh.b.siddha@...el.com>, akpm@...l.org,
mm-commits@...r.kernel.org, nickpiggin@...oo.com.au,
linux-kernel@...r.kernel.org
Subject: Re: + sched-use-tasklet-to-call-balancing.patch added to -mm tree
* Christoph Lameter <clameter@....com> wrote:
> I have done some testing on NUMA with 8p / 4n and 256 p / 128n which
> seems to indicate that this is doing very well. Having a global
> tasklet avoids concurrent load balancing from multiple nodes which
> smoothes out the load balancing load over all nodes in a NUMA system.
> It fixes the issues that we saw with contention during concurrent load
> balancing.
ok, that's what i suspected - what made the difference wasnt the fact
that it was moved out of irqs-off section, but that it was running
globally, instead of in parallel on every cpu. I have no conceptual
problem with single-threading the more invasive load-balancing bits.
(since it has to touch every runqueue anyway there's probably little
parallelism possible) But it's a scary change nevertheless, it
materially affects every SMP system's balancing characteristics.
Also, tasklets are a pretty bad choice for scalable stuff - it's
basically a shared resource between all CPUs and the tasklet-running
cacheline will bounce between all the CPUs. Also, a tasklet can be
'reactivated', which means that a CPU will do more rebalancing albeit
it's /another/ CPU that wanted that.
So could you try another implementation perhaps, which would match the
'single thread of rebalancing' model better? For example, try a global
spinlock that is trylocked upon rebalance. If the trylock succeeds then
do the rebalance and unlock. If the trylock fails, just skip the
rebalance. (this roughly matches the tasklet logic but has lower
overhead and doesnt cause false, repeat rebalancing)
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists