public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched_ext: Remove redundant rcu_read_lock/unlock() in sysrq_handle_sched_ext_reset()
@ 2026-04-30  8:45 Zqiang
  2026-05-03 13:10 ` Cheng-Yang Chou
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Zqiang @ 2026-04-30  8:45 UTC (permalink / raw)
  To: tj, void, arighi, changwoo; +Cc: sched-ext, linux-kernel, qiang.zhang

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
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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-04 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-05-04  5:17 ` Andrea Righi
2026-05-04  5:24   ` Andrea Righi
2026-05-04 21:05 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox