Re: CPU scheduler question/problem

From: Peter Zijlstra
Date: Fri Jan 23 2009 - 10:40:33 EST


On Thu, 2009-01-22 at 22:34 +0100, Pawel Dziekonski wrote:
> question: is there a way to better balance processes over different
> cores and do it automagically?

Hard, the load-balancing code is a bunch of heuristics that work 'well'
for most of the things.

The pipe workload you mentioned has would behave that way because pipes
'assume' a produces/consumer behaviour, and thus are more likely to
place both tasks on the same cpu -- but will eventually pull them apart
if they want to run concurrently.

You might enable SCHED_DEBUG=y and try

echo NO_SYNC_WAKEUPS > /debug/sched_features

For that particular load.

About your quantum chemistry application -- you say they share a
workload, does that mean they synchronize a lot on locks? If so, the
scheduler might, at times of serialization, think it is a
produces/consumer load and move tasks together, and then later, when
they run independently, move them apart again.

I'm afraid you'll have to share a bit more of how your application works
in order to get a more informed answer.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/