lkml.org 
[lkml]   [2014]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch]blk-mq: suppress a warning

The warning is hit when cpu hotplug is running. After scheduler puts a cpu
online and before blk-mq mapping reinit, a task can queue a request and run the
queue. At that time the cpu isn't in hctx->cpumask, but the cpu is mapped into
hctx 0. When the race happens, hctx->cpumask doesn't set the cpu and
ctx->index_hw/hctx->nr_ctx isn't correct, but it doesn't cause any problem. So
just suppress the warning here.

Signed-off-by: Shaohua Li <shli@fusionio.com>

diff --git a/block/blk-mq.c b/block/blk-mq.c
index ad69ef6..22f314e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -724,7 +724,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
LIST_HEAD(rq_list);
int queued;

- WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask));
+ WARN_ON(q->mq_ops->map_queue(q, raw_smp_processor_id()) != hctx);

if (unlikely(test_bit(BLK_MQ_S_STOPPED, &hctx->state)))
return;

\
 
 \ /
  Last update: 2014-07-04 14:01    [W:0.082 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site