Re: [PATCH] cpuset and sched domains: sched_load_balance flag

Nick Piggin
2007-10-03T11:57:31Z

On Wednesday 03 October 2007 21:38, Paul Jackson wrote:
> > OK, so to really do anything different (from a non-partitioned setup),
> > you would need to set sched_load_balance=0 for the root cpuset?

> > Suppose you do that to hard partition the machine, what happens to
> > newly created tasks like kernel threads or things that aren't in a
> > cpuset?
>
> Well ... --every-- task is in a cpuset, always. Newly created tasks
> start in the cpuset of their parent. Grep for 'the_top_cpuset_hack'
> in kernel/cpuset.c to see the lengths to which we go to ensure that
> current->cpuset always resolves somewhere.

OK, then non-balancing cpuset.

> The usual case on the big systems that I care about the most is
> that we move (almost) every task out of the top cpuset, into smaller
> cpusets, because we don't want some random thread intruding on the
> CPUs dedicated to a particular job. The only threads left in the root
> cpuset are pinned kernel threads, such as for thread migration, per-cpu
> irq handlers and various per-cpu and per-node disk and file flushers
> and such. These threads aren't going anywhere, regardless. But no
> thread that is willing to run anywhere is left free to run anywhere.

These are what I'm worried about, and things like kswapd, pdflush,
could definitely use a huge amount of CPU.

If you are interested in hard partitioning the system, you most
definitely want these things to be balanced across the non-isolated
CPUs.