Re: [RFC PATCH 00/32] Nohz cpusets (was: Nohz Tasks)

Peter Zijlstra
2011-08-31T14:30:58Z

On Wed, 2011-08-31 at 16:57 +0300, Gilad Ben-Yossef wrote:
> I added the cpuisol option after noticing how many tasks I was unable
> to move from the root cpuset to the system cpuset due to them being
> bound per CPU

Right, so ideally those tasks should be idle and not interfere. Where
this is not so, we should make it so.

When userspace didn't ask for anything to happen, nothing should happen.
When it did ask for it, well then it shouldn't complain it does :-)

Furthermore things like:

linux-2.6# git grep on_each_cpu mm/
mm/page_alloc.c: on_each_cpu(drain_local_pages, NULL, 1);
mm/slab.c: on_each_cpu(do_drain, cachep, 1);
mm/slab.c: on_each_cpu(do_ccupdate_local, (void *)new, 1);
mm/slub.c: on_each_cpu(flush_cpu_slab, s, 1);
mm/swap.c: return schedule_on_each_cpu(lru_add_drain_per_cpu);

Should be converted to smp_call_function_many() and for each we should
keep a cpumask of cpus where there's work to do, avoiding disturbing
cpus that have been quiet.