Re: [PATCH] Revert "ALSA: memalloc: Workaround for Xen PV"

2024-09-16 Thread Christoph Hellwig
On Mon, Sep 16, 2024 at 09:30:11AM +0200, Takashi Iwai wrote: > On Mon, 16 Sep 2024 09:24:42 +0200, > Christoph Hellwig wrote: > > > > On Mon, Sep 16, 2024 at 09:16:58AM +0200, Takashi Iwai wrote: > > > Yes, all those are really ugly hacks and have been already removed

Re: [PATCH] Revert "ALSA: memalloc: Workaround for Xen PV"

2024-09-16 Thread Christoph Hellwig
On Mon, Sep 16, 2024 at 09:16:58AM +0200, Takashi Iwai wrote: > Yes, all those are really ugly hacks and have been already removed for > 6.12. Let's hope everything works as expected with it. The code currently in linux-next will not work as explained in my previous mail, because it tries to side

Re: [PATCH] Revert "ALSA: memalloc: Workaround for Xen PV"

2024-09-12 Thread Christoph Hellwig
On Sat, Sep 07, 2024 at 11:38:50AM +0100, Andrew Cooper wrote: > Individual subsystems ought not to know or care about XENPV; it's a > layering violation. Agreed. > If the main APIs don't behave properly, then it probably means we've got > a bug at a lower level (e.g. Xen SWIOTLB is a constant so

Re: clearly mark DMA_OPS support as an architecture feature v2

2024-09-03 Thread Christoph Hellwig
I've pulled this into the dma-mapping for-next tree, although I'd love to see one of the vdpa maintainers look over patch 1. I'm pretty sure it's correct, but a confirmation would be good.

Re: [PATCH 2/2] dma-mapping: clearly mark DMA ops as an architecture feature

2024-08-28 Thread Christoph Hellwig
On Wed, Aug 28, 2024 at 08:21:14AM +0200, Andreas Larsson wrote: > On 2024-08-28 08:10, Christoph Hellwig wrote: > > --- a/drivers/xen/Kconfig > > +++ b/drivers/xen/Kconfig > > @@ -177,8 +177,8 @@ config XEN_GRANT_DMA_ALLOC > > > > config SWIOTLB_XEN >

clearly mark DMA_OPS support as an architecture feature v2

2024-08-27 Thread Christoph Hellwig
Hi all, we've had a long standing problems where drivers try to hook into the DMA_OPS mechanisms to override them for something that is not DMA, or to introduce additional dispatching. Now that we are not using DMA_OPS support for dma-iommu and can build kernels without DMA_OPS support on many co

[PATCH 2/2] dma-mapping: clearly mark DMA ops as an architecture feature

2024-08-27 Thread Christoph Hellwig
should probably be marked broken, but we can give them a bit of a grace period for that. Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Acked-by: Sakari Ailus # for IPU6 Acked-by: Robin Murphy --- arch/Kconfig | 9 + arch/alpha/Kconfig

[PATCH 1/2] vdpa_sim: don't select DMA_OPS

2024-08-27 Thread Christoph Hellwig
vdpa_sim has been fixed to not override the dma_map_ops in commit 6c3d329e6486 ("vdpa_sim: get rid of DMA ops"), so don't select the symbol and don't depend on HAS_DMA. Signed-off-by: Christoph Hellwig --- drivers/vdpa/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 dele

Re: clearly mark DMA_OPS support as an architecture feasture

2024-08-25 Thread Christoph Hellwig
On Mon, Aug 26, 2024 at 02:27:27PM +0800, Jason Wang wrote: > Actually I meant, we can extend the virtio_config_ops to allow mapping > ops there, then simulator and VDUSE can hook the map ops there. >From a quick glance that feels like the right layer of abstraction, although the config part of th

clearly mark DMA_OPS support as an architecture feasture

2024-08-23 Thread Christoph Hellwig
Hi all, we've had a long standing problems where drivers try to hook into the DMA_OPS mechanisms to override them for something that is not DMA, or to introduce additional dispatching. Now that we are not using DMA_OPS support for dma-iommu and can build kernels without DMA_OPS support on many co

[PATCH] dma-mapping: clear mark DMA ops as an architecture feature

2024-08-23 Thread Christoph Hellwig
broken, but we can give them a bit of a grace period for that. Signed-off-by: Christoph Hellwig --- arch/Kconfig | 9 + arch/alpha/Kconfig | 2 +- arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 1 + arch

Re: [PATCH 14/26] block: move the nonrot flag to queue_limits

