Re: weird loadavg on idle machine post 5.7

From: Dave Jones
Date: Fri Jul 03 2020 - 16:52:01 EST


On Fri, Jul 03, 2020 at 12:40:33PM +0200, Peter Zijlstra wrote:

> So ARM/Power/etc.. can speculate the load such that the
> task_contributes_to_load() value is from before ->on_rq.
>
> The compiler might similar re-order things -- although I've not found it
> doing so with the few builds I looked at.
>
> So I think at the very least we should do something like this. But i've
> no idea how to reproduce this problem.
>
> Mel's patch placed it too far down, as the WF_ON_CPU path also relies on
> this, and by not resetting p->sched_contributes_to_load it would skew
> accounting even worse.

looked promising the first few hours, but as soon as it hit four hours
of uptime, loadavg spiked and is now pinned to at least 1.00

Dave