[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 7 Jul 2020 11:47:18 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Qais Yousef <qais.yousef@....com>
Cc: Dave Jones <davej@...emonkey.org.uk>,
Mel Gorman <mgorman@...hsingularity.net>,
Linux Kernel <linux-kernel@...r.kernel.org>, mingo@...nel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
paul.gortmaker@...driver.com, valentin.schneider@....com
Subject: Re: weird loadavg on idle machine post 5.7
On Tue, Jul 07, 2020 at 10:20:05AM +0100, Qais Yousef wrote:
> On 07/06/20 16:59, Peter Zijlstra wrote:
> > + if (!preempt && prev_state && prev_state == prev->state) {
>
> I think the compiler won't optimize `prev_state == prev->state` out because of
> the smp_mb__after_spinlock() which implies a compiler barrier. Still not sure
> if it's worth making prev->state accesses a READ_ONCE()?
task_struct::state is one of the very rare (and ancient) variables
that's declared volatile.
We should probably clean that up some day, but so far I've not attempted
to do such a thing.
Powered by blists - more mailing lists