From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Pavel Begunkov" <asml.silence@gmail.com>,
"Mike Snitzer" <snitzer@redhat.com>,
"Ryusuke Konishi" <konishi.ryusuke@gmail.com>,
"Konstantin Komarov" <almaz.alexandrovich@paragon-software.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Md . Haris Iqbal " <haris.iqbal@ionos.com>,
"Jack Wang" <jinpu.wang@ionos.com>,
"Roger Pau Monné" <roger.pau@citrix.co>,
"Philipp Reisner" <philipp.reisner@linbit.com>,
"Lars Ellenberg" <lars.ellenberg@linbit.com>,
linux-block@vger.kernel.org, dm-devel@redhat.com,
linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev,
xen-devel@lists.xenproject.org, drbd-dev@lists.linbit.com
Subject: improve the bio allocation interface
Date: Tue, 18 Jan 2022 08:19:33 +0100 [thread overview]
Message-ID: <20220118071952.1243143-1-hch@lst.de> (raw)
Hi Jens,
this series is posted early because it has wide-ranging changes and could use some
early ACKs before -rc1.
It changes the interface to the bio allocators to always pass a block_device and
the operation, which is information needed for every bio submitted through
bio_submit. This means the fields can be directly initialized in bio_init instead
of first being zeroed and thus should help to micro-optimize even better than the
__bio_set_dev that Pavel proposed while also cleaning up code.
I have a follow on series to also deal with the bio cloning interfaces that need
even more love, and additional cleanups for the callers which might be material
for the next merge window.
Diffstat:
block/bio.c | 73 ++++++++++++++++++++++++------------
block/blk-flush.c | 4 -
block/blk-lib.c | 32 ++-------------
block/blk-zoned.c | 14 +-----
block/blk.h | 2
block/bounce.c | 6 --
block/fops.c | 35 +++++++----------
drivers/block/drbd/drbd_actlog.c | 5 --
drivers/block/drbd/drbd_bitmap.c | 7 +--
drivers/block/drbd/drbd_receiver.c | 31 +++------------
drivers/block/floppy.c | 4 -
drivers/block/pktcdvd.c | 8 ---
drivers/block/rnbd/rnbd-srv-dev.c | 61 ------------------------------
drivers/block/rnbd/rnbd-srv-dev.h | 18 --------
drivers/block/rnbd/rnbd-srv.c | 45 ++++++++--------------
drivers/block/rnbd/rnbd-srv.h | 1
drivers/block/xen-blkback/blkback.c | 25 ++----------
drivers/block/zram/zram_drv.c | 16 ++-----
drivers/md/bcache/io.c | 3 -
drivers/md/bcache/journal.c | 16 ++-----
drivers/md/bcache/movinggc.c | 4 -
drivers/md/bcache/request.c | 18 +++-----
drivers/md/bcache/super.c | 8 +--
drivers/md/bcache/writeback.c | 4 -
drivers/md/dm-crypt.c | 27 ++++---------
drivers/md/dm-io.c | 5 --
drivers/md/dm-log-writes.c | 39 +++----------------
drivers/md/dm-snap.c | 21 ----------
drivers/md/dm-thin.c | 41 +++++---------------
drivers/md/dm-writecache.c | 7 +--
drivers/md/dm-zoned-metadata.c | 26 ++----------
drivers/md/dm.c | 12 ++---
drivers/md/md-multipath.c | 2
drivers/md/md.c | 24 +++++------
drivers/md/raid1.c | 8 +--
drivers/md/raid10.c | 14 ++----
drivers/md/raid5-cache.c | 19 +++------
drivers/md/raid5-ppl.c | 13 ++----
drivers/md/raid5.c | 12 ++---
drivers/nvdimm/nd_virtio.c | 6 +-
drivers/nvme/target/io-cmd-bdev.c | 18 +++-----
drivers/nvme/target/passthru.c | 7 +--
drivers/nvme/target/zns.c | 14 +++---
drivers/scsi/ufs/ufshpb.c | 4 -
drivers/target/target_core_iblock.c | 11 +----
fs/btrfs/disk-io.c | 10 +---
fs/btrfs/extent_io.c | 2
fs/buffer.c | 14 ++----
fs/crypto/bio.c | 13 ++----
fs/direct-io.c | 5 --
fs/erofs/zdata.c | 5 --
fs/ext4/page-io.c | 3 -
fs/ext4/readpage.c | 8 +--
fs/f2fs/data.c | 7 +--
fs/gfs2/lops.c | 8 +--
fs/gfs2/meta_io.c | 4 -
fs/gfs2/ops_fstype.c | 4 -
fs/hfsplus/wrapper.c | 4 -
fs/iomap/buffered-io.c | 26 +++++-------
fs/iomap/direct-io.c | 8 ---
fs/jfs/jfs_logmgr.c | 11 -----
fs/jfs/jfs_metapage.c | 9 +---
fs/mpage.c | 34 ++--------------
fs/nfs/blocklayout/blocklayout.c | 26 +-----------
fs/nilfs2/segbuf.c | 31 +--------------
fs/ntfs3/fsntfs.c | 27 -------------
fs/ocfs2/cluster/heartbeat.c | 4 -
fs/squashfs/block.c | 11 ++---
fs/xfs/xfs_bio_io.c | 14 ++----
fs/xfs/xfs_buf.c | 4 -
fs/xfs/xfs_log.c | 14 +++---
fs/zonefs/super.c | 9 +---
include/linux/bio.h | 30 ++++++--------
kernel/power/swap.c | 5 --
mm/page_io.c | 10 +---
75 files changed, 372 insertions(+), 758 deletions(-)
next reply other threads:[~2022-01-18 7:20 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 7:19 Christoph Hellwig [this message]
2022-01-18 7:19 ` [PATCH 01/19] fs: remove mpage_alloc Christoph Hellwig
2022-01-18 7:19 ` [PATCH 02/19] nilfs2: remove nilfs_alloc_seg_bio Christoph Hellwig
2022-01-18 7:19 ` [PATCH 03/19] nfs/blocklayout: remove bl_alloc_init_bio Christoph Hellwig
2022-01-18 7:19 ` [PATCH 04/19] ntfs3: remove ntfs_alloc_bio Christoph Hellwig
2022-01-18 7:19 ` [PATCH 05/19] dm: bio_alloc can't fail if it is allowed to sleep Christoph Hellwig
2022-01-18 7:19 ` [PATCH 06/19] dm-crypt: remove clone_init Christoph Hellwig
2022-01-18 7:19 ` [PATCH 07/19] dm-snap: use blkdev_issue_flush instead of open coding it Christoph Hellwig
2022-01-18 7:19 ` [PATCH 08/19] dm-thin: " Christoph Hellwig
2022-01-18 7:19 ` [PATCH 09/19] drbd: bio_alloc can't fail if it is allow to sleep Christoph Hellwig
2022-01-18 7:19 ` [PATCH 10/19] rnbd-srv: simplify bio mapping in process_rdma Christoph Hellwig
2022-01-19 0:20 ` Jinpu Wang
2022-01-19 0:48 ` Jinpu Wang
2022-01-20 8:37 ` Christoph Hellwig
2022-01-20 8:46 ` Jinpu Wang
2022-01-18 7:19 ` [PATCH 11/19] rnbd-src: remove struct rnbd_dev_blk_io Christoph Hellwig
2022-01-19 15:32 ` Jinpu Wang
2022-01-18 7:19 ` [PATCH 12/19] xen-blkback: bio_alloc can't fail if it is allow to sleep Christoph Hellwig
2022-01-18 7:19 ` [PATCH 13/19] block: move blk_next_bio to bio.c Christoph Hellwig
2022-01-18 22:10 ` Chaitanya Kulkarni
2022-01-18 7:19 ` [PATCH 14/19] block: pass a block_device and opf to blk_next_bio Christoph Hellwig
2022-01-18 22:11 ` Chaitanya Kulkarni
2022-01-20 8:34 ` Christoph Hellwig
2022-01-18 7:19 ` [PATCH 15/19] block: pass a block_device and opf to bio_alloc_bioset Christoph Hellwig
2022-01-18 22:12 ` Chaitanya Kulkarni
2022-01-18 7:19 ` [PATCH 16/19] block: pass a block_device and opf to bio_alloc_kiocb Christoph Hellwig
2022-01-18 22:12 ` Chaitanya Kulkarni
2022-01-18 7:19 ` [PATCH 17/19] block: pass a block_device and opf to bio_alloc Christoph Hellwig
2022-01-18 22:14 ` Chaitanya Kulkarni
2022-01-18 7:19 ` [PATCH 18/19] block: pass a block_device and opf to bio_init Christoph Hellwig
2022-01-18 22:15 ` Chaitanya Kulkarni
2022-01-18 7:19 ` [PATCH 19/19] block: pass a block_device and opf to bio_reset Christoph Hellwig
2022-01-18 22:16 ` Chaitanya Kulkarni
2022-01-19 13:27 ` improve the bio allocation interface Jens Axboe
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=20220118071952.1243143-1-hch@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=drbd-dev@lists.linbit.com \
--cc=haris.iqbal@ionos.com \
--cc=jinpu.wang@ionos.com \
--cc=konishi.ryusuke@gmail.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
--cc=philipp.reisner@linbit.com \
--cc=roger.pau@citrix.co \
--cc=snitzer@redhat.com \
--cc=xen-devel@lists.xenproject.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