From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>,
dm-devel@redhat.com, Alasdair Kergon <agk@redhat.com>
Subject: Re: [RFC PATCH 0/7] dm-mpath: Do not clone requests
Date: Thu, 5 Jun 2014 10:01:50 -0400 [thread overview]
Message-ID: <20140605140150.GB21684@redhat.com> (raw)
In-Reply-To: <20140605133626.GA7149@infradead.org>
On Thu, Jun 05 2014 at 9:36am -0400,
Christoph Hellwig <hch@infradead.org> wrote:
> Oh, you're not even cloning the request. I though you'd just avoid
> cloning the bios. Passing the requests through isn't going to work
> when sitting on top of a blk-mq driver.
>
> I have a queue I'm trying to start to test now that approaches this
> a little bit differently:
>
> - request based dm is converted to use blk-mq itself, allowing us to
> allocate private data as part of the incoming request, and gets
> rid of the nasty prep_fn/request_fn split
> - it then just allocates a new request on the underlying device after
> chosing the path. By using blk_get_request to allocate the lower
> request dm-mpath doesn't care if the underlying device uses blk-mq
> or not.
Interested to know how you'll ensure we'll never block on
blk_get_request() waiting for memory? (something beyond gfp flags, more
context below).
> As said I'm already running into issues with plain dm mpath in my
> trivial test setup, so this is stalled for the moment.
>
> But I'd still love to understand why dm even bothers cloning the bios.
> At the request layer we only touch the bios in two places: first
> for merging in into the request, and second in blk_update_request.
Junichi may have more context on "why?". But the bio cloning is really
expensive, particularly due to the mempool reserves we keep on hand to
be able to avoid deadlock.
With the current rq-based DM we try to have enough memory available (per
DM device) to accomodate cloning a single request so that forward
progress can be made. But we don't know how many bios are associated
with a given request so our reserves _seem_ excessive to cover something
approaching worst case (but we fall short of covering even that as a
tradeoff).
> Now with dm-mpath we'd never want to do this sort of merging for the
> lower request anyway, and I don't see a real problem keeting the lower
> driver complete the bio and just never call blk_update_request in
> dm-mpath either. At least that's my impression that hasn't made contact
> with the ugly reality yet..
Definitely needs further review.
next prev parent reply other threads:[~2014-06-05 14:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 13:11 [RFC PATCH 0/7] dm-mpath: Do not clone requests Hannes Reinecke
2014-06-05 13:11 ` [PATCH 1/7] dm: use dm_rq_target_io as argument for dm_done() Hannes Reinecke
2014-06-05 13:11 ` [PATCH 2/7] dm: remove handling of DM_ENDIO_INCOMPLETE Hannes Reinecke
2014-06-05 13:11 ` [PATCH 3/7] dm: move rq_completed() out of enclosing functions Hannes Reinecke
2014-06-05 13:11 ` [PATCH 4/7] dm: open-code dm_kill_unmapped_request() Hannes Reinecke
2014-06-05 13:11 ` [PATCH 5/7] dm: move free_rq_clone() out of dm_unprep_request() Hannes Reinecke
2014-06-05 13:11 ` [PATCH 6/7] dm: open-code free_rq_clone() Hannes Reinecke
2014-06-05 13:11 ` [PATCH 7/7] dm: do not clone requests Hannes Reinecke
2014-06-05 13:36 ` [RFC PATCH 0/7] dm-mpath: Do " Christoph Hellwig
2014-06-05 13:55 ` Hannes Reinecke
2014-06-05 14:44 ` Christoph Hellwig
2014-06-06 5:25 ` Junichi Nomura
2014-06-05 14:01 ` Mike Snitzer [this message]
2014-06-05 14:40 ` Christoph Hellwig
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=20140605140150.GB21684@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=j-nomura@ce.jp.nec.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.