Yes, I'm using virtio-mmio.
On Tue, Jan 23, 2024 at 11:09 PM Stefan Hajnoczi wrote:
>
> Hi Michael,
> This could potentially affect other VIRTIO drivers too. Please see
> below.
>
> On Tue, Jan 23, 2024 at 11:27:40AM +0800, yi sun wrote:
> > On Mon, Jan 22, 2024 at 11:43 PM Stefan Hajnoczi
> >
On 1/22/24 18:36, Christoph Hellwig wrote:
Pass the default limits to blk_mq_alloc_disk and then use the
queue_limits_{start,commit}_update API to change the limits in an
atomic way on existing loop gendisks.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 41 +
On 1/22/24 18:36, Christoph Hellwig wrote:
Pass the max_hw_sector limit loop sets at initialization time directly to
blk_mq_alloc_disk instead of updating it right after the allocation.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 11 +++
1 file changed, 7 insertions(+
On 1/22/24 18:36, Christoph Hellwig wrote:
Initialize the local variables for the discard max sectors and
granularity to zero as a sensible default, and then merge the
calls assigning them to the queue limits.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 27
On 1/22/24 18:36, Christoph Hellwig wrote:
Call virtblk_read_limits and most of virtblk_probe_zoned_device before
allocating the gendisk and thus request_queue and make them read into
a queue_limits structure instead. Pass this initialized queue_limits
to blk_mq_alloc_disk to set the queue up wi
On 1/22/24 18:36, Christoph Hellwig wrote:
Split out a virtblk_read_limits helper that just reads the various
queue limits to separate it from the higher level probing logic.
Signed-off-by: Christoph Hellwig
---
drivers/block/virtio_blk.c | 193 +++--
1 file c
On 1/22/24 18:36, Christoph Hellwig wrote:
Pass a queue_limits to blk_mq_alloc_disk and apply it if non-NULL. This
will allow allocating queues with valid queue limits instead of setting
the values one at a time later.
Signed-off-by: Christoph Hellwig
---
arch/um/drivers/ubd_kern.c
On 1/22/24 18:36, Christoph Hellwig wrote:
Pass a queue_limits to blk_mq_init_queue and apply it if non-NULL. This
will allow allocating queues with valid queue limits instead of setting
the values one at a time later.
Also rename the function to blk_mq_alloc_queue as that is a much better
name
On 1/22/24 18:36, Christoph Hellwig wrote:
Pass a queue_limits to blk_alloc_queue and apply it if non-NULL. This
will allow allocating queues with valid queue limits instead of setting
the values one at a time later.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 28
On 1/22/24 18:36, Christoph Hellwig wrote:
Convert queue_discard_max_store to use queue_limits_commit_update to
check and updated the max_sectors limit and freeze the queue before
doing so to ensure we don't have request in flight while changing
the limits.
Signed-off-by: Christoph Hellwig
---
On 1/22/24 18:36, Christoph Hellwig wrote:
Now that the block layer tracks a separate user max discard limit, there
is no need to prevent nvme from updating it on controller capability
changes.
Signed-off-by: Christoph Hellwig
---
drivers/nvme/host/core.c | 10 --
1 file changed, 10
On 1/22/24 18:36, Christoph Hellwig wrote:
Add a new max_user_discard_sectors limit that mirrors max_user_sectors
and stores the value that the user manually set. This now allows
updates of the max_hw_discard_sectors to not worry about the user
limit.
Signed-off-by: Christoph Hellwig
---
blo
On 1/22/24 18:36, Christoph Hellwig wrote:
Convert queue_max_sectors_store to use queue_limits_commit_update to
check and updated the max_sectors limit and freeze the queue before
doing so to ensure we don't have request in flight while changing
the limits.
Note that this removes the previously
On 1/22/24 18:36, Christoph Hellwig wrote:
Add a new queue_limits_{start,commit}_update pair of functions that
allows taking an atomic snapshot of queue limits, update it, and
commit it if it passes validity checking.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 1 +
block
On 1/22/24 18:36, Christoph Hellwig wrote:
Factor out a blk_apply_bdi_limits limits helper that can be used with
an explicit queue_limits argument, which will be useful later.
Signed-off-by: Christoph Hellwig
---
block/blk-settings.c | 21 -
1 file changed, 12 insertions(
On 1/22/24 18:36, Christoph Hellwig wrote:
The maximum number of open and active zones is a limit on the queue
and should be places there so that we can including it in the upcoming
queue limits batch update API.
Signed-off-by: Christoph Hellwig
---
include/linux/blkdev.h | 12 ++--
On 1/22/24 09:36, Christoph Hellwig wrote:
> Initialize the local variables for the discard max sectors and
> granularity to zero as a sensible default, and then merge the
> calls assigning them to the queue limits.
>
> Signed-off-by: Christoph Hellwig
>
Looks good.
Reviewed-by: Chaitanya Kulkar
On 1/22/2024 9:36 AM, Christoph Hellwig wrote:
> Split out a virtblk_read_limits helper that just reads the various
> queue limits to separate it from the higher level probing logic.
>
> Signed-off-by: Christoph Hellwig
> ---
Thanks for doing this.
Reviewed-by: Chaitanya Kulkarni
-ck
On Mon, Jan 22, 2024 at 07:07:21PM +0800, Yi Sun wrote:
> In some cases, it is necessary to wait for all requests to become complete
> status before performing other operations. Otherwise, these requests will
> never
> be processed successfully.
>
> For example, when the virtio device is in hiber
Hi Yi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linus/master v6.8-rc1 next-20240123]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use
Hi Michael,
This could potentially affect other VIRTIO drivers too. Please see
below.
On Tue, Jan 23, 2024 at 11:27:40AM +0800, yi sun wrote:
> On Mon, Jan 22, 2024 at 11:43 PM Stefan Hajnoczi wrote:
> >
> > On Mon, Jan 22, 2024 at 07:07:22PM +0800, Yi Sun wrote:
> > > Ensure no remaining request
On Mon, Jan 22, 2024 at 06:36:42PM +0100, Christoph Hellwig wrote:
> Call virtblk_read_limits and most of virtblk_probe_zoned_device before
> allocating the gendisk and thus request_queue and make them read into
> a queue_limits structure instead. Pass this initialized queue_limits
> to blk_mq_all
On Mon, Jan 22, 2024 at 06:36:41PM +0100, Christoph Hellwig wrote:
> Split out a virtblk_read_limits helper that just reads the various
> queue limits to separate it from the higher level probing logic.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/block/virtio_blk.c | 193 +++
On Tue, Jan 23, 2024 at 02:12:37PM +0900, Damien Le Moal wrote:
> > blk_queue_max_discard_sectors(queue, max_discard_sectors);
>
> This function references max_user_discard_sectors but that access is done
> without holding the queue limits mutex. Is that safe ?
No. But fixing nvme will be do
On Tue, Jan 23, 2024 at 01:50:32PM +0900, Damien Le Moal wrote:
> > + return -EINVAL;
> > + return 0;
> > + }
> > +
> > + if (WARN_ON_ONCE(!IS_ENABLED(CONFIG_BLK_DEV_ZONED)))
> > + return -EINVAL;
> > +
> > + if (lim->zone_write_granularity < lim->logical
On Tue, Jan 23, 2024 at 01:41:05PM +0900, Damien Le Moal wrote:
> > +{
> > + /*
> > +* For read-ahead of large files to be effective, we need to read ahead
> > +* at least twice the optimal I/O size.
> > +*/
> > + bdi->ra_pages = max(lim->io_opt * 2 / PAGE_SIZE, VM_READAHEAD_PAGES);
26 matches
Mail list logo