From: Junichi Nomura <j-nomura@ce.jp.nec.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
Hannes Reinecke <hare@suse.de>
Subject: Re: dm-multipath test scripts
Date: Mon, 22 Feb 2016 09:51:28 +0000 [thread overview]
Message-ID: <56CADA20.7050209@ce.jp.nec.com> (raw)
In-Reply-To: <20160220061247.GA23333@redhat.com>
On 02/20/16 15:12, Mike Snitzer wrote:
> On Fri, Feb 19 2016 at 2:42pm -0500, Mike Snitzer <snitzer@redhat.com> wrote:
>> Have you been running with blk-mq?
>> Either by setting CONFIG_DM_MQ_DEFAULT or:
>> echo Y > /sys/module/dm_mod/parameters/use_blk_mq
>>
>> I'm seeing test_02_sdev_delete fail with blk-mq enabled.
>
> I only see failure if I stack dm-mq ontop of old non-mq scsi devices with:
>
> echo N > /sys/module/scsi_mod/parameters/use_blk_mq
> echo Y > /sys/module/dm_mod/parameters/use_blk_mq
Ah, I didn't test that combination. I can see the failure, too.
> But this makes me think the novelty of having dm-mq support stacking on
> non-blk-mq devices was misplaced. It is a senseless config. I'll
> probably remove support for such stacking soon (next week).
Looking at the failure, I suspect it could be a common issue of dm-mq
regardless of underlying device type.
When requeueing, following calls happen in dm-mq:
dm_requeue_original_request() {
..
blk_mq_requeue_request(rq);
blk_mq_kick_requeue_list(rq->q);
then from block workqueue:
blk_mq_requeue_work() {
..
blk_mq_start_hw_queue(q);
and blk_mq_start_hw_queue() re-starts the queue even if DM has
stopped it for suspending. As a result, dm-mq ends up repeating
submit-error-requeue forever and suspend never completes. Or,
suspend somehow proceeds to clear DMF_NOFLUSH_SUSPENDING and
I/O error may directly be returned to submitter.
Attached patch fixes the problem for DM. But given the code comment,
there should be call sites which depend on 'start-if-stopped' behavior
of blk_mq_requeue_work and we may need other solution.
--
Jun'ichi Nomura, NEC Corporation
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 56c0a72..bbfe936 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -481,11 +481,7 @@ static void blk_mq_requeue_work(struct work_struct *work)
blk_mq_insert_request(rq, false, false, false);
}
- /*
- * Use the start variant of queue running here, so that running
- * the requeue work will kick stopped queues.
- */
- blk_mq_start_hw_queues(q);
+ blk_mq_run_hw_queues(q, false);
}
void blk_mq_add_to_requeue_list(struct request *rq, bool at_head)
next prev parent reply other threads:[~2016-02-22 9:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 5:39 dm-multipath test scripts Junichi Nomura
2015-10-07 7:31 ` Johannes Thumshirn
2015-10-08 23:10 ` Junichi Nomura
2015-11-13 10:55 ` Johannes Thumshirn
2015-11-14 16:26 ` Mike Snitzer
2016-02-18 17:17 ` Mike Snitzer
2016-02-19 0:33 ` Junichi Nomura
2016-02-19 8:37 ` Junichi Nomura
2016-02-19 19:42 ` Mike Snitzer
2016-02-20 6:12 ` Mike Snitzer
2016-02-20 9:42 ` Hannes Reinecke
2016-02-20 15:13 ` [dm-devel] " Bart Van Assche
2016-02-20 16:34 ` Mike Snitzer
2016-02-22 9:51 ` Junichi Nomura [this message]
2016-02-22 15:09 ` why is blk-mq requeue foricbly kicking stopped queues? [was: Re: dm-multipath test scripts] Mike Snitzer
2016-02-23 1:34 ` Junichi Nomura
2016-02-23 3:43 ` Mike Snitzer
2016-02-24 19:37 ` dm-multipath test scripts Mike Snitzer
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=56CADA20.7050209@ce.jp.nec.com \
--to=j-nomura@ce.jp.nec.com \
--cc=dm-devel@redhat.com \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=snitzer@redhat.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 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.