lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sched: rq->nr_iowait transiently going negative after the recent p->on_cpu optimization
On Thu, Sep 24, 2020 at 04:50:41PM +0200, Peter Zijlstra wrote:
> > Rik suggested that it'd be sufficient to return 0 on underflow especially
> > given that 0 is actually the right number to describe the state. So, maybe
> > that can be a nicer code-wise?
>
> I worry about things where one CPU has a positive value and one or more
> (other) CPUs have a temporary negative value.

I think it'd make more sense to max'ing them per-cpu as that's the right
per-cpu state. nr_iowait_cpu() needs that anyway, so maybe the summing
function can just use nr_iowait_cpu()?

Thanks.

--
tejun

\
 
 \ /
  Last update: 2020-09-24 16:58    [W:0.046 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site