From: Peter Zijlstra <peterz@infradead.org>
To: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Aaron Lu <ziqianlu@bytedance.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>,
Valentin Schneider <vschneid@redhat.com>,
Josh Don <joshdon@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] sched/fair: Call update_curr() before unthrottling the hierarchy
Date: Mon, 1 Jun 2026 13:27:52 +0200 [thread overview]
Message-ID: <20260601112752.GR3493090@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <a0a942c4-98e3-4e13-b481-43045641cabe@amd.com>
On Mon, Jun 01, 2026 at 11:20:30AM +0530, K Prateek Nayak wrote:
> Hello Aaron,
>
> On 6/1/2026 9:22 AM, Aaron Lu wrote:
> >> Since all callers of unthrottle_cfs_rq(), except one, already update the
> >> rq_clock and call rq_clock_start_loop_update(), move the
> >> update_rq_clock() in unthrottle_cfs_rq() to the lonely caller that
> >> doesn't update the rq_clock.
> >
> > Looks like there is one more path that doesn't have clock updated:
> > cpu_max_write() -> tg_set_bandwidth() -> tg_set_cfs_bandwidth() ->
> > unthrottle_cfs_rq().
>
> Woops! Completely missed that. Thank you for pointing it out. I'll
> add an update_rq_clock() there too once we grab the rq_lock.
Like this?
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -9830,6 +9830,7 @@ static int tg_set_cfs_bandwidth(struct t
struct rq *rq = cfs_rq->rq;
guard(rq_lock_irq)(rq);
+ update_rq_clock();
cfs_rq->runtime_enabled = runtime_enabled;
cfs_rq->runtime_remaining = 1;
next prev parent reply other threads:[~2026-06-01 11:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 9:48 [PATCH 0/5] sched/fair: Allow account_cfs_rq_runtime() to throttle current hierarchy K Prateek Nayak
2026-05-28 9:48 ` [PATCH 1/5] sched/fair: Convert cfs bandwidth throttling to use guards K Prateek Nayak
2026-05-28 21:46 ` Benjamin Segall
2026-05-28 9:48 ` [PATCH 2/5] sched/fair: Use throttled_csd_list for local unthrottle K Prateek Nayak
2026-05-28 21:53 ` Benjamin Segall
2026-05-28 9:48 ` [PATCH 3/5] sched/fair: Call update_curr() before unthrottling the hierarchy K Prateek Nayak
2026-05-28 22:03 ` Benjamin Segall
2026-06-01 3:52 ` Aaron Lu
2026-06-01 5:50 ` K Prateek Nayak
2026-06-01 11:27 ` Peter Zijlstra [this message]
2026-06-02 6:33 ` K Prateek Nayak
2026-05-28 9:48 ` [PATCH 4/5] sched/fair: Move the throttled tasks to a local list in tg_unthrottle_up() K Prateek Nayak
2026-05-28 22:14 ` Benjamin Segall
2026-05-28 9:48 ` [PATCH 5/5] sched/fair: Unify cfs_rq throttling via account_cfs_rq_runtime() K Prateek Nayak
2026-05-28 22:44 ` Benjamin Segall
2026-06-01 13:48 ` Peter Zijlstra
2026-06-02 7:01 ` K Prateek Nayak
2026-06-02 8:32 ` Peter Zijlstra
2026-06-02 8:57 ` K Prateek Nayak
2026-05-28 11:45 ` [PATCH 0/5] sched/fair: Allow account_cfs_rq_runtime() to throttle current hierarchy Peter Zijlstra
2026-06-01 6:18 ` Aaron Lu
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=20260601112752.GR3493090@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=ziqianlu@bytedance.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