2024-07-25 Thread Christoph Hellwig
On Thu, Jul 25, 2024 at 01:35:46PM +0200, Wouter Verhelst wrote: > NBD actually exports a flag for rotational devices; it's defined in > nbd.h in the NBD userland source as > > #define NBD_FLAG_ROTATIONAL (1 << 4)/* Use elevator algorithm - > rotational media */ > > which is passed i

Re: [PATCH v3 1/1] swiotlb: Reduce swiotlb pool lookups

2024-07-09 Thread Christoph Hellwig
On Tue, Jul 09, 2024 at 09:08:18PM +0200, Petr Tesařík wrote: > I'm confused. If you're not a big fan, why are we effectively adding > them to more places now than before the patch? Because I didn't want to second guess the patch author too much.

Re: [PATCH v3 1/1] swiotlb: Reduce swiotlb pool lookups

2024-07-09 Thread Christoph Hellwig
On Tue, Jul 09, 2024 at 11:48:08AM +, Michael Kelley wrote: > Your tweaks look fine to me. Evidently I misunderstood your > preference in our previous exchange about #ifdef vs. IS_ENABLED() > in swiotlb_find_pool(), and the effect on dma_uses_io_tlb. Actually I actively mislead you. Yes, I pr

Re: [PATCH v3 1/1] swiotlb: Reduce swiotlb pool lookups

2024-07-09 Thread Christoph Hellwig
On Tue, Jul 09, 2024 at 11:10:13AM +0200, Petr Tesařík wrote: > Reviewed-by: Petr Tesarik Thanks. > > OK, so __swiotlb_find_pool() is now always declared (so the code > compiles), but if CONFIG_SWIOTLB_DYNAMIC=n, it is never defined. The > result still links, because the compiler optimizes away

Re: [PATCH v3 1/1] swiotlb: Reduce swiotlb pool lookups

2024-07-08 Thread Christoph Hellwig
Hi Michael, I've applied this, but I've made a few changes before that directly as we're getting close to the end of the merge window. Most of it is very slight formatting tweaks, but I've also kept the dma_uses_io_tlb field under ifdef CONFIG_SWIOTLB_DYNAMIC as I don't want to touch the device s

Re: [PATCH v2 1/1] swiotlb: Reduce swiotlb pool lookups

2024-07-06 Thread Christoph Hellwig
On Sun, Jul 07, 2024 at 02:11:48AM +, Michael Kelley wrote: > This works pretty well. It certainly avoids the messiness of declaring > a "pool" local variable and needing a separate assignment before the > "if" statement, in each of the 9 call sites. The small downside is that > it looks like a

Re: [PATCH v2 1/1] swiotlb: Reduce swiotlb pool lookups

