Re: [PATCH] timers/nohz: Update nohz load even if tick already stopped

From: Scott Wood
Date: Wed Dec 11 2019 - 15:37:45 EST


On Fri, 2019-11-08 at 02:13 -0600, Scott Wood wrote:
> On Tue, 2019-11-05 at 13:43 +0100, Peter Zijlstra wrote:
> > On Tue, Nov 05, 2019 at 01:30:58AM -0600, Scott Wood wrote:
> > > As for the warning in sched_tick_remote(), it seems like a test for
> > > time
> > > since the last tick on this cpu (remote or otherwise) would be better
> > > than
> > > relying on curr->se.exec_start, in order to detect things like this.
> >
> > I don't think we have a timestamp that is shared between the remote and
> > local tick.
>
> Why wouldn't rq_clock_task() work on the local tick? It's what
> ->task_tick() itself uses.
>
> > Also, there is a reason this warning uses the task time
> > accounting, there used to be (as in, I can't find it in a hurry) code
> > that could not deal with >u32 (~4s) clock updates.
>
> Detecting a 3 second interval between ticks for a given cpu should
> assert in a superset of the situations the current check asserts in --
> it just avoids the false negative of exec_runtime getting updated by
> something other than the tick.

The main difficulty with such a check is that when we're not on a full
nohz cpu, there's no remote tick, and so we can legitimately go more than
3 seconds between ticks when idle.

-Scott