Re: EEVDF and NUMA balancing

From: Peter Zijlstra
Date: Wed Oct 04 2023 - 13:48:19 EST


On Wed, Oct 04, 2023 at 06:24:39PM +0200, Julia Lawall wrote:
>
>
> On Wed, 4 Oct 2023, Peter Zijlstra wrote:
>
> > On Wed, Oct 04, 2023 at 02:01:26PM +0200, Julia Lawall wrote:
> > >
> > >
> > > On Tue, 3 Oct 2023, Peter Zijlstra wrote:
> > >
> > > > On Tue, Oct 03, 2023 at 10:25:08PM +0200, Julia Lawall wrote:
> > > > > Is it expected that the commit e8f331bcc270 should have an impact on the
> > > > > frequency of NUMA balancing?
> > > >
> > > > Definitely not expected. The only effect of that commit was supposed to
> > > > be the runqueue order of tasks. I'll go stare at it in the morning --
> > > > definitely too late for critical thinking atm.
> > >
> > > Maybe it's just randomly making a bad situation worse rather than directly
> > > introduing a problem. There is a high standard deviatind in the
> > > performance. Here are some results with hyperfine. The general trends
> > > are reproducible.
> >
> > OK,. I'm still busy trying to bring a 4 socket machine up-to-date...
> > gawd I hate the boot times on those machines :/
> >
> > But yeah, I was thinking similar things, I really can't spot an obvious
> > fail in that commit.
> >
> > I'll go have a poke once the darn machine is willing to submit :-)
>
> I tried a two-socket machine, but in 50 runs the problem doesn't show up.

I've had to re-install the 4 socket thing -- lost the day to this
trainwreck :/ Because obvoiusly the BMC needs Java and that all don't
work anymore -- so I had to go sit next to the jet-engine thing with a
keyboard and monitor.

I'll go build the benchmark thing tomorrow, if I can figure out how that
works, this NAS stuff looked 'special'. Nothing simple like ./configure;
make -j$lots :/

> The commit e8f331bcc270 starts with
>
> - if (sched_feat(PLACE_LAG) && cfs_rq->nr_running > 1) {
> + if (sched_feat(PLACE_LAG) && cfs_rq->nr_running) {
>
> This seemed like a big change - cfs_rq->nr_running > 1 should be rarely
> true in ua, while cfs_rq->nr_running should always be true. Adding back
> the > 1 and simply replacing the test by 0 both had no effect, though.

Yeah, this is because I flip the order of place_entity() and
nr_running++ around later in the patch. Previously it would increment
before place, now it does place before increment.