From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: axboe@kernel.dk, Mike Snitzer <snitzer@kernel.org>,
linux-block@vger.kernel.org, dm-devel@redhat.com, tj@kernel.org,
Dennis Zhou <dennis@kernel.org>
Subject: Re: [dm-devel] can we reduce bio_set_dev overhead due to bio_associate_blkg?
Date: Fri, 8 Apr 2022 11:42:51 -0400 [thread overview]
Message-ID: <YlBX+ytxxeSj2neQ@redhat.com> (raw)
In-Reply-To: <YkVxLN9p0t6DI5ie@infradead.org>
On Thu, Mar 31 2022 at 5:15P -0400,
Christoph Hellwig <hch@infradead.org> wrote:
> On Wed, Mar 30, 2022 at 10:52:13PM -0700, Dennis Zhou wrote:
> > I took a quick look. It seems with the new interface,
> > bio_clone_blkg_association() is unnecessary given the correct
> > association should be derived from the bio_alloc*() calls with the
> > passed in bdev. Also, blkcg_bio_issue_init() in clone seems wrong.
>
> Yes, I think you are right.
>
> > Maybe the right thing to do here for md-linear and btrfs (what I've
> > looked at) is to delay cloning until the map occurs and the right device
> > is already in hand?
>
> That would in general be the preferred option where possible.
Delaying cloning until remap is a problem for DM given the target_type
->map interface for all DM targets assumes the passed bio is already a
clone that needs to be remapped accordingly.
I think we can achieve the goal of efficient cloning/remapping for
both usecases simply by splitting out the bio_set_dev() and leaving it
to the caller to pick which interface to use (e.g. clone vs
clone_and_remap).
Christoph is this something you're open to doing as continuation of
your bio alloc/clone related audit/changes? Or would you prefer
someone else deal with it? I could take a closer look next week if
needed.
Mike
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2022-04-08 15:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 16:52 [dm-devel] can we reduce bio_set_dev overhead due to bio_associate_blkg? Mike Snitzer
2022-03-30 12:28 ` Dennis Zhou
2022-03-31 4:39 ` Christoph Hellwig
2022-03-31 5:52 ` Dennis Zhou
2022-03-31 9:15 ` Christoph Hellwig
2022-04-08 15:42 ` Mike Snitzer [this message]
2022-04-09 5:15 ` Christoph Hellwig
2022-04-11 16:58 ` Mike Snitzer
2022-04-11 17:16 ` Mike Snitzer
2022-04-11 17:33 ` [dm-devel] [PATCH] block: remove redundant blk-cgroup init from __bio_clone Mike Snitzer
2022-04-12 5:27 ` Christoph Hellwig
2022-04-12 7:52 ` Dennis Zhou
2022-04-23 16:55 ` Christoph Hellwig
2022-04-26 17:30 ` [dm-devel] " 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=YlBX+ytxxeSj2neQ@redhat.com \
--to=snitzer@redhat.com \
--cc=axboe@kernel.dk \
--cc=dennis@kernel.org \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=snitzer@kernel.org \
--cc=tj@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