Re: NO_HZ_FULL and tick running within a reasonable amount of time

From: Peter Zijlstra
Date: Tue Apr 03 2018 - 05:23:43 EST


On Mon, Apr 02, 2018 at 03:04:38PM -0700, Paul E. McKenney wrote:

> The WARN_ON_ONCE() triggering is this guy:
>
> delta = rq_clock_task(rq) - curr->se.exec_start;
> WARN_ON_ONCE(delta > (u64)NSEC_PER_SEC * 3);
>
> But given that ->se.exec_start is zeroed from time to time, for example,
> in migrate_task_rq_fair(), I am a bit suspicious of this check.
>
> What am I missing here?

We clear it on migration, but set it when we schedule a task back in.
The above checks that the 'current' task of that CPU had a tick at least
3 seconds ago (to ensure tasks don't go too long without ticks).

The 'current' task is obviously scheduled in and thus must have !0
exec_start time.