Re: [PATCH RESEND] sched/nohz: Add HRTICK_BW for using cfs bandwidth with nohz_full

From: Phil Auld
Date: Mon Jun 12 2023 - 17:40:26 EST


Hi Peter,

On Thu, May 18, 2023 at 10:37:18AM -0400 Phil Auld wrote:
> On Thu, May 18, 2023 at 03:47:46PM +0200 Peter Zijlstra wrote:

...

> > OMG; so because NOHZ_FULL configuration sucks, we add hacks on?
> >
>

...

>
> This seemed to be a sane way to handle what are effectively conflicting
> requirements. Stalling a task to the point the host gets rebooted is
> pretty painful. Maybe if we could fail the tick_stop test in this
> case that would work but that would keep all the ticks whereas this
> tries to respect the request for nohz as much as possible.

...

Let me try to argue it differently. Forget about the nohz_full configuration
part (I dropped that from the commit log on v2, too) since you could hit
this even if nohz_full was dynamic.

My contention is that given two conflicting requests the scheduler is making
the wrong choice. A request is being made to stop the tick if possible (which
is best effort already - there are numerous conditions to satisfy). And a
request is being made to enforce a cpu bandwidth limit (which is a hard limit
that can violate work conservation, and requires regular fine-grained
accounting). Currently the scheduler will favor the best-effort nohz request
over the quota limit request.

I posted v2 of the HRTICK based patch but maybe a simpler one that adds a
scheduler tick dependency when we pick a bandwidth-limited task would be
more palatable.

I have that one which I could clean up and post.


Thanks,
Phil


--