[dm-devel] cleanup bio_kmalloc v2

2022-03-07 Thread Christoph Hellwig
Hi Jens, this series finishes off the bio allocation interface cleanups by dealing with the weirdest member of the famility. bio_kmalloc combines a kmalloc for the bio and bio_vecs with a hidden bio_init call and magic cleanup semantics. This series moves a few callers away from bio_kmalloc and

[dm-devel] [PATCH 2/5] squashfs: always use bio_kmalloc in squashfs_bio_read

2022-03-07 Thread Christoph Hellwig
If a plain kmalloc that is not backed by a mempool is safe here for a large read (and the actual page allocations), it must also be for a small one, so simplify the code a bit. Signed-off-by: Christoph Hellwig Acked-by: Phillip Lougher --- fs/squashfs/block.c | 11 +++ 1 file changed,

[dm-devel] [PATCH 3/5] target/pscsi: remove pscsi_get_bio

2022-03-07 Thread Christoph Hellwig
Remove pscsi_get_bio and simplify the code flow in the only caller. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen --- drivers/target/target_core_pscsi.c | 28 ++-- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git

[dm-devel] [PATCH 1/5] btrfs: simplify ->flush_bio handling

2022-03-07 Thread Christoph Hellwig
Use and embedded bios that is initialized when used instead of bio_kmalloc plus bio_reset. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba --- fs/btrfs/disk-io.c | 8 +--- fs/btrfs/volumes.c | 11 --- fs/btrfs/volumes.h | 4 ++-- 3 files changed, 7 insertions(+), 16

[dm-devel] [PATCH 5/5] pktcdvd: stop using bio_reset

2022-03-07 Thread Christoph Hellwig
Just initialize the bios on-demand. Signed-off-by: Christoph Hellwig --- drivers/block/pktcdvd.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 5ab43f9027631..335099c4076ee 100644 ---

[dm-devel] [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper

2022-03-07 Thread Christoph Hellwig
Remove the magic autofree semantics and require the callers to explicitly call bio_init to initialize the bio. This allows bio_free to catch accidental bio_put calls on bio_init()ed bios as well. Signed-off-by: Christoph Hellwig --- block/bio.c| 47

[dm-devel] [PATCH v6 2/2] dm: support bio polling

2022-03-07 Thread Mike Snitzer
From: Ming Lei Support bio(REQ_POLLED) polling in the following approach: 1) only support io polling on normal READ/WRITE, and other abnormal IOs still fallback to IRQ mode, so the target io is exactly inside the dm io. 2) hold one refcnt on io->io_count after submitting this dm bio with

[dm-devel] [PATCH v6 0/2] block/dm: support bio polling

2022-03-07 Thread Mike Snitzer
Hi, I've rebased Ming's latest [1] ontop of dm-5.18 [2] (which is based on for-5.18/block). End result available in dm-5.18-biopoll branch [3] These changes add bio polling support to DM. Tested with linear and striped DM targets. IOPS improvement was ~5% on my baremetal system with a single

[dm-devel] [PATCH v6 1/2] block: add ->poll_bio to block_device_operations

2022-03-07 Thread Mike Snitzer
From: Ming Lei Prepare for supporting IO polling for bio-based driver. Add ->poll_bio callback so that bio-based driver can provide their own logic for polling bio. Also fix ->submit_bio_bio typo in comment block above __submit_bio_noacct. Reviewed-by: Christoph Hellwig Signed-off-by: Ming

Re: [dm-devel] remove bio_devname

2022-03-07 Thread Mike Snitzer
On Mon, Mar 07 2022 at 11:48P -0500, Christoph Hellwig wrote: > On Mon, Mar 07, 2022 at 11:45:53AM -0500, Mike Snitzer wrote: > > Should those go through block too? Or is there no plan to remove > > bdevname()? > > My preference would be: do the full bio_devname removal through Jens' > tree

Re: [dm-devel] remove bio_devname

2022-03-07 Thread Christoph Hellwig
On Mon, Mar 07, 2022 at 11:45:53AM -0500, Mike Snitzer wrote: > Should those go through block too? Or is there no plan to remove > bdevname()? My preference would be: do the full bio_devname removal through Jens' tree and you keep the bvdevname removal. I hope bdevname will go away as well, but

Re: [dm-devel] remove bio_devname

2022-03-07 Thread Mike Snitzer
On Mon, Mar 07 2022 at 8:42P -0500, Jens Axboe wrote: > On Fri, 4 Mar 2022 19:00:55 +0100, Christoph Hellwig wrote: > > this series removes the bio_devname helper and just switches all users > > to use the %pg format string directly. > > > > Diffstat > > block/bio.c |6

Re: [dm-devel] remove bio_devname

2022-03-07 Thread Jens Axboe
On Fri, 4 Mar 2022 19:00:55 +0100, Christoph Hellwig wrote: > this series removes the bio_devname helper and just switches all users > to use the %pg format string directly. > > Diffstat > block/bio.c |6 -- > block/blk-core.c | 25 +++-- >