From: Peter Zijlstra <peterz@infradead.org>
To: Phil Auld <pauld@redhat.com>
Cc: linux-kernel@vger.kernel.org, Juri Lelli <juri.lelli@redhat.com>,
Ingo Molnar <mingo@redhat.com>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Valentin Schneider <vschneid@redhat.com>,
Ben Segall <bsegall@google.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mel Gorman <mgorman@suse.de>,
Frederic Weisbecker <frederic@kernel.org>,
Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v6 2/2] Sched/fair: Block nohz tick_stop when cfs bandwidth in use
Date: Tue, 1 Aug 2023 17:37:31 +0200 [thread overview]
Message-ID: <20230801153731.GD11704@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20230801111342.GA268019@lorien.usersys.redhat.com>
On Tue, Aug 01, 2023 at 07:13:42AM -0400, Phil Auld wrote:
> On Tue, Aug 01, 2023 at 12:49:34AM +0200 Peter Zijlstra wrote:
> > On Wed, Jul 12, 2023 at 09:33:57AM -0400, Phil Auld 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. Currently, 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. We use cfs_b->hierarchical_quota to
> > > determine if the task requires the tick.
> > >
> > > Add check in pick_next_task_fair() as well since that is where
> > > we have a handle on the task that is actually going to be running.
> > >
> > > Add check in sched_can_stop_tick() to cover some edge cases such
> > > as nr_running going from 2->1 and the 1 remains the running task.
> >
> > These appear fine to me, except:
> >
> > > Add sched_feat HZ_BW (off by default) to control the tick_stop
> > > behavior.
> >
> > What was the thinking here? This means nobody will be using this -- why
> > would you want this default disabled?
> >
>
> That was just a hedge in case it caused issues. I'd probably have had to
> enable it in RHEL anyway. Using a feature was to make it inocuous when
> disabled. Would you prefer me to enable it or remove the sched_feat
> entirely? (or do you want to just switch that to true when you apply it?)
I've edited it to default enabled -- we can pull the feature flag
eventually I suppose.
Things didn't readily apply, so I've kicked at it a little. Should be in
queue/sched/core for the robots to chew on.
next prev parent reply other threads:[~2023-08-01 15:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 13:33 [PATCH v6 0/2] Fix nohz_full vs cfs bandwidth Phil Auld
2023-07-12 13:33 ` [PATCH v2 1/2] sched, cgroup: Restore meaning to hierarchical_quota Phil Auld
2023-07-12 22:09 ` Benjamin Segall
2023-07-13 13:23 ` Phil Auld
2023-07-13 20:12 ` Benjamin Segall
2023-07-13 23:27 ` Phil Auld
2023-07-14 12:57 ` [PATCH v3 " Phil Auld
2023-07-17 18:27 ` Tejun Heo
2023-07-18 12:57 ` Phil Auld
2023-07-18 13:25 ` Phil Auld
2023-08-09 19:34 ` [tip: sched/core] " tip-bot2 for Phil Auld
2023-07-12 13:33 ` [PATCH v6 2/2] Sched/fair: Block nohz tick_stop when cfs bandwidth in use Phil Auld
2023-07-12 22:11 ` Benjamin Segall
2023-07-13 13:25 ` Phil Auld
2023-07-31 22:49 ` Peter Zijlstra
2023-08-01 11:13 ` Phil Auld
2023-08-01 15:37 ` Peter Zijlstra [this message]
2023-08-02 14:20 ` Phil Auld
2023-08-09 19:34 ` [tip: sched/core] sched/fair: " tip-bot2 for Phil Auld
2023-07-31 15:17 ` [PATCH v6 0/2] Fix nohz_full vs cfs bandwidth Phil Auld
2023-07-31 16:38 ` Phil Auld
2023-07-31 17:23 ` Phil Auld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230801153731.GD11704@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome