From: Jeff Moyer <jmoyer@redhat.com>
To: Jens Axboe <jaxboe@fb.com>, Shaohua Li <shli@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] blk-mq: suppress a warning
Date: Tue, 06 Jan 2015 11:04:17 -0500 [thread overview]
Message-ID: <x494ms3evzy.fsf@segfault.boston.devel.redhat.com> (raw)
Jens,
Is there any reason the following patch from Shaohua didn't go in? We
are hitting this WARN_ON during hotplug testing, and this patch fixes
the problem. The previous posting is located here:
http://linux-kernel.2935.n7.nabble.com/patch-blk-mq-suppress-a-warning-td895340.html
Cheers,
Jeff
From: Shaohua Li <shli@kernel.org>
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@kernel.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
diff --git a/block/blk-mq.c b/block/blk-mq.c
index da1ab56..491beb7 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -702,7 +702,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
struct list_head *dptr;
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:[~2015-01-06 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-06 16:04 Jeff Moyer [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-07-04 11:26 [patch]blk-mq: " Shaohua Li
2014-07-04 15:35 ` Jens Axboe
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=x494ms3evzy.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=jaxboe@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shli@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
Powered by JetHome