From: Hui Su <sh_def@163.com>
To: Rafael J. Wysocki <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
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>,
K Prateek Nayak <kprateek.nayak@amd.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] cpufreq: schedutil: Serialize start against rate limit updates
Date: Tue, 13 Oct 2026 10:32:02 +0900 [thread overview]
Message-ID: <179185512249.2280940.7181297775843011626@163.com> (raw)
In-Reply-To: <CAJZ5v0iHXc4+si4TspPB+oNyPNED+9s90B7VJwrMa91J6GOGCg@mail.gmail.com>
> But instead, I'd add a wrapper around sugov_update_rate_limit_us() that would do
>
> guard(mutex)(&sg_policy->tunables->attr_set->update_lock);
>
> before calling it and I'd invoke that wrapper from here.
>
> Also, the comment should explain why the locking is needed which it
> doesn't do now.
Agreed. I removed the generic gov_attr_set lock helpers and added a
schedutil-local wrapper using guard(mutex) around the raw update helper.
The comment now explains how an unsynchronized start can overwrite the
cached delay with a value derived from a stale rate_limit_us value.
rate_limit_us_store() continues to call the raw helper while holding
update_lock.
I'll send v3 separately.
Thanks,
Hui
next prev parent reply other threads:[~2026-10-13 1:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 15:58 Hui Su
2026-10-12 18:57 ` Rafael J. Wysocki (Intel)
2026-10-13 1:32 ` Hui Su [this message]
2026-10-13 11:26 ` Nirjhar Roy
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=179185512249.2280940.7181297775843011626@163.com \
--to=sh_def@163.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=vschneid@redhat.com \
--cc=zhongqiu.han@oss.qualcomm.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
all inboxes | Powered by JetHome®