From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-block@vger.kernel.org, dm-devel@redhat.com,
NeilBrown <neilb@suse.com>, Ming Lei <ming.lei@redhat.com>
Subject: Re: why does __split_and_process_bio use bio_clone_bioset?
Date: Thu, 14 Jun 2018 14:12:46 -0400 [thread overview]
Message-ID: <20180614181245.GA1161@redhat.com> (raw)
In-Reply-To: <20180614081947.GA23375@infradead.org>
On Thu, Jun 14 2018 at 4:19am -0400,
Christoph Hellwig <hch@infradead.org> wrote:
> Hi Neil,
>
> In commit 18a25da8 ("dm: ensure bio submission follows a depth-first
> tree walk") you've added a call to bio_clone_bioset to
> __split_and_process_bio. Unlike all other bio splitting code this
> actually allocates a new bio_vec array instead of just splitting the bio
> and the iterator. I can't actually find a good reason for that either
> in a cursory review of the code, the commit or the comments.
>
> Do you remember why this can't just use bio_clone_fast?
Your question caused me to revisit this code and it is suspect for a
couple reasons:
1) I'm also not seeing why we need bio_clone_bioset()
- could be quirk of how the code is constructing shallow chains (all
chained to the same parent) but even that doesn't seem to explain
it. I'll just test using bio_clone_fast() and see what happens ;)
2) The final dm.c:end_io_acct() in terms of the smaller and smaller
clone bio looks prone to insufficient IO accounting.
3) I'm really not liking the mix of bio_chain refcount and DM's own
io->io_count in the DM endio path.
I'll work through all of this some more and let you know what I find
(hopefully by end of tomorrow).
Mike
WARNING: multiple messages have this Message-ID (diff)
From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: NeilBrown <neilb@suse.com>,
linux-block@vger.kernel.org, dm-devel@redhat.com,
Ming Lei <ming.lei@redhat.com>
Subject: Re: why does __split_and_process_bio use bio_clone_bioset?
Date: Thu, 14 Jun 2018 14:12:46 -0400 [thread overview]
Message-ID: <20180614181245.GA1161@redhat.com> (raw)
In-Reply-To: <20180614081947.GA23375@infradead.org>
On Thu, Jun 14 2018 at 4:19am -0400,
Christoph Hellwig <hch@infradead.org> wrote:
> Hi Neil,
>
> In commit 18a25da8 ("dm: ensure bio submission follows a depth-first
> tree walk") you've added a call to bio_clone_bioset to
> __split_and_process_bio. Unlike all other bio splitting code this
> actually allocates a new bio_vec array instead of just splitting the bio
> and the iterator. I can't actually find a good reason for that either
> in a cursory review of the code, the commit or the comments.
>
> Do you remember why this can't just use bio_clone_fast?
Your question caused me to revisit this code and it is suspect for a
couple reasons:
1) I'm also not seeing why we need bio_clone_bioset()
- could be quirk of how the code is constructing shallow chains (all
chained to the same parent) but even that doesn't seem to explain
it. I'll just test using bio_clone_fast() and see what happens ;)
2) The final dm.c:end_io_acct() in terms of the smaller and smaller
clone bio looks prone to insufficient IO accounting.
3) I'm really not liking the mix of bio_chain refcount and DM's own
io->io_count in the DM endio path.
I'll work through all of this some more and let you know what I find
(hopefully by end of tomorrow).
Mike
next prev parent reply other threads:[~2018-06-14 18:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 8:19 why does __split_and_process_bio use bio_clone_bioset? Christoph Hellwig
2018-06-14 8:19 ` Christoph Hellwig
2018-06-14 18:12 ` Mike Snitzer [this message]
2018-06-14 18:12 ` Mike Snitzer
2018-06-14 20:08 ` Mike Snitzer
2018-06-14 23:34 ` NeilBrown
2018-06-14 23:34 ` [dm-devel] " NeilBrown
2018-06-15 7:38 ` Christoph Hellwig
2018-06-15 7:38 ` [dm-devel] " Christoph Hellwig
2018-06-15 18:26 ` Mike Snitzer
2018-06-15 18:26 ` Mike Snitzer
2018-06-16 15:20 ` Christoph Hellwig
2018-06-16 15:20 ` 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=20180614181245.GA1161@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=neilb@suse.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.