From: Peter Zijlstra <peterz@infradead.org>
To: Josh Don <joshdon@google.com>
Cc: "Aaron Lu" <aaron.lu@intel.com>, "Ingo Molnar" <mingo@redhat.com>,
"Juri Lelli" <juri.lelli@redhat.com>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Ben Segall" <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
"Daniel Bristot de Oliveira" <bristot@redhat.com>,
"Valentin Schneider" <vschneid@redhat.com>,
linux-kernel@vger.kernel.org, "Tejun Heo" <tj@kernel.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Christian Brauner" <brauner@kernel.org>,
"Zefan Li" <lizefan.x@bytedance.com>
Subject: Re: [PATCH v3] sched: async unthrottling for cfs bandwidth
Date: Thu, 24 Nov 2022 10:12:43 +0100 [thread overview]
Message-ID: <Y381i3/BwtW6edlS@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CABk29Ntdztkv4jT87vFgTtC99d49iUu9CcHPruh9MxDazaAW7A@mail.gmail.com>
On Tue, Nov 22, 2022 at 11:41:04AM -0800, Josh Don wrote:
> > > + */
> > > + if (local_unthrottle) {
> > > + rq = cpu_rq(this_cpu);
> > > + rq_lock_irqsave(rq, &rf);
> >
> > Should we add:
> > if (cfs_rq_throttled(local_unthrottle))
> >
> > before calling into unthrottle_cfs_rq_async(local_unthrottle) to avoid a
> > potential WARN?
> >
> > As for whether the local cfs_rq can be unthrottled now after rq lock is
> > re-acquired, I suppose it can be. e.g. another user sets a new quota to
> > this task group during the window of rq lock gets dropped in the above
> > loop and re-acquired here IIUC.
> >
> > > + unthrottle_cfs_rq_async(local_unthrottle);
> > > + rq_unlock_irqrestore(rq, &rf);
> > > + }
> > > +
> > > return throttled;
> > > }
>
> Yes, we should add that check due to the case you described with a
> user concurrently configuring bandwidth. And as long as we're doing
> that, we might as well make this unthrottle_cfs_rq() instead and snip
> the comment. Peter, would you mind adding that delta?
Done, should be pushed into the queue.git thing momentarily.
next prev parent reply other threads:[~2022-11-24 9:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 0:54 [PATCH v3] sched: async unthrottling for cfs bandwidth Josh Don
2022-11-18 12:47 ` Peter Zijlstra
2022-11-18 19:25 ` Josh Don
2022-11-20 2:22 ` Chengming Zhou
2022-11-21 11:58 ` Peter Zijlstra
2022-11-21 19:37 ` Josh Don
2022-11-22 10:35 ` Peter Zijlstra
2022-11-25 8:57 ` Peter Zijlstra
2022-11-25 8:59 ` Peter Zijlstra
2022-11-25 9:12 ` Peter Zijlstra
2022-11-29 1:38 ` Josh Don
2022-11-29 1:32 ` Josh Don
2022-11-21 12:34 ` Peter Zijlstra
2022-11-21 18:02 ` Michal Koutný
2022-11-21 19:31 ` Josh Don
2022-11-22 5:55 ` Aaron Lu
2022-11-22 10:30 ` Peter Zijlstra
2022-11-22 6:08 ` Aaron Lu
2022-11-22 19:41 ` Josh Don
2022-11-24 9:12 ` Peter Zijlstra [this message]
2022-12-27 12:13 ` [tip: sched/core] sched: Async " tip-bot2 for Josh Don
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=Y381i3/BwtW6edlS@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=aaron.lu@intel.com \
--cc=brauner@kernel.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mkoutny@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.