From: Shaohua Li <shli@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: axboe@fb.com
Subject: [patch]blk-mq: suppress a warning
Date: Fri, 4 Jul 2014 19:26:23 +0800 [thread overview]
Message-ID: <20140704112623.GA17435@kernel.org> (raw)
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;
next reply other threads:[~2014-07-04 11:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 11:26 Shaohua Li [this message]
2014-07-04 15:35 ` [patch]blk-mq: suppress a warning Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2015-01-06 16:04 [patch] blk-mq: " Jeff Moyer
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=20140704112623.GA17435@kernel.org \
--to=shli@kernel.org \
--cc=axboe@fb.com \
--cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.