mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wang Shuaiwei <wangshuaiwei1@xiaomi.com>
To: Frederic Weisbecker <frederic@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>, Jens Axboe <axboe@kernel.dk>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	<wanghui33@xiaomi.com>, Wang Shuaiwei <wangshuaiwei1@xiaomi.com>,
	<linux-kernel@vger.kernel.org>, <linux-block@vger.kernel.org>
Subject: [PATCH] tick/block: Add BLOCK_SOFTIRQ to the hotplug safe mask
Date: Fri, 4 Sep 2026 14:45:06 +0800	[thread overview]
Message-ID: <20260904064506.671203-1-wangshuaiwei1@xiaomi.com> (raw)

During CPU-hotplug stress testing combined with an I/O
workload, the following message is observed:

  "NOHZ tick-stop error: local softirq work is pending, handler #10!!!"

On CPU offline, ksoftirqd is parked at CPUHP_AP_SMPBOOT_THREADS while
the CPU still takes interrupts. A block completion raised after that
point stays pending, and if the dying CPU goes idle before teardown,
report_idle_softirq() sees it, keeps the tick alive and prints the
error above.

Such pending block completions on the outgoing CPU are drained later by
blk_softirq_cpu_dead() (CPUHP_BLOCK_SOFTIRQ_DEAD), so a pending
BLOCK_SOFTIRQ is harmless here. Add it to SOFTIRQ_HOTPLUG_SAFE_MASK
like the other teardown-covered vectors.

Signed-off-by: Wang Shuaiwei <wangshuaiwei1@xiaomi.com>
---
 include/linux/interrupt.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 3bf969ad8fe0..52bb684090c0 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -573,9 +573,11 @@ enum
  * _ IRQ_POLL: irq_poll_cpu_dead() migrates the queue
  *
  * _ (HR)TIMER_SOFTIRQ: (hr)timers_dead_cpu() migrates the queue
+ *
+ * _ BLOCK_SOFTIRQ: blk_softirq_cpu_dead() completes the remaining requests
  */
-#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(TIMER_SOFTIRQ) | BIT(IRQ_POLL_SOFTIRQ) |\
-				   BIT(HRTIMER_SOFTIRQ) | BIT(RCU_SOFTIRQ))
+#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(TIMER_SOFTIRQ) | BIT(BLOCK_SOFTIRQ) |\
+				   BIT(IRQ_POLL_SOFTIRQ) | BIT(HRTIMER_SOFTIRQ) | BIT(RCU_SOFTIRQ))
 
 
 /* map softirq index to softirq name. update 'softirq_to_name' in
-- 
2.43.0


             reply	other threads:[~2026-09-04  6:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  6:45 Wang Shuaiwei [this message]
2026-09-17  9:30 ` Wang Shuaiwei
2026-09-17  9:51 ` Sebastian Andrzej Siewior
2026-09-18 10:39   ` Wang Shuaiwei
2026-09-18 12:42 ` Frederic Weisbecker
2026-09-19 21:05 ` [tip: timers/nohz] tick/nohz: " tip-bot2 for Wang Shuaiwei
2026-10-20 21:51   ` Thomas Gleixner

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=20260904064506.671203-1-wangshuaiwei1@xiaomi.com \
    --to=wangshuaiwei1@xiaomi.com \
    --cc=axboe@kernel.dk \
    --cc=bigeasy@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=wanghui33@xiaomi.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®