Re: [PATCH 4/4] sched,fair: remove effective_load
From: Rik van Riel
Date: Mon Jun 26 2017 - 11:22:42 EST
On Mon, 2017-06-26 at 17:04 +0200, Peter Zijlstra wrote:
> On Mon, Jun 26, 2017 at 10:55:41AM -0400, Rik van Riel wrote:
> > On Mon, 2017-06-26 at 16:46 +0200, Peter Zijlstra wrote:
> > > On Mon, Jun 26, 2017 at 04:44:37PM +0200, Peter Zijlstra wrote:
> > > > On Fri, Jun 23, 2017 at 12:55:30PM -0400, riel@xxxxxxxxxx
> > > > wrote:
> > > > > From: Rik van Riel <riel@xxxxxxxxxx>
> > > > >
> > > > > The function effective_load was only used by the NUMA
> > > > > balancing
> > > > > code, and not by the regular load balancing code. Now that
> > > > > the
> > > > > NUMA balancing code no longer uses it either, get rid of it.
> > > >
> > > > Hmm,... funny. It used to be used by wake-affine. I'll have to
> > > > go
> > > > check
> > > > what happened.
> > >
> > > Ah, it fell pray to that LLC == NUMA confusion from the previous
> > > patch.
> > >
> > > That really looks buggered.
> >
> > Do the changelog or comments of that patch need fixing,
> > to avoid LLC / NUMA confusion?
>
> Neither, I think the code is actually wrong for the case where LLC <
> NUMA (a somewhat rare case these days, granted, but something that
> might
> still happen on !x86 perhaps).
Oh, indeed. I guess in wake_affine() we should test
whether the CPUs are in the same NUMA node, rather than
doing cpus_share_cache() ?
Or, alternatively, have an update_numa_stats() variant
for numa_wake_affine() that works on the LLC level?