2024-07-05 Thread Christoph Hellwig
Hi Michael, I like the idea behind this, but can you respin it to avoid some of the added code duplication. We have a lot of this pattern: pool = swiotlb_find_pool(dev, paddr); if (pool) swiotlb_foo(dev, ... duplicated in all three swiotlb users. If we rename

Re: [axboe-block:for-next] [block] 1122c0c1cc: aim7.jobs-per-min 22.6% improvement

2024-07-02 Thread Christoph Hellwig
On Mon, Jul 01, 2024 at 04:22:19PM +0800, Oliver Sang wrote: > from below, it seems the patchset doesn't introduce any performance > improvement > but a regression now. is this expected? Not having the improvement at least alleviate my concerns about data integrity. I'm still curious where it co

Re: [axboe-block:for-next] [block] 1122c0c1cc: aim7.jobs-per-min 22.6% improvement

2024-06-26 Thread Christoph Hellwig
On Thu, Jun 27, 2024 at 10:35:38AM +0800, Oliver Sang wrote: > > I failed to apply patch in your previous reply to 1122c0c1cc or current tip > of axboe-block/for-next: > c1440ed442a58 (axboe-block/for-next) Merge branch 'for-6.11/block' into > for-next That already includes it. > > but it's ok

Re: [axboe-block:for-next] [block] bd4a633b6f: fsmark.files_per_sec -64.5% regression

2024-06-25 Thread Christoph Hellwig
On Wed, Jun 26, 2024 at 02:11:11PM +0800, Oliver Sang wrote: > hi, Christoph Hellwig, > > On Mon, Jun 24, 2024 at 10:35:37AM +0200, Christoph Hellwig wrote: > > This is odd to say at least. Any chance you can check the value > > of /sys/block/$DEVICE/queue/rotational fo

Re: [axboe-block:for-next] [block] 1122c0c1cc: aim7.jobs-per-min 22.6% improvement

2024-06-25 Thread Christoph Hellwig
On Wed, Jun 26, 2024 at 10:10:49AM +0800, Oliver Sang wrote: > I'm not sure I understand this test request. as in title, we see a good > improvement of aim7 for 1122c0c1cc, and we didn't observe other issues for > this commit. The improvement suggests we are not sending cache flushes when we shoul

Re: [axboe-block:for-next] [block] 1122c0c1cc: aim7.jobs-per-min 22.6% improvement

2024-06-25 Thread Christoph Hellwig
did have a volatile write cache I'm a bit lost what the problem was and this probably won't fix the issue. --- >From 81c816827197f811e14add7a79220ed9eef6af02 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 25 Jun 2024 08:48:18 +0200 Subject: md: set md-specific flags

[PATCH] xen-blkfront: fix sector_size propagation to the block layer

2024-06-24 Thread Christoph Hellwig
("xen-blkfront: atomically update queue limits") Reported-by: Rusty Bird Signed-off-by: Christoph Hellwig --- drivers/block/xen-blkfront.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c inde

Re: [PATCH 14/26] block: move the nonrot flag to queue_limits

2024-06-24 Thread Christoph Hellwig
On Mon, Jun 24, 2024 at 11:08:16AM -0600, Keith Busch wrote: > On Mon, Jun 17, 2024 at 08:04:41AM +0200, Christoph Hellwig wrote: > > -#define blk_queue_nonrot(q)test_bit(QUEUE_FLAG_NONROT, > > &(q)->queue_flags) > > +#define blk_queue_nonrot(q)

Re: [axboe-block:for-next] [block] bd4a633b6f: fsmark.files_per_sec -64.5% regression

2024-06-24 Thread Christoph Hellwig
On Mon, Jun 24, 2024 at 03:45:57PM +0200, Niklas Cassel wrote: > Seems to be ATA SSD: > https://download.01.org/0day-ci/archive/20240624/202406241546.6bbd44a7-oliver.s...@intel.com/job.yaml > > ssd_partitions: > "/dev/disk/by-id/ata-INTEL_SSDSC2BG012T4_BTHC428201ZX1P2OGN-part1" > > Most likely b

Re: Regression in xen-blkfront regarding sector sizes

2024-06-24 Thread Christoph Hellwig
On Mon, Jun 24, 2024 at 04:29:15PM +0200, Jürgen Groß wrote: >> Rusty suspects it's related to >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/block/xen-blkfront.c?id=ba3f67c1163812b5d7ec33705c31edaa30ce6c51, >> so I'm cc-ing people mentioned there too. > > I th

Re: [axboe-block:for-next] [block] bd4a633b6f: fsmark.files_per_sec -64.5% regression

2024-06-24 Thread Christoph Hellwig
This is odd to say at least. Any chance you can check the value of /sys/block/$DEVICE/queue/rotational for the relevant device before and after this commit? And is this an ATA or NVMe SSD?

Re: move features flags into queue_limits v2

2024-06-19 Thread Christoph Hellwig
On Wed, Jun 19, 2024 at 08:21:14AM -0600, Jens Axboe wrote: > Please check for-6.11/block, as I pulled in the changes to the main > block branch and that threw some merge conflicts mostly due to Damien's > changes in for-6.11/block. While fixing those up, I also came across > oddities like: > > (l

[PATCH 21/26] block: move the poll flag to queue_limits

2024-06-16 Thread Christoph Hellwig
-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-core.c | 5 ++-- block/blk-mq-debugfs.c| 1 - block/blk-mq.c| 31 +++- block/blk-settings.c | 10 --- block/blk-sysfs.c | 4 +-- drivers/md/dm

[PATCH 18/26] block: move the synchronous flag to queue_limits

2024-06-16 Thread Christoph Hellwig
Move the synchronous flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c| 1 - drivers/block/brd.c | 2 +- drivers/block/zram/zram_drv.c | 4

[PATCH 13/26] block: move cache control settings out of queue->flags

2024-06-16 Thread Christoph Hellwig
a pre-existing data integrity bug in those targets that really needs fixing, after which a non-zero num_flush_bios should be required in dm for targets that map to underlying devices. Signed-off-by: Christoph Hellwig Acked-by: Ulf Hansson [mmc] --- .../block/writeback_cache_control.rst

[PATCH 09/26] virtio_blk: remove virtblk_update_cache_mode

2024-06-16 Thread Christoph Hellwig
virtblk_update_cache_mode boils down to a single call to blk_queue_write_cache. Remove it in preparation for moving the cache control flags into the queue_limits. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed

[PATCH 26/26] block: move the bounce flag into the features field

2024-06-16 Thread Christoph Hellwig
Move the bounce flag into the features field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-settings.c| 1 - block/blk.h | 2 +- drivers/scsi/scsi_lib.c | 2 +- include/linux/blkdev.h | 6 -- 4 files changed, 6

[PATCH 20/26] block: move the dax flag to queue_limits

2024-06-16 Thread Christoph Hellwig
Move the dax flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 - drivers/md/dm-table.c| 4 ++-- drivers/nvdimm/pmem.c| 7

[PATCH 24/26] block: move the pci_p2pdma flag to queue_limits

2024-06-16 Thread Christoph Hellwig
Move the pci_p2pdma flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 - drivers/nvme/host/core.c | 8 +++- include/linux/blkdev.h | 7 --- 3

[PATCH 23/26] block: move the zone_resetall flag to queue_limits

2024-06-16 Thread Christoph Hellwig
Move the zone_resetall flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 - drivers/block/null_blk/zoned.c | 3 +-- drivers/block/ublk_drv.c

[PATCH 19/26] block: move the nowait flag to queue_limits

2024-06-16 Thread Christoph Hellwig
. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c| 1 - block/blk-mq.c| 2 +- block/blk-settings.c | 9 + drivers/block/brd.c | 4 ++-- drivers/md/dm-table.c | 18 +++--- drivers/md/md.c | 18

[PATCH 16/26] block: move the io_stat flag setting to queue_limits

2024-06-16 Thread Christoph Hellwig
: Christoph Hellwig --- block/blk-mq-debugfs.c| 1 - block/blk-mq.c| 6 +- block/blk-sysfs.c | 2 +- drivers/md/dm-table.c | 12 +--- drivers/md/dm.c | 13 +++-- drivers/md/md.c | 5 ++--- drivers/nvme

[PATCH 25/26] block: move the skip_tagset_quiesce flag to queue_limits

2024-06-16 Thread Christoph Hellwig
Move the skip_tagset_quiesce flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 - drivers/nvme/host/core.c | 8 +--- include/linux/blkdev.h | 6

[PATCH 11/26] block: freeze the queue in queue_attr_store

2024-06-16 Thread Christoph Hellwig
queue_attr_store updates attributes used to control generating I/O, and can cause malformed bios if changed with I/O in flight. Freeze the queue in common code instead of adding it to almost every attribute. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le

[PATCH 17/26] block: move the stable_writes flag to queue_limits

2024-06-16 Thread Christoph Hellwig
-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 - block/blk-sysfs.c | 29 + drivers/block/drbd/drbd_main.c | 5 ++--- drivers/block/rbd.c| 9 +++-- drivers/block/zram/zram_drv.c | 2 +- drivers

[PATCH 15/26] block: move the add_random flag to queue_limits

2024-06-16 Thread Christoph Hellwig
igned-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c| 1 - block/blk-sysfs.c | 6 +++--- drivers/block/mtip32xx/mtip32xx.c | 1 - drivers/md/dm-table.c | 18 -- drivers/mmc/core/queue.c

[PATCH 10/26] nbd: move setting the cache control flags to __nbd_set_size

2024-06-16 Thread Christoph Hellwig
Move setting the cache control flags in nbd in preparation for moving these flags into the queue_limits structure. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Josef Bacik Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- drivers/block/nbd.c | 17

[PATCH 22/26] block: move the zoned flag into the features field

2024-06-16 Thread Christoph Hellwig
Move the zoned flags into the features field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-settings.c | 5 ++--- drivers/block/null_blk/zoned.c | 2 +- drivers/block/ublk_drv.c | 2 +- drivers/block/virtio_blk.c

[PATCH 14/26] block: move the nonrot flag to queue_limits

2024-06-16 Thread Christoph Hellwig
if that is probably not their main use today (e.g. virtio_blk and drbd). The flag is automatically inherited in blk_stack_limits matching the existing behavior in dm and md. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- arch/m68k/emu/nfblock.c | 1 + arch/um

[PATCH 12/26] block: remove blk_flush_policy

2024-06-16 Thread Christoph Hellwig
Fold blk_flush_policy into the only caller to prepare for pending changes to it. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- block/blk-flush.c | 33 +++-- 1 file changed, 15 insertions

[PATCH 07/26] loop: also use the default block size from an underlying block device

2024-06-16 Thread Christoph Hellwig
Fix the code in loop_reconfigure_limits to pick a default block size for O_DIRECT file descriptors to also work when the loop device sits on top of a block device and not just on a regular file on a block device based file system. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke

[PATCH 03/26] sd: move zone limits setup out of sd_read_block_characteristics

2024-06-16 Thread Christoph Hellwig
Move a bit of code that sets up the zone flag and the write granularity into sd_zbc_read_zones to be with the rest of the zoned limits. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 21 + drivers/scsi/sd_zbc.c | 9 + 2 files changed, 10 insertions

[PATCH 08/26] loop: fold loop_update_rotational into loop_reconfigure_limits

2024-06-16 Thread Christoph Hellwig
This prepares for moving the rotational flag into the queue_limits and also fixes it for the case where the loop device is backed by a block device. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche --- drivers/block/loop.c

[PATCH 01/26] xen-blkfront: don't disable cache flushes when they fail

2024-06-16 Thread Christoph Hellwig
cleared inside of blkfront. This removes old debug code to check for such a mismatch which was previously impossible to hit, including the check for passthrough requests that blkfront never used to start with. Signed-off-by: Christoph Hellwig --- drivers/block/xen-blkfront.c | 44

[PATCH 06/26] loop: regularize upgrading the block size for direct I/O

2024-06-16 Thread Christoph Hellwig
The LOOP_CONFIGURE path automatically upgrades the block size to that of the underlying file for O_DIRECT file descriptors, but the LOOP_SET_BLOCK_SIZE path does not. Fix this by lifting the code to pick the block size into common code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes

[PATCH 05/26] loop: always update discard settings in loop_reconfigure_limits

2024-06-16 Thread Christoph Hellwig
Simplify loop_reconfigure_limits by always updating the discard limits. This adds a little more work to loop_set_block_size, but doesn't change the outcome as the discard flag won't change. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke R

[PATCH 04/26] loop: stop using loop_reconfigure_limits in __loop_clr_fd

2024-06-16 Thread Christoph Hellwig
__loop_clr_fd wants to clear all settings on the device. Prepare for moving more settings into the block limits by open coding loop_reconfigure_limits. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche --- drivers/block

[PATCH 02/26] sd: remove sd_is_zoned

2024-06-16 Thread Christoph Hellwig
is. Fixes: 7437bb73f087 ("block: remove support for the host aware zone model") Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn --- drivers/scsi/sd.c | 6 +- driver

move features flags into queue_limits v2

2024-06-16 Thread Christoph Hellwig
Hi all, this is the third and last major series to convert settings to queue_limits for this merge window. After a bunch of prep patches to get various drivers in shape, it moves all the queue_flags that specify driver controlled features into the queue limits so that they can be set atomically a

Re: [PATCH 02/26] sd: move zone limits setup out of sd_read_block_characteristics

2024-06-16 Thread Christoph Hellwig
On Mon, Jun 17, 2024 at 08:01:04AM +0900, Damien Le Moal wrote: > On 6/13/24 18:39, Christoph Hellwig wrote: > > On Tue, Jun 11, 2024 at 02:51:24PM +0900, Damien Le Moal wrote: > >>> + if (sdkp->device->type == TYPE_ZBC) > >> > >> Nit: use sd_is_zoned(

Re: [PATCH 10/26] xen-blkfront: don't disable cache flushes when they fail

2024-06-13 Thread Christoph Hellwig
g like the patch below, which keeps the existing behavior, but insolates the block layer from it and removes the only user of blk_queue_write_cache from interrupt context: --- >From e6e82c769ab209a77302994c3829cf6ff7a595b8 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 30 May 2024 0

Re: [PATCH 02/26] sd: move zone limits setup out of sd_read_block_characteristics

2024-06-13 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 02:51:24PM +0900, Damien Le Moal wrote: > > + if (sdkp->device->type == TYPE_ZBC) > > Nit: use sd_is_zoned() here ? Actually - is there much in even keeping sd_is_zoned now that the host aware support is removed? Just open coding the type check isn't any more code, and

Re: [PATCH 10/26] xen-blkfront: don't disable cache flushes when they fail

2024-06-12 Thread Christoph Hellwig
On Wed, Jun 12, 2024 at 10:01:18AM +0200, Roger Pau Monné wrote: > On Tue, Jun 11, 2024 at 07:19:10AM +0200, Christoph Hellwig wrote: > > blkfront always had a robust negotiation protocol for detecting a write > > cache. Stop simply disabling cache flushes when they fail as that

Re: [PATCH 21/26] block: move the poll flag to queue_limits

2024-06-11 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 05:21:07PM +0900, Damien Le Moal wrote: > Kind of the same remark as for io_stat about this not really being a device > feature. But I guess seeing "features" as a queue feature rather than just a > device feature makes it OK to have poll (and io_stat) as a feature rather th

Re: [PATCH 19/26] block: move the nowait flag to queue_limits

2024-06-11 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 05:16:37PM +0900, Damien Le Moal wrote: > > @@ -1825,9 +1815,7 @@ int dm_table_set_restrictions(struct dm_table *t, > > struct request_queue *q, > > int r; > > > > if (dm_table_supports_nowait(t)) > > - blk_queue_flag_set(QUEUE_FLAG_NOWAIT, q); > > - e

Re: [PATCH 16/26] block: move the io_stat flag setting to queue_limits

2024-06-11 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 05:09:45PM +0900, Damien Le Moal wrote: > On 6/11/24 2:19 PM, Christoph Hellwig wrote: > > Move the io_stat flag into the queue_limits feature field so that it > > can be set atomically and all I/O is frozen when changing the flag. > > Why a fe

Re: [PATCH 13/26] block: move cache control settings out of queue->flags

2024-06-11 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 04:55:04PM +0900, Damien Le Moal wrote: > On 6/11/24 2:19 PM, Christoph Hellwig wrote: > > Move the cache control settings into the queue_limits so that they > > can be set atomically and all I/O is frozen when changing the > > flags. > >

Re: [PATCH 13/26] block: move cache control settings out of queue->flags

2024-06-11 Thread Christoph Hellwig
A friendly reminder that I've skipped over the full quote. Please properly quote mails if you want your replies to be seen.

Re: [PATCH 10/26] xen-blkfront: don't disable cache flushes when they fail

2024-06-11 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 04:30:39PM +0900, Damien Le Moal wrote: > On 6/11/24 2:19 PM, Christoph Hellwig wrote: > > blkfront always had a robust negotiation protocol for detecting a write > > cache. Stop simply disabling cache flushes when they fail as that is > > a grave e

Re: [PATCH 02/26] sd: move zone limits setup out of sd_read_block_characteristics

2024-06-11 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 02:51:24PM +0900, Damien Le Moal wrote: > > - if (!sd_is_zoned(sdkp)) > > + if (!sd_is_zoned(sdkp)) { > > + lim->zoned = false; > > Maybe we should clear the other zone related limits here ? If the drive is > reformatted/converted from SMR to CMR (FORMAT WITH

Re: [PATCH 06/26] loop: also use the default block size from an underlying block device

2024-06-10 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 02:58:56PM +0900, Damien Le Moal wrote: > > + if (S_ISBLK(inode->i_mode)) > > + backing_bdev = I_BDEV(inode); > > + else if (inode->i_sb->s_bdev) > > + backing_bdev = inode->i_sb->s_bdev; > > + > > Why not move this hunk inside the below "if" ? (back

Re: [PATCH 05/26] loop: regularize upgrading the lock size for direct I/O

2024-06-10 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 02:56:59PM +0900, Damien Le Moal wrote: > > + if (!bsize) > > + bsize = loop_default_blocksize(lo, inode->i_sb->s_bdev); > > If bsize is specified and there is a backing dev used with direct IO, should > it > be checked that bsize is a multiple of bdev_logical_

Re: [PATCH 03/26] loop: stop using loop_reconfigure_limits in __loop_clr_fd

2024-06-10 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 02:53:19PM +0900, Damien Le Moal wrote: > > + /* reset the block size to the default */ > > + lim = queue_limits_start_update(lo->lo_queue); > > + lim.logical_block_size = 512; > > Nit: SECTOR_SIZE ? maybe ? Yes. I was following the existing code, but SECTOR_SIZE is

Re: [PATCH 02/26] sd: move zone limits setup out of sd_read_block_characteristics

2024-06-10 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 07:52:39AM +0200, Christoph Hellwig wrote: > > Maybe we should clear the other zone related limits here ? If the drive is > > reformatted/converted from SMR to CMR (FORMAT WITH PRESET), the other zone > > limits may be set already, no ? > > b

Re: [PATCH 02/26] sd: move zone limits setup out of sd_read_block_characteristics

2024-06-10 Thread Christoph Hellwig
On Tue, Jun 11, 2024 at 02:51:24PM +0900, Damien Le Moal wrote: > > - if (lim->zoned) > > + if (sdkp->device->type == TYPE_ZBC) > > Nit: use sd_is_zoned() here ? Yes. > > - if (!sd_is_zoned(sdkp)) > > + if (!sd_is_zoned(sdkp)) { > > + lim->zoned = false; > > Maybe we should cl

[PATCH 16/26] block: move the io_stat flag setting to queue_limits

2024-06-10 Thread Christoph Hellwig
pointless. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c| 1 - block/blk-mq.c| 6 +- block/blk-sysfs.c | 2 +- drivers/md/dm-table.c | 12 +--- drivers/md/dm.c | 13 +++-- drivers/md/md.c

[PATCH 12/26] block: remove blk_flush_policy

2024-06-10 Thread Christoph Hellwig
Fold blk_flush_policy into the only caller to prepare for pending changes to it. Signed-off-by: Christoph Hellwig --- block/blk-flush.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/block/blk-flush.c b/block/blk-flush.c index

[PATCH 24/26] block: move the pci_p2pdma flag to queue_limits

2024-06-10 Thread Christoph Hellwig
Move the pci_p2pdma flag into the queue_limits feature field so that it can be set atomically and all I/O is frozen when changing the flag. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c | 1 - drivers/nvme/host/core.c | 8 +++- include/linux/blkdev.h | 7 --- 3 files

[PATCH 14/26] block: move the nonrot flag to queue_limits

2024-06-10 Thread Christoph Hellwig
rotational devices even if that is probably not their main use today (e.g. virtio_blk and drbd). The flag is automatically inherited in blk_stack_limits matching the existing behavior in dm and md. Signed-off-by: Christoph Hellwig --- arch/m68k/emu/nfblock.c | 1 + arch/um/drivers

[PATCH 21/26] block: move the poll flag to queue_limits

2024-06-10 Thread Christoph Hellwig
underlying devices. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 5 ++-- block/blk-mq-debugfs.c| 1 - block/blk-mq.c| 31 +++- block/blk-settings.c | 10 --- block/blk-sysfs.c | 4 +-- drivers/md/dm-table.c

[PATCH 17/26] block: move the stable_write flag to queue_limits

2024-06-10 Thread Christoph Hellwig
devices. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c | 1 - block/blk-sysfs.c | 29 + drivers/block/drbd/drbd_main.c | 5 ++--- drivers/block/rbd.c| 9 +++-- drivers/block/zram/zram_drv.c | 2 +- drivers/md/dm

[PATCH 23/26] block: move the zone_resetall flag to queue_limits

2024-06-10 Thread Christoph Hellwig
Move the zone_resetall flag into the queue_limits feature field so that it can be set atomically and all I/O is frozen when changing the flag. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c | 1 - drivers/block/null_blk/zoned.c | 3 +-- drivers/block/ublk_drv.c | 4

[PATCH 26/26] block: move the bounce flag into the feature field

2024-06-10 Thread Christoph Hellwig
Move the bounce field into the flags field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig --- block/blk-settings.c| 1 - block/blk.h | 2 +- drivers/scsi/scsi_lib.c | 2 +- include/linux/blkdev.h | 6 -- 4 files changed, 6 insertions(+), 5 deletions

[PATCH 10/26] xen-blkfront: don't disable cache flushes when they fail

2024-06-10 Thread Christoph Hellwig
blkfront always had a robust negotiation protocol for detecting a write cache. Stop simply disabling cache flushes when they fail as that is a grave error. Signed-off-by: Christoph Hellwig --- drivers/block/xen-blkfront.c | 29 + 1 file changed, 9 insertions(+), 20

[PATCH 19/26] block: move the nowait flag to queue_limits

2024-06-10 Thread Christoph Hellwig
underlying devices. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c| 1 - block/blk-mq.c| 2 +- block/blk-settings.c | 9 + drivers/block/brd.c | 4 ++-- drivers/md/dm-table.c | 16 ++-- drivers/md/md.c

[PATCH 18/26] block: move the synchronous flag to queue_limits

2024-06-10 Thread Christoph Hellwig
Move the synchronous flag into the queue_limits feature field so that it can be set atomically and all I/O is frozen when changing the flag. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c| 1 - drivers/block/brd.c | 2 +- drivers/block/zram/zram_drv.c | 4

[PATCH 07/26] loop: fold loop_update_rotational into loop_reconfigure_limits

2024-06-10 Thread Christoph Hellwig
This prepares for moving the rotational flag into the queue_limits and also fixes it for the case where the loop device is backed by a block device. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff

[PATCH 22/26] block: move the zoned flag into the feature field

2024-06-10 Thread Christoph Hellwig
Move the boolean zoned field into the flags field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig --- block/blk-settings.c | 5 ++--- drivers/block/null_blk/zoned.c | 2 +- drivers/block/ublk_drv.c | 2 +- drivers/block/virtio_blk.c | 5 +++-- drivers

[PATCH 25/26] block: move the skip_tagset_quiesce flag to queue_limits

2024-06-10 Thread Christoph Hellwig
Move the skip_tagset_quiesce flag into the queue_limits feature field so that it can be set atomically and all I/O is frozen when changing the flag. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c | 1 - drivers/nvme/host/core.c | 8 +--- include/linux/blkdev.h | 6 -- 3

[PATCH 15/26] block: move the add_random flag to queue_limits

2024-06-10 Thread Christoph Hellwig
t out without the flag set. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c| 1 - block/blk-sysfs.c | 6 +++--- drivers/block/mtip32xx/mtip32xx.c | 1 - drivers/md/dm-table.c | 18 -- drivers/mmc/core/queue.c | 2 -- driver

[PATCH 13/26] block: move cache control settings out of queue->flags

2024-06-10 Thread Christoph Hellwig
is a pre-existing data integrity bug in those targets that really needs fixing, after which a non-zero num_flush_bios should be required in dm for targets that map to underlying devices. Signed-off-by: Christoph Hellwig --- .../block/writeback_cache_control.rst | 67 +++

[PATCH 20/26] block: move the dax flag to queue_limits

2024-06-10 Thread Christoph Hellwig
Move the dax flag into the queue_limits feature field so that it can be set atomically and all I/O is frozen when changing the flag. Signed-off-by: Christoph Hellwig --- block/blk-mq-debugfs.c | 1 - drivers/md/dm-table.c| 4 ++-- drivers/nvdimm/pmem.c| 7 ++- drivers

[PATCH 11/26] block: freeze the queue in queue_attr_store

2024-06-10 Thread Christoph Hellwig
queue_attr_store updates attributes used to control generating I/O, and can cause malformed bios if changed with I/O in flight. Freeze the queue in common code instead of adding it to almost every attribute. Signed-off-by: Christoph Hellwig --- block/blk-mq.c| 5 +++-- block/blk-sysfs.c

[PATCH 01/26] sd: fix sd_is_zoned

2024-06-10 Thread Christoph Hellwig
model") Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.h | 7 ++- drivers/scsi/sd_zbc.c | 7 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 726f1613f6cb56..65dff3c2108926 100644 --- a/drivers/scsi/sd.h +++

[PATCH 08/26] virtio_blk: remove virtblk_update_cache_mode

2024-06-10 Thread Christoph Hellwig
virtblk_update_cache_mode boils down to a single call to blk_queue_write_cache. Remove it in preparation for moving the cache control flags into the queue_limits. Signed-off-by: Christoph Hellwig --- drivers/block/virtio_blk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions

[PATCH 05/26] loop: regularize upgrading the lock size for direct I/O

2024-06-10 Thread Christoph Hellwig
The LOOP_CONFIGURE path automatically upgrades the block size to that of the underlying file for O_DIRECT file descriptors, but the LOOP_SET_BLOCK_SIZE path does not. Fix this by lifting the code to pick the block size into common code. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c

[PATCH 03/26] loop: stop using loop_reconfigure_limits in __loop_clr_fd

2024-06-10 Thread Christoph Hellwig
__loop_clr_fd wants to clear all settings on the device. Prepare for moving more settings into the block limits by open coding loop_reconfigure_limits. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a

[PATCH 09/26] nbd: move setting the cache control flags to __nbd_set_size

2024-06-10 Thread Christoph Hellwig
Move setting the cache control flags in nbd in preparation for moving these flags into the queue_limits structure. Signed-off-by: Christoph Hellwig --- drivers/block/nbd.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block

[PATCH 06/26] loop: also use the default block size from an underlying block device

2024-06-10 Thread Christoph Hellwig
Fix the code in loop_reconfigure_limits to pick a default block size for O_DIRECT file descriptors to also work when the loop device sits on top of a block device and not just on a regular file on a block device based file system. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 8

[PATCH 04/26] loop: always update discard settings in loop_reconfigure_limits

2024-06-10 Thread Christoph Hellwig
Simplify loop_reconfigure_limits by always updating the discard limits. This adds a little more work to loop_set_block_size, but doesn't change the outcome as the discard flag won't change. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 10 -- 1 file changed, 4

[PATCH 02/26] sd: move zone limits setup out of sd_read_block_characteristics

2024-06-10 Thread Christoph Hellwig
Move a bit of code that sets up the zone flag and the write granularity into sd_zbc_read_zones to be with the rest of the zoned limits. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 21 + drivers/scsi/sd_zbc.c | 13 - 2 files changed, 13 insertions

Re: convert the SCSI ULDs to the atomic queue limits API v2

2024-05-31 Thread Christoph Hellwig
On Fri, May 31, 2024 at 08:07:54AM -0400, Martin K. Petersen wrote: > If you have other block layer changes depending on this series we'll > probably need a shared branch. I'll need to make several changes to sd.c > to fix reported issues, including a couple in the zeroing/discard > department. Ye

[PATCH 12/14] sr: convert to the atomic queue limits API

2024-05-31 Thread Christoph Hellwig
p variable names to standard ones. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- drivers/scsi/sr.c | 42 +- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 7ab000942b97fc..3f49

  1   2   3   4   5   6   7   8   9   10   >