Re: [PATCH] sched: Fix numabalancing to work with isolated cpus

From: Mel Gorman
Date: Wed Apr 05 2017 - 04:09:42 EST


On Wed, Apr 05, 2017 at 07:20:06AM +0530, Srikar Dronamraju wrote:
> > >
> > > To avoid this, please check for isolated cpus before choosing a target
> > > cpu.
> > >
> >
> > Hmm, would this also prevent a task running inside a cgroup that is
> > allowed accessed to isolated CPUs from balancing? I severely doubt it
>
> Scheduler doesn't do any kind of load balancing for isolated cpus.
>

I was referring specifically to numa balancing, not load balancing but I
should have been clearer.

> > matters because if a process is isolated from interference then it
> > follows that automatic NUMA balancing should not be involved. If
>
> Yes, as an extension of the above, numa balancing should not be
> involved.
>

If anything, it arguably is a more sensible fix. If tasks on isolated CPUs
should not be interfered with then that should include the NUMA scanner
running in task context. IIf the PTEs are not updated then the faults are
not incurred which would be a much larger saving in overhead overall. There
would be a potential corner case where two threads in the same address
space run in separate cpusets but it would be somewhat of an odd cornercase.

--
Mel Gorman
SUSE Labs