From: Ming Lei <ming.lei@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH 3/6] block: move ->bio_split to the gendisk
Date: Thu, 28 Jul 2022 23:35:31 +0800 [thread overview]
Message-ID: <YuKswxbzK9OBirGr@T590> (raw)
In-Reply-To: <5323f3a1-14ac-eafb-3b5a-493fea2e86f5@suse.de>
On Thu, Jul 28, 2022 at 10:07:14AM +0200, Hannes Reinecke wrote:
> On 7/27/22 18:22, Christoph Hellwig wrote:
> > Only non-passthrough requests are split by the block layer and use the
> > ->bio_split bio_set. Move it from the request_queue to the gendisk.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> > Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> > ---
> > block/blk-core.c | 9 +--------
> > block/blk-merge.c | 7 ++++---
> > block/blk-sysfs.c | 2 --
> > block/genhd.c | 8 +++++++-
> > drivers/md/dm.c | 2 +-
> > include/linux/blkdev.h | 3 ++-
> > 6 files changed, 15 insertions(+), 16 deletions(-)
> >
> > diff --git a/block/blk-core.c b/block/blk-core.c
> > index 123468b9d2e43..59f13d011949d 100644
> > --- a/block/blk-core.c
> > +++ b/block/blk-core.c
> > @@ -377,7 +377,6 @@ static void blk_timeout_work(struct work_struct *work)
> > struct request_queue *blk_alloc_queue(int node_id, bool alloc_srcu)
> > {
> > struct request_queue *q;
> > - int ret;
> > q = kmem_cache_alloc_node(blk_get_queue_kmem_cache(alloc_srcu),
> > GFP_KERNEL | __GFP_ZERO, node_id);
> > @@ -396,13 +395,9 @@ struct request_queue *blk_alloc_queue(int node_id, bool alloc_srcu)
> > if (q->id < 0)
> > goto fail_srcu;
> > - ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, 0);
> > - if (ret)
> > - goto fail_id;
> > -
> > q->stats = blk_alloc_queue_stats();
> > if (!q->stats)
> > - goto fail_split;
> > + goto fail_id;
> > q->node = node_id;
> > @@ -439,8 +434,6 @@ struct request_queue *blk_alloc_queue(int node_id, bool alloc_srcu)
> > fail_stats:
> > blk_free_queue_stats(q->stats);
> > -fail_split:
> > - bioset_exit(&q->bio_split);
> > fail_id:
> > ida_free(&blk_queue_ida, q->id);
> > fail_srcu:
> > diff --git a/block/blk-merge.c b/block/blk-merge.c
> > index 6e29fb28584ef..30872a3537648 100644
> > --- a/block/blk-merge.c
> > +++ b/block/blk-merge.c
> > @@ -331,18 +331,19 @@ static struct bio *bio_split_rw(struct bio *bio, struct request_queue *q,
> > struct bio *__bio_split_to_limits(struct bio *bio, struct request_queue *q,
> > unsigned int *nr_segs)
> > {
> > + struct bio_set *bs = &bio->bi_bdev->bd_disk->bio_split;
> > struct bio *split;
>
> What happens for nvme-multipath?
> While I know that we shouldn't split on a path, experience shows that we
> _will_ do it eventually.
You mean contiguous bios should be mapped to one same path? If yes, at
least the current block layer can't do that, here dm-mapth is same with
nvme-mpath, since bio is always split first, and the split small bio
can be mapped to other path.
Thanks,
Ming
next prev parent reply other threads:[~2022-07-28 15:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 16:22 bio splitting cleanups v4 Christoph Hellwig
2022-07-27 16:22 ` [PATCH 1/6] block: change the blk_queue_split calling convention Christoph Hellwig
2022-07-27 16:29 ` Jens Axboe
2022-07-28 1:53 ` Damien Le Moal
2022-07-28 7:55 ` Hannes Reinecke
2022-07-27 16:22 ` [PATCH 2/6] block: change the blk_queue_bounce " Christoph Hellwig
2022-07-28 7:56 ` Hannes Reinecke
2022-07-27 16:22 ` [PATCH 3/6] block: move ->bio_split to the gendisk Christoph Hellwig
2022-07-28 8:07 ` Hannes Reinecke
2022-07-28 14:32 ` Christoph Hellwig
2022-07-28 15:35 ` Ming Lei [this message]
2022-07-27 16:22 ` [PATCH 4/6] block: move the call to get_max_io_size out of blk_bio_segment_split Christoph Hellwig
2022-07-28 8:08 ` Hannes Reinecke
2022-07-27 16:22 ` [PATCH 5/6] block: move bio_allowed_max_sectors to blk-merge.c Christoph Hellwig
2022-07-27 16:23 ` [PATCH 6/6] block: pass struct queue_limits to the bio splitting helpers Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2022-07-26 18:30 bio splitting cleanups v3 Christoph Hellwig
2022-07-26 18:30 ` [PATCH 3/6] block: move ->bio_split to the gendisk Christoph Hellwig
2022-07-23 6:28 bio splitting cleanups v2 Christoph Hellwig
2022-07-23 6:28 ` [PATCH 3/6] block: move ->bio_split to the gendisk 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=YuKswxbzK9OBirGr@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-block@vger.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;
as well as URLs for NNTP newsgroup(s).