From: Cheng-Yang Chou <yphbchou0911@gmail.com>
To: Zqiang <qiang.zhang@linux.dev>
Cc: tj@kernel.org, void@manifault.com, arighi@nvidia.com,
changwoo@igalia.com, sched-ext@lists.linux.dev,
linux-kernel@vger.kernel.org,
Ching-Chun Huang <jserv@ccns.ncku.edu.tw>,
Chia-Ping Tsai <chia7712@gmail.com>
Subject: Re: [PATCH] sched_ext: Remove redundant rcu_read_lock/unlock() in sysrq_handle_sched_ext_reset()
Date: Sun, 3 May 2026 21:10:59 +0800 [thread overview]
Message-ID: <20260503210256.G4259@cchengyang.duckdns.org> (raw)
In-Reply-To: <20260430084543.25137-1-qiang.zhang@linux.dev>
Hi Zqiang,
On Thu, Apr 30, 2026 at 04:45:43PM +0800, Zqiang wrote:
> The sysrq_handle_sched_ext_reset() callback has already been
> executed in the rcu read critical section within __handle_sysrq(),
> this commit therefore remove redundant rcu_read_lock/unlock() in
Nit: s/remove/removes
Looks good!
Reviewed-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
> the sysrq_handle_sched_ext_reset().
>
> Signed-off-by: Zqiang <qiang.zhang@linux.dev>
> ---
> kernel/sched/ext.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 45a2668284bc..0f3e9d088151 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -7953,13 +7953,11 @@ static void sysrq_handle_sched_ext_reset(u8 key)
> {
> struct scx_sched *sch;
>
> - rcu_read_lock();
> sch = rcu_dereference(scx_root);
> if (likely(sch))
> scx_disable(sch, SCX_EXIT_SYSRQ);
> else
> pr_info("sched_ext: BPF schedulers not loaded\n");
> - rcu_read_unlock();
> }
>
> static const struct sysrq_key_op sysrq_sched_ext_reset_op = {
> --
> 2.17.1
>
>
--
Cheers,
Cheng-Yang
next prev parent reply other threads:[~2026-05-03 13:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 8:45 [PATCH] sched_ext: Remove redundant rcu_read_lock/unlock() in sysrq_handle_sched_ext_reset() Zqiang
2026-05-03 13:10 ` Cheng-Yang Chou [this message]
2026-05-04 5:17 ` Andrea Righi
2026-05-04 5:24 ` Andrea Righi
2026-05-04 21:05 ` Tejun Heo
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=20260503210256.G4259@cchengyang.duckdns.org \
--to=yphbchou0911@gmail.com \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=chia7712@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=qiang.zhang@linux.dev \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=void@manifault.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