From: NeilBrown <neilb@suse.com>
To: Mike Snitzer <snitzer@redhat.com>,
linux-block@vger.kernel.org, dm-devel@redhat.com
Subject: Re: [dm-devel] [LSF/MM TOPIC] block: extend generic biosets to allow per-device frontpad
Date: Fri, 02 Feb 2018 17:19:33 +1100 [thread overview]
Message-ID: <87zi4r29sa.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20180129213300.GC5744@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]
On Mon, Jan 29 2018, Mike Snitzer wrote:
> I'd like to enable bio-based DM to _not_ need to clone bios. But to do
> so each bio-based DM target's required per-bio-data would need to be
> provided by upper layer biosets (as opposed to the bioset DM currently
> creates).
>
> So my thinking is that all system-level biosets (e.g. fs_bio_set,
> blkdev_dio_pool) would redirect to a device specific variant bioset IFF
> the underlying device advertises the need for a specific per-bio-data
> payload to be provided.
>
> I know this _could_ become a rathole but I'd like to avoid reverting DM
> back to the days of having to worry about managing mempools for the
> purpose of per-io allocations. I've grown spoiled by the performance
> and elegance that comes with having the bio and per-bio-data allocated
> from the same bioset.
>
> Thoughts?
md/raid0 remaps each bio and passes it directly down to one of several
devices.
I think your scheme would mean that it would need to clone each bio to
make sure it is from the correctly sized pool.
I suspect it could be made to work though.
1/ have a way for the driver receiving a bio to discover how much
frontpad was allocated.
2/ require drivers to accept bios with any size of frontpad, but a
fast-path is taken if it is already big enough.
3/ allow a block device to advertise it's preferred frontpad.
4/ make sure your config-change-notification mechanism can communicate
changes to this number.
5/ gather statistics on what percentage of bios have a too-small
frontpad.
Then start modifying places that allocate bios to use the hint,
and when benchmarks show the percentage is high - use it to encourage
other people to allocate better bios.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-02-02 9:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 21:33 [LSF/MM TOPIC] block: extend generic biosets to allow per-device frontpad Mike Snitzer
2018-02-02 6:19 ` NeilBrown [this message]
2018-02-02 16:08 ` Mike Snitzer
2018-02-02 22:55 ` 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=87zi4r29sa.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=dm-devel@redhat.com \
--cc=linux-block@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).