Re: [PATCH v9 22/32] virtio_pci: queue_reset: extract the logic of active vq for modern pci

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Introduce vp_active_vq() to configure vring to backend after vq attach vring. And configure vq vector if necessary. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_pci_modern.c | 46 ++ 1 file changed, 28 insertions(+), 18 del

Re: [PATCH v9 21/32] virtio_pci: queue_reset: update struct virtio_pci_common_cfg and option functions

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Add queue_reset in virtio_pci_common_cfg, and add related operation functions. For not breaks uABI, add a new struct virtio_pci_common_cfg_reset. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_pci_modern_dev.c | 36 ++ include/l

Re: [PATCH v9 18/32] virtio_ring: introduce virtqueue_resize()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Introduce virtqueue_resize() to implement the resize of vring. Based on these, the driver can dynamically adjust the size of the vring. For example: ethtool -G. virtqueue_resize() implements resize based on the vq reset function. In case of failure to allocate

Re: [PATCH v9 12/32] virtio_ring: packed: extract the logic of alloc queue

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of packed to create vring queue. For the convenience of passing parameters, add a structure vring_packed. This feature is required for subsequent virtuqueue reset vring. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 70

Re: [PATCH v9 11/32] virtio_ring: split: introduce virtqueue_resize_split()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: virtio ring split supports resize. Only after the new vring is successfully allocated based on the new num, we will release the old vring. In any case, an error is returned, indicating that the vring still points to the old vring. In the case of an error, the

Re: [PATCH v9 10/32] virtio_ring: split: introduce virtqueue_reinit_split()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Introduce a function to initialize vq without allocating new ring, desc_state, desc_extra. Subsequent patches will call this function after reset vq to reinitialize vq. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c |

Re: [PATCH v9 09/32] virtio_ring: split: extract the logic of vq init

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of initializing vq, and subsequent patches will call it separately. The feature of this part is that it does not depend on the information passed by the upper layer and can be called repeatedly. Signed-off-by: Xuan Zhuo --- drivers/virtio

Re: [PATCH v9 08/32] virtio_ring: split: extract the logic of attach vring

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of attach vring, subsequent patches will call it separately. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/virtio/virtio_ring.c

Re: [PATCH v9 07/32] virtio_ring: split: extract the logic of alloc state and extra

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of creating desc_state, desc_extra, and subsequent patches will call it independently. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 53 ++-- 1 file changed, 38 insertions(+), 15 deletions(-)

Re: [PATCH v9 06/32] virtio_ring: split: extract the logic of alloc queue

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of split to create vring queue. This feature is required for subsequent virtuqueue reset vring. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 53 1 file changed, 36 insertions(+), 17 del

Re: [PATCH v9 05/32] virtio_ring: extract the logic of freeing vring

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Introduce vring_free() to free the vring of vq. Subsequent patches will use vring_free() alone. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-)

Re: [PATCH v9 04/32] virtio_ring: remove the arg vq of vring_alloc_desc_extra()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: The parameter vq of vring_alloc_desc_extra() is useless. This patch removes this parameter. Subsequent patches will call this function to avoid passing useless arguments. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c

Re: [PATCH v9 03/32] virtio_ring: update the document of the virtqueue_detach_unused_buf for queue reset

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Added documentation for virtqueue_detach_unused_buf, allowing it to be called on queue reset. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

Re: [PATCH v9 02/32] virtio: struct virtio_config_ops add callbacks for queue_reset

2022-04-11 Thread Jason Wang
On Tue, Apr 12, 2022 at 10:47 AM Jason Wang wrote: > > > 在 2022/4/6 上午11:43, Xuan Zhuo 写道: > > Performing reset on a queue is divided into four steps: > > > > 1. transport: notify the device to reset the queue > > 2. vring: recycle the buffer submitted > > 3. vring: reset/resize the

Re: [PATCH v9 02/32] virtio: struct virtio_config_ops add callbacks for queue_reset

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Performing reset on a queue is divided into four steps: 1. transport: notify the device to reset the queue 2. vring: recycle the buffer submitted 3. vring: reset/resize the vring (may re-alloc) 4. transport: mmap vring to device, and enable the

Re: [PATCH v9 01/32] virtio: add helper virtqueue_get_vring_max_size()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Record the maximum queue num supported by the device. virtio-net can display the maximum (supported by hardware) ring size in ethtool -g eth0. When the subsequent patch implements vring reset, it can judge whether the ring size passed by the driver is legal ba

Re: [PATCH v2 03/11] m68k: use ktime_read_raw_clock() for random_get_entropy() instead of zero

2022-04-11 Thread Jason A. Donenfeld
Hi Thomas, On Mon, Apr 11, 2022 at 10:18 AM Thomas Gleixner wrote: > > diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h > > index 6a21d9358280..5351b10e1b18 100644 > > --- a/arch/m68k/include/asm/timex.h > > +++ b/arch/m68k/include/asm/timex.h > > @@ -35,7 +35,7 @@ stati

Re: [PATCH 1/1] um: fix error return code in winch_tramp()

2022-04-11 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "Nathan Chancellor" > I attempted to print out the error code but it seems like there is no > output in the console after "reboot: System halted". If I add an > unconditional print right before the call to os_set_fd_block(), I see it > during start up but I do

Re: [f2fs-dev] [PATCH 26/27] block: uncouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD

2022-04-11 Thread Jaegeuk Kim
On 04/06, Christoph Hellwig wrote: > Secure erase is a very different operation from discard in that it is > a data integrity operation vs hint. Fully split the limits and helper > infrastructure to make the separation more clear. > > Signed-off-by: Christoph Hellwig > --- > block/blk-core.c

Re: [PATCH 1/1] um: fix error return code in winch_tramp()

2022-04-11 Thread Nathan Chancellor
Hi Richard, On Sun, Apr 10, 2022 at 11:33:33AM +0200, Richard Weinberger wrote: > - Ursprüngliche Mail - > > Von: "Thorsten Leemhuis" > > Hi, this is your Linux kernel regression tracker. Top-posting for once, > > to make this easily accessible to everyone. > > > > Zhen Lei, Richard, wha

Re: [PATCH 25/27] block: add a bdev_discard_granularity helper

2022-04-11 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:41AM +0200, Christoph Hellwig wrote: > Abstract away implementation details from file systems by providing a > block_device based helper to retrieve the discard granularity. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen > Acked-by: Christoph

Re: [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD

2022-04-11 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > Just use a non-zero max_discard_sectors as an indicator for discard > support, similar to what is done for write zeroes. > > The only places where needs special attention is the RAID5 driver, > which must clear discard support fo

Re: [PATCH 08/27] btrfs: use bdev_max_active_zones instead of open coding it

2022-04-11 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:24AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn Acked-by: David Sterba ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/l

Re: [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD

2022-04-11 Thread Keith Busch
On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void nvme_config_discar

Re: [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD

2022-04-11 Thread Jan Höppner
On 09/04/2022 06:50, Christoph Hellwig wrote: > Just use a non-zero max_discard_sectors as an indicator for discard > support, similar to what is done for write zeroes. > > The only places where needs special attention is the RAID5 driver, > which must clear discard support for security reasons by

Re: [PATCH v2 03/11] m68k: use ktime_read_raw_clock() for random_get_entropy() instead of zero

2022-04-11 Thread Thomas Gleixner
On Sun, Apr 10 2022 at 23:49, Jason A. Donenfeld wrote: > In the event that random_get_entropy() can't access a cycle counter or > similar, falling back to returning 0 is really not the best we can do. > Instead, at least calling ktime_read_raw_clock() would be preferable, > because that always ne