From: Benjamin Segall <bsegall@google.com>
To: Hongyan Xia <hongyan.xia@transsion.com>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"mgorman@suse.de" <mgorman@suse.de>,
"vschneid@redhat.com" <vschneid@redhat.com>,
"kprateek.nayak@amd.com" <kprateek.nayak@amd.com>,
Jiazi Li <jiazi.li@transsion.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] sched/fair: Move __cfs_bandwidth_used to new static key API
Date: Tue, 21 Jul 2026 14:02:33 -0700 [thread overview]
Message-ID: <xm26o6g03vkm.fsf@google.com> (raw)
In-Reply-To: <e935ee1cacf7796bca7720f67cc13ec856a5d4ea.1784538478.git.hongyan.xia@transsion.com> (Hongyan Xia's message of "Mon, 20 Jul 2026 09:38:04 +0000")
Hongyan Xia <hongyan.xia@transsion.com> writes:
> From: Hongyan Xia <hongyan.xia@transsion.com>
>
> Using struct static_key directly is deprecated. Fix.
>
> No functional change.
>
> Signed-off-by: Hongyan Xia <hongyan.xia@transsion.com>
Reviewed-By: Ben Segall <bsegall@google.com>
> ---
> kernel/sched/fair.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 422284fb815f..e03c2610d2c3 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6442,21 +6442,21 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
> #ifdef CONFIG_CFS_BANDWIDTH
>
> #ifdef CONFIG_JUMP_LABEL
> -static struct static_key __cfs_bandwidth_used;
> +static DEFINE_STATIC_KEY_FALSE(__cfs_bandwidth_used);
>
> static inline bool cfs_bandwidth_used(void)
> {
> - return static_key_false(&__cfs_bandwidth_used);
> + return static_branch_unlikely(&__cfs_bandwidth_used);
> }
>
> void cfs_bandwidth_usage_inc(void)
> {
> - static_key_slow_inc_cpuslocked(&__cfs_bandwidth_used);
> + static_branch_inc_cpuslocked(&__cfs_bandwidth_used);
> }
>
> void cfs_bandwidth_usage_dec(void)
> {
> - static_key_slow_dec_cpuslocked(&__cfs_bandwidth_used);
> + static_branch_dec_cpuslocked(&__cfs_bandwidth_used);
> }
> #else /* !CONFIG_JUMP_LABEL: */
> static bool cfs_bandwidth_used(void)
next prev parent reply other threads:[~2026-07-21 21:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 9:38 [PATCH 0/3] Remove deprecated static key API in scheduler code Hongyan Xia
2026-07-20 9:38 ` Hongyan Xia
2026-07-20 9:38 ` [PATCH 1/3] sched/fair: Move __cfs_bandwidth_used to new static key API Hongyan Xia
2026-07-21 21:02 ` Benjamin Segall [this message]
2026-07-20 9:38 ` [PATCH 2/3] sched: Convert paravirt_steal to new static key APIs Hongyan Xia
2026-07-20 9:38 ` Hongyan Xia
2026-07-20 10:35 ` Jürgen Groß
2026-07-20 10:35 ` Jürgen Groß
2026-07-20 9:38 ` [PATCH 3/3] sched/feat: Use the new static key API for sched_feat Hongyan Xia
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=xm26o6g03vkm.fsf@google.com \
--to=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=hongyan.xia@transsion.com \
--cc=jiazi.li@transsion.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=peterz@infradead.org \
--cc=rostedt@goodmis.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.