Re: [PATCH] Sched/fair: Block nohz tick_stop when cfs bandwidth in use

From: Phil Auld
Date: Thu Jun 22 2023 - 11:46:18 EST


On Thu, Jun 22, 2023 at 10:22:16AM -0400 Steven Rostedt wrote:
> On Thu, 22 Jun 2023 09:27:51 -0400
> Phil Auld <pauld@xxxxxxxxxx> wrote:
>
> > CFS bandwidth limits and NOHZ full don't play well together. Tasks
> > can easily run well past their quotas before a remote tick does
> > accounting. This leads to long, multi-period stalls before such
> > tasks can run again. Currentlyi, when presented with these conflicting
> > requirements the scheduler is favoring nohz_full and letting the tick
> > be stopped. However, nohz tick stopping is already best-effort, there
> > are a number of conditions that can prevent it, whereas cfs runtime
> > bandwidth is expected to be enforced.
> >
> > Make the scheduler favor bandwidth over stopping the tick by setting
> > TICK_DEP_BIT_SCHED when the only running task is a cfs task with
> > runtime limit enabled.
> >
> > Add sched_feat HZ_BW (off by default) to control this behavior.
>
> So the tl;dr; is: "If the current task has a bandwidth limit, do not disable
> the tick" ?
>

Yes. W/o the tick we can't reliably support/enforce the bandwidth limit.


Cheers,
Phil

> -- Steve
>

--