From: Zqiang <qiang.zhang@linux.dev>
To: tj@kernel.org, jiangshanlai@gmail.com
Cc: linux-kernel@vger.kernel.org, qiang.zhang@linux.dev
Subject: [PATCH] workqueue: Remove rcu_read_lock/unlock() in wq_watchdog_timer_fn()
Date: Thu, 4 Sep 2025 19:31:33 +0800 [thread overview]
Message-ID: <20250904113133.24487-2-qiang.zhang@linux.dev> (raw)
In-Reply-To: <20250904113133.24487-1-qiang.zhang@linux.dev>
The wq_watchdog_timer_fn() is executed in the softirq context, this
is already in the RCU read critical section, this commit therefore
remove rcu_read_lock/unlock() in wq_watchdog_timer_fn().
Signed-off-by: Zqiang <qiang.zhang@linux.dev>
---
kernel/workqueue.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 831754e90071..63b2685c2cb4 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -7544,8 +7544,6 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
if (!thresh)
return;
- rcu_read_lock();
-
for_each_pool(pool, pi) {
unsigned long pool_ts, touched, ts;
@@ -7587,8 +7585,6 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
}
- rcu_read_unlock();
-
if (lockup_detected)
show_all_workqueues();
--
2.17.1
next prev parent reply other threads:[~2025-09-04 11:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 11:31 [PATCH] workqueue: Remove redundant rcu_read_lock/unlock() in workqueue_congested() Zqiang
2025-09-04 11:31 ` Zqiang [this message]
2025-09-04 16:18 ` [PATCH] workqueue: Remove rcu_read_lock/unlock() in wq_watchdog_timer_fn() Tejun Heo
2025-09-04 16:18 ` [PATCH] workqueue: Remove redundant rcu_read_lock/unlock() in workqueue_congested() 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=20250904113133.24487-2-qiang.zhang@linux.dev \
--to=qiang.zhang@linux.dev \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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