Skip to content

Commit 80e9e54

Browse files
biger410Somasundaram Krishnasamy
authored andcommitted
block-mq: fix hung due to too much warning log
When doing cpu online/offline, sometimes this warning will be triggered, it is harmless, the io will be dispatched. Just sometimes it warns too much that could hung the whole system. So ratelimit it. Orabug: 30544814 Signed-off-by: Junxiao Bi <[email protected]> Reviewed-by: Joe Jin <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent 44070a4 commit 80e9e54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-mq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
12121212
* handle dispatched requests to this hctx
12131213
*/
12141214
if (!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) &&
1215-
cpu_online(hctx->next_cpu)) {
1215+
cpu_online(hctx->next_cpu) && printk_ratelimit()) {
12161216
printk(KERN_WARNING "run queue from wrong CPU %d, hctx %s\n",
12171217
raw_smp_processor_id(),
12181218
cpumask_empty(hctx->cpumask) ? "inactive": "active");

0 commit comments

Comments
 (0)