All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Sagi Grimberg <sagi@grimberg.me>, Jens Axboe <axboe@kernel.dk>,
	Hannes Reinecke <hare@suse.com>,
	Bart van Assche <bvanassche@acm.org>,
	Ming Lei <ming.lei@gmail.com>,
	neilb@suse.com, linux-nvme@lists.infradead.org,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Kent Overstreet <kent.overstreet@gmail.com>
Subject: Re: [PATCH] block: use static bio_set for bio_split() calls
Date: Thu, 25 Apr 2019 23:36:28 +0800	[thread overview]
Message-ID: <20190425153627.GA9825@ming.t460p> (raw)
In-Reply-To: <c6a54cea-f2ce-3344-efb1-ba8f20bf9509@suse.de>

On Thu, Apr 25, 2019 at 04:32:42PM +0200, Hannes Reinecke wrote:
> On 4/25/19 2:41 AM, Ming Lei wrote:
> > On Thu, Apr 25, 2019 at 06:14:22AM +0800, Ming Lei wrote:
> > > On Wed, Apr 24, 2019 at 10:20:46AM -0700, Sagi Grimberg wrote:
> > > > 
> > > > > per-queue bioset is used originally for avoiding deadlock, are you
> > > > > sure the static bioset is safe?
> > > > 
> > > > Can you explain this? I didn't find any indication of that in the change
> > > > log history...
> > > > 
> > > > Originally introduced by Kent:
> > > 
> > > bio split can be run from stacking drivers, for example, MD over NVMe,
> > > if the global reserved mempool is consumed by MD bio splitting, then
> > > no any progress can be made when splitting on bio submitted to NVMe.
> > > 
> > > Kent may have more details...
> > 
> > I guess it might be fine to use one shared global bio_set for all
> > lowest underlying queues, could be all queues except for loop, dm, md
> > , drbd, bcache, ...
> > 
> But wasn't the overall idea of stacking drivers that we propagate the queue
> limits up to the uppermost drivers, so that we have to do a split only at
> the upper layers?

For example, LVM over RAID, the limits of LVM queue is figured out and fixed
during creating LVM. However, new device may be added to the RAID. Then the
underlying queue's limit may not be propagated to LVM's queue's limit.

And we did discuss the topic of 'block: dm: restack queue_limits'
before, looks not see any progress made.

Also loop doesn't consider stack limits at all.

> Furthermore, it's not every bio which needs to be split, only those which
> straddle some device limitations.
> The only ones not being able to propagate the queue limits is MD, and that
> is already using a private bio_set here.

If DM and the lowest queue share one same bio_set(mem_pool), it isn't
enough for MD to use private bio_set.

> 
> I've worked on a patchset to provide a separate bio set for each of the
> stacking drivers, but the interface I've been able to come up with is not
> very nice, and I really doubt it's worth it.
> 
> So I'd advocate to test with this patch first, and only provide individual
> biosets once we find it's an issue.

The above issue of LVM over RAID was a real one reported inside Red Hat.


Thanks,
Ming

WARNING: multiple messages have this Message-ID (diff)
From: ming.lei@redhat.com (Ming Lei)
Subject: [PATCH] block: use static bio_set for bio_split() calls
Date: Thu, 25 Apr 2019 23:36:28 +0800	[thread overview]
Message-ID: <20190425153627.GA9825@ming.t460p> (raw)
In-Reply-To: <c6a54cea-f2ce-3344-efb1-ba8f20bf9509@suse.de>

On Thu, Apr 25, 2019@04:32:42PM +0200, Hannes Reinecke wrote:
> On 4/25/19 2:41 AM, Ming Lei wrote:
> > On Thu, Apr 25, 2019@06:14:22AM +0800, Ming Lei wrote:
> > > On Wed, Apr 24, 2019@10:20:46AM -0700, Sagi Grimberg wrote:
> > > > 
> > > > > per-queue bioset is used originally for avoiding deadlock, are you
> > > > > sure the static bioset is safe?
> > > > 
> > > > Can you explain this? I didn't find any indication of that in the change
> > > > log history...
> > > > 
> > > > Originally introduced by Kent:
> > > 
> > > bio split can be run from stacking drivers, for example, MD over NVMe,
> > > if the global reserved mempool is consumed by MD bio splitting, then
> > > no any progress can be made when splitting on bio submitted to NVMe.
> > > 
> > > Kent may have more details...
> > 
> > I guess it might be fine to use one shared global bio_set for all
> > lowest underlying queues, could be all queues except for loop, dm, md
> > , drbd, bcache, ...
> > 
> But wasn't the overall idea of stacking drivers that we propagate the queue
> limits up to the uppermost drivers, so that we have to do a split only at
> the upper layers?

For example, LVM over RAID, the limits of LVM queue is figured out and fixed
during creating LVM. However, new device may be added to the RAID. Then the
underlying queue's limit may not be propagated to LVM's queue's limit.

And we did discuss the topic of 'block: dm: restack queue_limits'
before, looks not see any progress made.

Also loop doesn't consider stack limits at all.

> Furthermore, it's not every bio which needs to be split, only those which
> straddle some device limitations.
> The only ones not being able to propagate the queue limits is MD, and that
> is already using a private bio_set here.

If DM and the lowest queue share one same bio_set(mem_pool), it isn't
enough for MD to use private bio_set.

> 
> I've worked on a patchset to provide a separate bio set for each of the
> stacking drivers, but the interface I've been able to come up with is not
> very nice, and I really doubt it's worth it.
> 
> So I'd advocate to test with this patch first, and only provide individual
> biosets once we find it's an issue.

The above issue of LVM over RAID was a real one reported inside Red Hat.


Thanks,
Ming

  reply	other threads:[~2019-04-25 15:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18 14:06 [PATCH] block: use static bio_set for bio_split() calls Hannes Reinecke
2019-04-18 14:06 ` Hannes Reinecke
2019-04-18 14:34 ` Ming Lei
2019-04-18 14:34   ` Ming Lei
2019-04-18 15:02   ` Hannes Reinecke
2019-04-18 15:02     ` Hannes Reinecke
2019-04-18 18:26     ` Edmund Nadolski (Microsoft)
2019-04-18 18:26       ` Edmund Nadolski (Microsoft)
2019-04-24 17:20   ` Sagi Grimberg
2019-04-24 17:20     ` Sagi Grimberg
2019-04-24 18:56     ` Hannes Reinecke
2019-04-24 18:56       ` Hannes Reinecke
2019-04-24 18:58       ` Sagi Grimberg
2019-04-24 18:58         ` Sagi Grimberg
2019-04-24 22:14     ` Ming Lei
2019-04-24 22:14       ` Ming Lei
2019-04-25  0:41       ` Ming Lei
2019-04-25  0:41         ` Ming Lei
2019-04-25 14:32         ` Hannes Reinecke
2019-04-25 14:32           ` Hannes Reinecke
2019-04-25 15:36           ` Ming Lei [this message]
2019-04-25 15:36             ` Ming Lei
2019-04-30 11:48             ` Hannes Reinecke
2019-04-30 11:48               ` Hannes Reinecke
2019-04-24 19:49 ` Bart Van Assche
2019-04-24 19:49   ` Bart Van Assche
2019-04-25  6:06   ` Hannes Reinecke
2019-04-25  6:06     ` Hannes Reinecke

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=20190425153627.GA9825@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@gmail.com \
    --cc=neilb@suse.com \
    --cc=sagi@grimberg.me \
    /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.