From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Jens Axboe <axboe@kernel.dk>,
dm-devel@redhat.com, Christoph Hellwig <hch@lst.de>,
Mike Snitzer <snitzer@redhat.com>,
Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH] dm-mpath: Improve handling of busy paths
Date: Thu, 21 Sep 2017 06:36:06 +0800 [thread overview]
Message-ID: <20170920223605.GC5105@ming.t460p> (raw)
In-Reply-To: <20170920181212.5532-1-bart.vanassche@wdc.com>
On Wed, Sep 20, 2017 at 11:12:12AM -0700, Bart Van Assche wrote:
> Instead of retrying request allocation after a delay if a path is
> busy, wait until the underlying path has completed a request. This
> patch avoids that submission of requests to busy paths is delayed and
> hence creates more opportunities for merging sequential I/O requests.
Could you provide some test data with this change?
>
> Reported-by: Ming Lei <ming.lei@redhat.com>
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Ming Lei <ming.lei@redhat.com>
> ---
> drivers/md/dm-mpath.c | 10 +++++++++-
> drivers/md/dm-rq.c | 3 ++-
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 11f273d2f018..b60ef655fa0c 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -495,7 +495,13 @@ static int multipath_clone_and_map(struct dm_target *ti, struct request *rq,
>
> bdev = pgpath->path.dev->bdev;
> q = bdev_get_queue(bdev);
> - clone = blk_get_request(q, rq->cmd_flags | REQ_NOMERGE, GFP_ATOMIC);
> + /*
> + * For blk-mq this code is called from inside dm_mq_queue_rq() and
> + * sleeping is allowed due to BLK_MQ_F_BLOCKING. For the legacy block
> + * layer this code is called from workqueue context. Hence unlocking
> + * and reacquiring the queue lock is not necessary.
> + */
> + clone = blk_get_request(q, rq->cmd_flags | REQ_NOMERGE, GFP_NOIO);
Actually with GFP_ATOMIC, dispatch in dm-rq can't move on and no request
will be dequeued from IO scheduler queue if this allocation fails, that
means IO merge is still working at that time if the patchset of
'blk-mq-sched: improve SCSI-MQ performance' is applied.
As my test done, the sequential I/O performance is still not good
even though the patchset is applied.
That isn't strange because queue depth of IO scheduler queue can be
much bigger than either q->queue_depth or .cmd_per_lun, that means
the underlying queue has been busy for a while before the allocation
fails.
So this approach may not work well in theory.
--
Ming
next prev parent reply other threads:[~2017-09-20 22:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 18:12 [PATCH] dm-mpath: Improve handling of busy paths Bart Van Assche
2017-09-20 18:56 ` Mike Snitzer
2017-09-20 20:36 ` Bart Van Assche
2017-09-20 22:36 ` Ming Lei [this message]
2017-09-20 23:26 ` [PATCH] " Bart Van Assche
2017-09-21 1:41 ` Ming Lei
2017-09-21 15:53 ` Bart Van Assche
2017-09-21 22:58 ` Ming Lei
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=20170920223605.GC5105@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=dm-devel@redhat.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--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.