Re: [RFC PATCH] ALSA: virtio: use copy and fill_silence callbacks

2023-10-16 Thread Stefan Hajnoczi
On Thu, Oct 12, 2023 at 05:10:50PM +0200, Matias Ezequiel Vara Larsen wrote: > This commit replaces the mmap mechanism with the copy() and > fill_silence() callbacks for both capturing and playback for the > virtio-sound driver. This change is required to prevent the updating of > the content of a

Re: [PATCH] vhost-scsi: Spelling s/preceeding/preceding/g

2023-10-02 Thread Stefan Hajnoczi
On Thu, Sep 28, 2023 at 02:18:33PM +0200, Geert Uytterhoeven wrote: > Fix a misspelling of "preceding". > > Signed-off-by: Geert Uytterhoeven > --- > drivers/vhost/scsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi si

Re: [PATCH V3] io_uring: fix IO hang in io_wq_put_and_exit from do_exit()

2023-09-26 Thread Stefan Hajnoczi
On Tue, Sep 26, 2023 at 09:28:15AM +0800, Ming Lei wrote: > On Mon, Sep 25, 2023 at 05:17:10PM -0400, Stefan Hajnoczi wrote: > > On Fri, Sep 15, 2023 at 03:04:05PM +0800, Jason Wang wrote: > > > On Fri, Sep 8, 2023 at 11:25 PM Ming Lei wrote: > > > > > > &g

Re: [PATCH V3] io_uring: fix IO hang in io_wq_put_and_exit from do_exit()

2023-09-25 Thread Stefan Hajnoczi
On Fri, Sep 15, 2023 at 03:04:05PM +0800, Jason Wang wrote: > On Fri, Sep 8, 2023 at 11:25 PM Ming Lei wrote: > > > > On Fri, Sep 08, 2023 at 08:44:45AM -0600, Jens Axboe wrote: > > > On 9/8/23 8:34 AM, Ming Lei wrote: > > > > On Fri, Sep 08, 2023 at 07:49:53AM -0600, Jens Axboe wrote: > > > >>

Re: [virtio-comment] Re: virtio-sound linux driver conformance to spec

2023-09-19 Thread Stefan Hajnoczi
On Tue, Sep 19, 2023 at 08:58:32AM +0200, Paolo Bonzini wrote: > On 9/19/23 02:35, Anton Yakovlev wrote: > > > > If the Linux virtio sound driver violates a specification, then there > > must be > > a conformance statement that the driver does not follow. As far as I know, > > there is no such

Re: [virtio-comment] virtio-sound linux driver conformance to spec

2023-09-18 Thread Stefan Hajnoczi
On Mon, Sep 18, 2023 at 02:50:09PM +0200, Matias Ezequiel Vara Larsen wrote: > On Wed, Sep 13, 2023 at 06:58:30PM +0300, Manos Pitsidianakis wrote: > > Hello Matias, > > > > Please show and refer to code snippets from the kernel tree that you > > think are related to your question. It'd help us

Re: [virtio-comment] virtio queue numbering and optional queues

2023-08-22 Thread Stefan Hajnoczi
On Mon, Aug 21, 2023 at 03:18:50PM -0700, Daniel Verkamp wrote: > Hello virtio folks, Hi Daniel, I have CCed those involved in the free page hint and page reporting features. Stefan > > I noticed a mismatch between the way the specification defines > device-specific virtqueue indexes and the

Re: [PATCH V4] virtio-fs: Improved request latencies when Virtio queue is full

2023-08-16 Thread Stefan Hajnoczi
quest`. > V2: Not scheduling dispatch work anymore when not needed > and changed delayed_work structs to work_struct structs > > fs/fuse/virtio_fs.c | 32 +------- > 1 file changed, 17 insertions(+), 15 delet

Re: Unbinding virtio_pci_modern does not release BAR4 in Linux 6.5.0-rc4

2023-08-10 Thread Stefan Hajnoczi
On Thu, Aug 10, 2023 at 11:08:52AM +0800, Jason Wang wrote: > On Thu, Aug 3, 2023 at 10:37 PM Stefan Hajnoczi wrote: > > > > Hi, > > After running "driverctl --nosave set-override :01:00.0 vfio-pci" on > > a virtio-blk-pci device, /proc

Unbinding virtio_pci_modern does not release BAR4 in Linux 6.5.0-rc4

2023-08-03 Thread Stefan Hajnoczi
Hi, After running "driverctl --nosave set-override :01:00.0 vfio-pci" on a virtio-blk-pci device, /proc/iomem shows that BAR4 is still owned by virtio_pci_modern even though the vfio-pci driver is now bound to the PCI device. This regression was introduced after 6.4.7 but I don't see the

Re: [PATCH 1/1] MAINTAINERS: add vhost-scsi entry and myself as a co-maintainer

2023-07-19 Thread Stefan Hajnoczi
+++- > 1 file changed, 10 insertions(+), 1 deletion(-) Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v2 0/2] vhost-scsi: Fix IO hangs when using windows

2023-07-13 Thread Stefan Hajnoczi
On Thu, Jul 13, 2023 at 03:55:45PM +1000, Vadim Rozenfeld wrote: > Currently we use 4-byte alignmed (FILE_LONG_ALIGNMENT) in both Windows > virtio blk and scsi miniport drivers. > It shouldn't be a problem to change it to 512 by setting AlignmentMask > field of PORT_CONFIGURATION_INFORMATION

Re: [PATCH v2 0/2] vhost-scsi: Fix IO hangs when using windows

2023-07-13 Thread Stefan Hajnoczi
On Wed, Jul 12, 2023 at 11:05:11AM -0500, Mike Christie wrote: > On 7/12/23 9:26 AM, Stefan Hajnoczi wrote: > > On Tue, Jul 11, 2023 at 04:01:22PM -0500, Mike Christie wrote: > >> On 7/11/23 1:34 PM, Stefan Hajnoczi wrote: > >>> On Sun, Jul 09, 2023 at 03:28:5

Re: [PATCH v2 0/2] vhost-scsi: Fix IO hangs when using windows

2023-07-12 Thread Stefan Hajnoczi
On Tue, Jul 11, 2023 at 04:01:22PM -0500, Mike Christie wrote: > On 7/11/23 1:34 PM, Stefan Hajnoczi wrote: > > On Sun, Jul 09, 2023 at 03:28:57PM -0500, Mike Christie wrote: > >> The following patches were made over Linus's tree and fix an issue > >> where wind

Re: [PATCH v2 0/2] vhost-scsi: Fix IO hangs when using windows

2023-07-11 Thread Stefan Hajnoczi
On Sun, Jul 09, 2023 at 03:28:57PM -0500, Mike Christie wrote: > The following patches were made over Linus's tree and fix an issue > where windows guests will send iovecs with offset/lengths that result > in IOs that are not aligned to 512. The LIO layer will then send them > to Linux's FS/block

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-11 Thread Stefan Hajnoczi
On Tue, 11 Jul 2023 at 13:06, Stefano Garzarella wrote: > > CCing `./scripts/get_maintainer.pl -f drivers/scsi/virtio_scsi.c`, > since I found a few things in the virtio-scsi driver... > > FYI we have seen that Linux has problems with a QEMU patch for the > virtio-scsi device (details at the

Re: [PATCH V3] virtio-fs: Improved request latencies when Virtio queue is full

2023-06-05 Thread Stefan Hajnoczi
On Fri, Jun 02, 2023 at 03:32:26PM +0200, Peter-Jan Gootzen wrote: > When the Virtio queue is full, a work item is scheduled > to execute in 1ms that retries adding the request to the queue. > This is a large amount of time on the scale on which a > virtio-fs device can operate. When using a DPU

Re: [PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full

2023-06-01 Thread Stefan Hajnoczi
On Thu, Jun 01, 2023 at 04:49:06PM +0200, Peter-Jan Gootzen wrote: > On 01/06/2023 16:08, Stefan Hajnoczi wrote: > > On Wed, May 31, 2023 at 04:49:39PM -0400, Vivek Goyal wrote: > >> On Wed, May 31, 2023 at 10:34:15PM +0200, Peter-Jan Gootzen wrote: > >>> On 31/05

Re: [PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full

2023-06-01 Thread Stefan Hajnoczi
On Wed, May 31, 2023 at 04:49:39PM -0400, Vivek Goyal wrote: > On Wed, May 31, 2023 at 10:34:15PM +0200, Peter-Jan Gootzen wrote: > > On 31/05/2023 21:18, Vivek Goyal wrote: > > > On Wed, May 31, 2023 at 07:10:32PM +0200, Peter-Jan Gootzen wrote: > > >> When the Virtio queue is full, a work item

Re: [PATCH] scsi: virtio_scsi: Remove a useless function call

2023-05-29 Thread Stefan Hajnoczi
On Mon, May 29, 2023 at 09:35:08AM +0200, Christophe JAILLET wrote: > 'inq_result' is known to be NULL. There is no point calling kfree(). > > Signed-off-by: Christophe JAILLET > --- > drivers/scsi/virtio_scsi.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) R

Re: [PATCH] virtio-fs: Improved request latencies when Virtio queue is full

2023-05-23 Thread Stefan Hajnoczi
On Mon, May 22, 2023 at 03:19:15PM +0200, Peter-Jan Gootzen wrote: > When the Virtio queue is full, a work item is scheduled > to execute in 1ms that retries adding the request to the queue. > This is a large amount of time on the scale on which a > virtio-fs device can operate. When using a DPU

Re: [Patch net] vsock: improve tap delivery accuracy

2023-05-03 Thread Stefan Hajnoczi
On Sun, Apr 16, 2023 at 04:49:00AM +, Bobby Eshleman wrote: > On Tue, May 02, 2023 at 04:14:18PM -0400, Stefan Hajnoczi wrote: > > On Tue, May 02, 2023 at 10:44:04AM -0700, Cong Wang wrote: > > > From: Cong Wang > > > > > > When virtqueue_add_sgs() fail

Re: [Patch net] vsock: improve tap delivery accuracy

2023-05-02 Thread Stefan Hajnoczi
all > possible failures. > > Fixes: 82dfb540aeb2 ("VSOCK: Add virtio vsock vsockmon hooks") > Cc: Stefan Hajnoczi > Cc: Stefano Garzarella > Cc: Bobby Eshleman > Signed-off-by: Cong Wang > --- > net/vmw_vsock/virtio_transport.c | 5 ++--- > 1 file changed

Re: [virtio-dev] [PATCH 1/2] virtio-blk: migrate to the latest patchset version

2023-03-28 Thread Stefan Hajnoczi
uot;) > Cc: sta...@vger.kernel.org > Signed-off-by: Dmitry Fomichev > --- > drivers/block/virtio_blk.c | 238 +--- > include/uapi/linux/virtio_blk.h | 18 +-- > 2 files changed, 165 insertions(+), 91 deletions(-) Reviewed-by: Stefan Hajnoczi signatu

Re: [virtio-dev] [PATCH 2/2] virtio-blk: fix ZBD probe in kernels without ZBD support

2023-03-28 Thread Stefan Hajnoczi
d3d ("virtio-blk: add support for zoned block devices") > Cc: sta...@vger.kernel.org > Signed-off-by: Dmitry Fomichev > --- > drivers/block/virtio_blk.c | 34 ++-------- > 1 file changed, 18 insertions(+), 16 d

Re: [RESEND v2 PATCH] init/do_mounts.c: add virtiofs root fs support

2023-02-27 Thread Stefan Hajnoczi
On Fri, Feb 24, 2023 at 03:37:51PM +0100, David Heidelberg wrote: > From: Stefan Hajnoczi > > Make it possible to boot directly from a virtiofs file system with tag > 'myfs' using the following kernel parameters: > > rootfstype=virtiofs root=myfs rw > > Booting dire

Re: virtio-fs: adding support for multi-queue

2023-02-22 Thread Stefan Hajnoczi
On Wed, Feb 08, 2023 at 05:29:25PM +0100, Peter-Jan Gootzen wrote: > On 08/02/2023 11:43, Stefan Hajnoczi wrote: > > On Wed, Feb 08, 2023 at 09:33:33AM +0100, Peter-Jan Gootzen wrote: > > > > > > > > > On 07/02/2023 22:57, Vivek Goyal wrote: > > &g

Re: [PATCH v2] scsi: virtio_scsi: Fix poential NULL pointer dereference in virtscsi_rescan_hotunplug

2023-02-14 Thread Stefan Hajnoczi
On Mon, Feb 13, 2023 at 07:09:50AM -0500, Michael S. Tsirkin wrote: > On Thu, Feb 02, 2023 at 02:41:24PM +0800, Zheng Wang wrote: > > There is no check about the return value of kmalloc in > > virtscsi_rescan_hotunplug. Add the check to avoid use > > of null pointer 'inq_result' in case of the

Re: virtio-fs: adding support for multi-queue

2023-02-08 Thread Stefan Hajnoczi
On Wed, Feb 08, 2023 at 09:33:33AM +0100, Peter-Jan Gootzen wrote: > > > On 07/02/2023 22:57, Vivek Goyal wrote: > > On Tue, Feb 07, 2023 at 04:32:02PM -0500, Stefan Hajnoczi wrote: > > > On Tue, Feb 07, 2023 at 02:53:58PM -0500, Vivek Goyal wrote: > > > >

Re: virtio-fs: adding support for multi-queue

2023-02-07 Thread Stefan Hajnoczi
On Tue, Feb 07, 2023 at 02:53:58PM -0500, Vivek Goyal wrote: > On Tue, Feb 07, 2023 at 02:45:39PM -0500, Stefan Hajnoczi wrote: > > On Tue, Feb 07, 2023 at 11:14:46AM +0100, Peter-Jan Gootzen wrote: > > > Hi, > > > > > [cc German] > > > > For my

Re: virtio-fs: adding support for multi-queue

2023-02-07 Thread Stefan Hajnoczi
On Tue, Feb 07, 2023 at 11:14:46AM +0100, Peter-Jan Gootzen wrote: > Hi, > > For my MSc thesis project in collaboration with IBM > (https://github.com/IBM/dpu-virtio-fs) we are looking to improve the > performance of the virtio-fs driver in high throughput scenarios. We think > the main

Re: [PATCH] vhost-scsi: convert sysfs snprintf and sprintf to sysfs_emit

2023-01-30 Thread Stefan Hajnoczi
drivers/vhost/scsi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.lin

Re: [PATCH V2] vhost-scsi: unbreak any layout for response

2023-01-23 Thread Stefan Hajnoczi
ellinger > Fixes: a77ec83a5789 ("vhost/scsi: fix reuse of >iov[out] in response") > Signed-off-by: Jason Wang > --- > Changes since V1: > - tweak the changelog > - fix the allocation size for tvc_resp_iov (should be sizeof(struct iovec)) > --- > drivers/

Re: [PATCH] vhost-scsi: unbreak any layout for response

2023-01-11 Thread Stefan Hajnoczi
On Wed, Jan 11, 2023 at 02:07:30PM +0800, Jason Wang wrote: > Al Viro said: > > """ > Since "vhost/scsi: fix reuse of >iov[out] in response" > we have this: > cmd->tvc_resp_iov = vq->iov[vc.out]; > cmd->tvc_in_iovs = vc.in; > combined with >

Re: [PATCH] virtio_blk: zone append in header type tweak

2022-12-20 Thread Stefan Hajnoczi
irtio_blk.c:332:33: sparse: sparse: cast to restricted __le64 > > Make sparse happy by using the correct type. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/block/virtio_blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoc

Re: [PATCH] virtio_blk: temporary variable type tweak

2022-12-20 Thread Stefan Hajnoczi
2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] virtio-blk: fix probe without CONFIG_BLK_DEV_ZONED

2022-12-20 Thread Stefan Hajnoczi
e changed, 10 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 2/2] virtio-blk: support completion batching for the IRQ path

2022-12-08 Thread Stefan Hajnoczi
t; > - /* In case queue is stopped waiting for more buffers. */ > - if (req_done) > + if (req_done) { > + if (!rq_list_empty(iob.req_list)) > + virtblk_complete_batch(); A little optimization to avoid the indirect call: iob.complete()

Re: [PATCH 1/2] virtio-blk: set req->state to MQ_RQ_COMPLETE after polling I/O is finished

2022-12-08 Thread Stefan Hajnoczi
On Tue, Dec 06, 2022 at 11:11:24PM +0900, Suwan Kim wrote: > Driver should set req->state to MQ_RQ_COMPLETE after it finishes to process > req. But virtio-blk doesn't set MQ_RQ_COMPLETE after virtblk_poll() handles > req and req->state still remains MQ_RQ_IN_FLIGHT. Fortunately so far there > is

Re: [PATCH v3] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

2022-12-06 Thread Stefan Hajnoczi
ands */ > +#define VBLK_GET_LIFETIME_IOR('r', 0, struct virtio_blk_lifetime) Does something include for _IOR()? Failure to include the necessary header file could break userspace applications that include . Reviewed-by: Stefan Hajnoczi signature.asc Descr

Re: [PATCH] virtio-blk: replace ida_simple[get|remove] with ida_[alloc_range|free]

2022-11-30 Thread Stefan Hajnoczi
off-by: Pankaj Raghav > --- > drivers/block/virtio_blk.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Chaitanya proposed a similar patch in the past: https://lore.kernel.org/all/20220420041053.7927-5-...@nvidia.com/ Your patch calculates the max argument correctly. Looks good.

Re: [PATCH v2] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

2022-11-28 Thread Stefan Hajnoczi
On Fri, Nov 25, 2022 at 12:09:45AM +0200, Alvaro Karsz wrote: > > I suggest defining a separate UAPI struct for this ioctl. > > Sounds fine to me. > I could use the following struct > > struct virtio_blk_lifetime_ioctl { > u16 pre_eol_info; > u16 device_lifetime_est_typ_a; >

Re: [PATCH v2] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

2022-11-24 Thread Stefan Hajnoczi
On Thu, Nov 24, 2022 at 01:42:37AM -0500, Michael S. Tsirkin wrote: > On Wed, Nov 23, 2022 at 10:41:46PM +, Chaitanya Kulkarni wrote: > > > > > +/* Get lifetime information from device */ > > > +static int virtblk_ioctl_lifetime(struct virtio_blk *vblk, unsigned long > > > arg) > > > +{ > >

Re: [PATCH v2] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

2022-11-24 Thread Stefan Hajnoczi
On Mon, Nov 21, 2022 at 10:59:23AM +0200, Alvaro Karsz wrote: > Implement the VIRTIO_BLK_F_LIFETIME feature for VirtIO block devices. > > This commit introduces a new ioctl command, VBLK_LIFETIME. How about naming it VBLK_GET_LIFETIME? It's clearer what the ioctl does and it follows the name of

Re: [PATCH] virtio_blk: use UINT_MAX instead of -1U

2022-11-10 Thread Stefan Hajnoczi
s/block/virtio_blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoun

Re: [PATCH] virtio_blk: Fix signedness bug in virtblk_prep_rq()

2022-10-24 Thread Stefan Hajnoczi
uot;virtio-blk: support mq_ops->queue_rqs()") > Signed-off-by: Rafael Mendonca > --- > drivers/block/virtio_blk.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___

Re: [Bug] double ->queue_rq() because of timeout in ->queue_rq()

2022-10-24 Thread Stefan Hajnoczi
On Fri, Oct 21, 2022 at 10:23:57AM +0800, Ming Lei wrote: > On Thu, Oct 20, 2022 at 04:01:11PM -0400, Stefan Hajnoczi wrote: > > On Thu, Oct 20, 2022 at 05:10:13PM +0800, Ming Lei wrote: > > > Hi, > > > > > > David Jeffery found one double ->queue_rq()

Re: [Bug] double ->queue_rq() because of timeout in ->queue_rq()

2022-10-20 Thread Stefan Hajnoczi
On Thu, Oct 20, 2022 at 05:10:13PM +0800, Ming Lei wrote: > Hi, > > David Jeffery found one double ->queue_rq() issue, so far it can > be triggered in the following two cases: > > 1) scsi driver in guest kernel > > - the story could be long vmexit latency or long preempt latency of > vCPU

Re: [PATCH v3] virtio_blk: add SECURE ERASE command support

2022-09-22 Thread Stefan Hajnoczi
d a comment explaining why we use the minimum between the discard > and secure erase limits. > --- > drivers/block/virtio_blk.c | 110 ++-- > include/uapi/linux/virtio_blk.h | 19 ++ > 2 files cha

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-20 Thread Stefan Hajnoczi
On Mon, Sep 19, 2022 at 09:09:05PM +0300, Alvaro Karsz wrote: > Thanks for the reply. > > > This can be simplified with min_not_zero(). > > Ok, I will do it in the next version. > > > It's worth including a comment here that the discard and secure erase > > limits are combined because the Linux

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-20 Thread Stefan Hajnoczi
On Sun, Sep 18, 2022 at 07:07:34PM +0300, Alvaro Karsz wrote: > > sounds good. Add a code comment? > > I will. > > > yes but I now see two places that seem to include this logic. > > > Yes, this is because the same logic is applied on 2 different pairs. > > * secure_erase_sector_alignment

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-19 Thread Stefan Hajnoczi
On Mon, Aug 29, 2022 at 11:23:13AM +0300, Alvaro Karsz wrote: > @@ -1075,6 +1068,57 @@ static int virtblk_probe(struct virtio_device *vdev) > blk_queue_max_write_zeroes_sectors(q, v ? v : UINT_MAX); > } > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_SECURE_ERASE)) { > +

Re: [dm-devel] [PATCH RFC 0/8] Introduce provisioning primitives for thinly provisioned storage

2022-09-19 Thread Stefan Hajnoczi
On Sat, Sep 17, 2022 at 12:46:33PM -0700, Sarthak Kukreti wrote: > On Fri, Sep 16, 2022 at 8:03 PM Darrick J. Wong wrote: > > > > On Thu, Sep 15, 2022 at 09:48:18AM -0700, Sarthak Kukreti wrote: > > > From: Sarthak Kukreti > > > > > > Hi, > > > > > > This patch series is an RFC of a mechanism to

Re: [PATCH RFC 0/8] Introduce provisioning primitives for thinly provisioned storage

2022-09-16 Thread Stefan Hajnoczi
On Thu, Sep 15, 2022 at 09:48:18AM -0700, Sarthak Kukreti wrote: > From: Sarthak Kukreti > > Hi, > > This patch series is an RFC of a mechanism to pass through provision requests > on stacked thinly provisioned storage devices/filesystems. > > The linux kernel provides several mechanisms to

Re: [PATCH RFC 3/8] virtio_blk: Add support for provision requests

2022-09-15 Thread Stefan Hajnoczi
On Thu, Sep 15, 2022 at 09:48:21AM -0700, Sarthak Kukreti wrote: > From: Sarthak Kukreti > > Adds support for provision requests. Provision requests act like > the inverse of discards. > > Signed-off-by: Sarthak Kukreti > --- > drivers/block/virtio_blk.c | 48

Re: [PATCH] virtiofs: Drop unnecessary initialization in send_forget_request and virtio_fs_get_tree

2022-09-06 Thread Stefan Hajnoczi
On Tue, Sep 06, 2022 at 01:38:48AM -0400, Deming Wang wrote: > The variable is initialized but it is only used after its assignment. > > Signed-off-by: Deming Wang > --- > fs/fuse/virtio_fs.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/fuse/virtio_fs.c

Re: [PATCH 0/6] virtio/vsock: introduce dgrams, sk_buff, and qdisc

2022-09-06 Thread Stefan Hajnoczi
Hi Bobby, If you are attending Linux Foundation conferences in Dublin, Ireland next week (Linux Plumbers Conference, Open Source Summit Europe, KVM Forum, ContainerCon Europe, CloudOpen Europe, etc) then you could meet Stefano Garzarella and others to discuss this patch series. Using netdev and

Re: [PATCH v2] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()

2022-08-30 Thread Stefan Hajnoczi
stamp. >So move virtblk_add_req() before blk_mq_start_request(). > - Use blk_mq_requeue_request() instead of requeuing failed request to plug > list >if virtblk_add_req() fails within virtblk_add_req_batch(). > > > dri

Re: [PATCH] virtio_blk: add SECURE ERASE command support

2022-08-25 Thread Stefan Hajnoczi
On Wed, Aug 24, 2022 at 10:48:30PM +0300, Alvaro Karsz wrote: > > How about calculating the minimum of the limits? > > Sounds reasonable. > Should I add it to this patch (as v2)? > Or maybe it can be a follow up patch, and it can include the write > zeros command as well. If you can include it

Re: [PATCH] virtio_blk: add SECURE ERASE command support

2022-08-24 Thread Stefan Hajnoczi
On Wed, Aug 24, 2022 at 09:45:57AM +0300, Alvaro Karsz wrote: > > What about max_secure_erase_seg and secure_erase_sector_alignment? > > Hi Stefan, > If I understand correctly, the Linux kernel uses the same "max > segments" value for a discard and a secure erase command. > > > unsigned int

Re: [PATCH] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()

2022-08-24 Thread Stefan Hajnoczi
On Wed, Aug 24, 2022 at 10:16:10PM +0900, Kim Suwan wrote: > Hi Stefan, > > On Wed, Aug 24, 2022 at 5:56 AM Stefan Hajnoczi wrote: > > > > On Tue, Aug 23, 2022 at 11:50:05PM +0900, Suwan Kim wrote: > > > @@ -409,6 +409,8 @@ static bool virtblk_add_req_batch(s

Re: [PATCH] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()

2022-08-23 Thread Stefan Hajnoczi
On Tue, Aug 23, 2022 at 11:50:05PM +0900, Suwan Kim wrote: > @@ -409,6 +409,8 @@ static bool virtblk_add_req_batch(struct virtio_blk_vq > *vq, > virtblk_unmap_data(req, vbr); > virtblk_cleanup_cmd(req); > rq_list_add(requeue_list,

Re: [PATCH net-next v4 0/9] vsock: updates for SO_RCVLOWAT handling

2022-08-23 Thread Stefan Hajnoczi
On Tue, Aug 23, 2022 at 12:18:52PM -0700, Jakub Kicinski wrote: > On Tue, 23 Aug 2022 15:14:10 -0400 Stefan Hajnoczi wrote: > > Stefano will be online again on Monday. I suggest we wait for him to > > review this series. If it's urgent, please let me know and I'll

Re: [PATCH] virtio_blk: add SECURE ERASE command support

2022-08-23 Thread Stefan Hajnoczi
On Mon, Aug 22, 2022 at 07:20:55PM +0300, Alvaro Karsz wrote: > @@ -1075,6 +1079,12 @@ static int virtblk_probe(struct virtio_device *vdev) > blk_queue_max_write_zeroes_sectors(q, v ? v : UINT_MAX); > } > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_SECURE_ERASE)) { > +

Re: [PATCH net-next v4 0/9] vsock: updates for SO_RCVLOWAT handling

2022-08-23 Thread Stefan Hajnoczi
On Fri, Aug 19, 2022 at 05:21:58AM +, Arseniy Krasnov wrote: > Hello, > > This patchset includes some updates for SO_RCVLOWAT: > > 1) af_vsock: >During my experiments with zerocopy receive, i found, that in some >cases, poll() implementation violates POSIX: when socket has non- >

[PATCH] Documentation: add basic information on vDPA

2022-08-17 Thread Stefan Hajnoczi
ael S. Tsirkin" Cc: Jason Wang Cc: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- Documentation/driver-api/index.rst | 1 + Documentation/driver-api/vdpa.rst | 40 ++ 2 files changed, 41 insertions(+) create mode 100644 Documentation/driver-api/vdpa.rst

Re: [PATCH v2] virtio-blk: Avoid use-after-free on suspend/resume

2022-08-11 Thread Stefan Hajnoczi
lk: support polling I/O") > Cc: "Suwan Kim" > Signed-off-by: Shigeru Yoshida > --- > drivers/block/virtio_blk.c | 24 ++-- > 1 file changed, 10 insertions(+), 14 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature __

Re: [PATCH] virtiofs: delete unused parameter for virtio_fs_cleanup_vqs

2022-06-15 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:08:38PM -0400, Deming Wang wrote: > fs parameter not used. So, it needs to be deleted. > > Signed-off-by: Deming Wang > --- > fs/fuse/virtio_fs.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Stefan Hajnoczi signatu

Re: [PATCH 0/4] virtio-blk: small cleanup

2022-04-25 Thread Stefan Hajnoczi
On Thu, Apr 21, 2022 at 09:56:28PM +, Chaitanya Kulkarni wrote: > On 4/19/22 21:10, Chaitanya Kulkarni wrote: > > Hi, > > > > This has some nit fixes and code cleanups along with removing > > deprecated API fir ida_simple_XXX(). > > > > -ck > > > > Chaitanya Kulkarni (4): > >virtio-blk:

Re: [PATCH 4/4] virtio-blk: remove deprecated ida_simple_XXX()

2022-04-20 Thread Stefan Hajnoczi
d, 4 insertions(+), 4 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 3/4] virtio-blk: avoid function call in the fast path

2022-04-20 Thread Stefan Hajnoczi
On Tue, Apr 19, 2022 at 09:10:52PM -0700, Chaitanya Kulkarni wrote: > We can avoid a function call virtblk_map_data() in the fast path if > block layer request has no physical segments by moving the call > blk_rq_nr_phys_segments() from virtblk_map_data() to virtio_queue_rq(). > > Signed-off-by:

Re: [PATCH 2/4] virtio-blk: don't add a new line

2022-04-20 Thread Stefan Hajnoczi
is subjective. For me personally I prefer it when patches have a clear benefit that outweighs the costs. Nevertheless: Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux

Re: [PATCH 1/4] virtio-blk: remove additional check in fast path

2022-04-20 Thread Stefan Hajnoczi
On Tue, Apr 19, 2022 at 09:10:50PM -0700, Chaitanya Kulkarni wrote: > The function virtblk_setup_cmd() calls > virtblk_setup_discard_write_zeroes() once we process the block layer > request operation setup in the switch. Even though it saves duplicate > call for REQ_OP_DISCARD and

Re: [PATCH v5 0/2] virtio-blk: support polling I/O and mq_ops->queue_rqs()

2022-04-05 Thread Stefan Hajnoczi
ameter instead of QEMU uapi change. > > - Add the comment about virtblk_map_queues(). > > - Add support for mq_ops->queue_rqs() to implement submit side > batch. > > Suwan Kim (2): > virtio-blk: support polling I/O > virtio-blk: support mq

Re: [PATCH v4 2/2] virtio-blk: support mq_ops->queue_rqs()

2022-04-05 Thread Stefan Hajnoczi
-- > fio poll with queue_rqs() | 435K | 601.01 usec > > Signed-off-by: Suwan Kim > --- > drivers/block/virtio_blk.c | 110 + >

Re: [PATCH v4 1/2] virtio-blk: support polling I/O

2022-04-05 Thread Stefan Hajnoczi
On Tue, Apr 05, 2022 at 02:31:21PM +0900, Suwan Kim wrote: > +static int virtblk_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch > *iob) > +{ > + struct virtio_blk *vblk = hctx->queue->queuedata; > + struct virtio_blk_vq *vq = hctx->driver_data; > + struct virtblk_req *vbr; > +

Re: [PATCH] fuse: avoid unnecessary spinlock bump

2022-04-04 Thread Stefan Hajnoczi
anged, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v3 2/2] virtio-blk: support mq_ops->queue_rqs()

2022-03-29 Thread Stefan Hajnoczi
On Tue, Mar 29, 2022 at 10:48:16PM +0900, Suwan Kim wrote: > On Tue, Mar 29, 2022 at 09:45:29AM +0100, Stefan Hajnoczi wrote: > > On Tue, Mar 29, 2022 at 12:50:33AM +0900, Suwan Kim wrote: > > > On Mon, Mar 28, 2022 at 02:16:13PM +0100, Stefan Hajnoczi wrote: > > > >

Re: [PATCH v3 2/2] virtio-blk: support mq_ops->queue_rqs()

2022-03-29 Thread Stefan Hajnoczi
On Tue, Mar 29, 2022 at 12:50:33AM +0900, Suwan Kim wrote: > On Mon, Mar 28, 2022 at 02:16:13PM +0100, Stefan Hajnoczi wrote: > > On Thu, Mar 24, 2022 at 11:04:50PM +0900, Suwan Kim wrote: > > > +static void virtio_queue_rqs(struct request **rqlist) > > > +{ > &g

Re: [PATCH v3 2/2] virtio-blk: support mq_ops->queue_rqs()

2022-03-28 Thread Stefan Hajnoczi
On Thu, Mar 24, 2022 at 11:04:50PM +0900, Suwan Kim wrote: > @@ -367,6 +381,66 @@ static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx > *hctx, > return BLK_STS_OK; > } > > +static bool virtblk_prep_rq_batch(struct virtio_blk_vq *vq, struct request > *req) > +{ > + struct

Re: [PATCH v3 1/2] virtio-blk: support polling I/O

2022-03-28 Thread Stefan Hajnoczi
On Thu, Mar 24, 2022 at 11:04:49PM +0900, Suwan Kim wrote: > +static int virtblk_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch > *iob) > +{ > + struct virtio_blk_vq *vq = hctx->driver_data; > + struct virtblk_req *vbr; > + unsigned long flags; > + unsigned int len; > +

Re: [PATCH net v3 0/3] vsock/virtio: enable VQs early on probe and finish the setup before using them

2022-03-24 Thread Stefan Hajnoczi
; A subtle point is that we still drop events and rx packets during the window where DRIVER_OK has been set but vqs haven't been filled. This is acceptable because it's unavoidable and equivalent to events happening before DRIVER_OK is set. What this revision *does* fix is that vq used buffer

Re: [PATCH net v2 3/3] vsock/virtio: read the negotiated features before using VQs

2022-03-23 Thread Stefan Hajnoczi
ck: enable SEQPACKET for transport") > Suggested-by: Michael S. Tsirkin > Signed-off-by: Stefano Garzarella > --- > net/vmw_vsock/virtio_transport.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [PATCH net v2 2/3] vsock/virtio: initialize vdev->priv before using VQs

2022-03-23 Thread Stefan Hajnoczi
On Wed, Mar 23, 2022 at 09:49:53AM +0100, Stefano Garzarella wrote: > When we fill VQs with empty buffers and kick the host, it may send > an interrupt. `vdev->priv` must be initialized before this since it > is used in the virtqueue callback. > > Fixes: 0deab087b16a ("vsock/virtio: use RCU to

Re: [PATCH net v2 1/3] vsock/virtio: enable VQs early on probe

2022-03-23 Thread Stefan Hajnoczi
On Wed, Mar 23, 2022 at 09:49:52AM +0100, Stefano Garzarella wrote: > virtio spec requires drivers to set DRIVER_OK before using VQs. > This is set automatically after probe returns, but virtio-vsock > driver uses VQs in the probe function to fill rx and event VQs > with new buffers. > > Let's

Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit

2022-03-17 Thread Stefan Hajnoczi
hines") > Signed-off-by: Randy Dunlap > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Paolo Bonzini > Cc: Stefan Hajnoczi > Cc: "James E.J. Bottomley" > Cc: "Martin K. Petersen" > Cc: linux-s...@vger.kernel.org > Cc: virtuali

Re: [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit

2022-03-17 Thread Stefan Hajnoczi
lap > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Paolo Bonzini > Cc: Stefan Hajnoczi > Cc: virtualization@lists.linux-foundation.org > Cc: Jens Axboe > Cc: linux-bl...@vger.kernel.org > --- > drivers/block/virtio_blk.c |8 > 1 file cha

Re: [PATCH] virtio-blk: support polling I/O

2022-03-16 Thread Stefan Hajnoczi
On Wed, Mar 16, 2022 at 05:36:20PM +0200, Max Gurtovoy wrote: > > On 3/16/2022 5:32 PM, Suwan Kim wrote: > > On Wed, Mar 16, 2022 at 10:02:13AM +0800, Jason Wang wrote: > > > On Tue, Mar 15, 2022 at 10:43 PM Suwan Kim wrote: > > > > On Tue, Mar 15, 2022 at 04:59:23PM +0800, Jason Wang wrote: > >

Re: [PATCH] virtio-blk: support polling I/O

2022-03-16 Thread Stefan Hajnoczi
On Tue, Mar 15, 2022 at 10:55:04PM +0900, Suwan Kim wrote: > On Mon, Mar 14, 2022 at 03:19:01PM +0000, Stefan Hajnoczi wrote: > > On Sat, Mar 12, 2022 at 12:28:32AM +0900, Suwan Kim wrote: > > > This patch supports polling I/O via virtio-blk driver. Polling > > &g

Re: [PATCH] virtio-blk: support polling I/O

2022-03-14 Thread Stefan Hajnoczi
On Sat, Mar 12, 2022 at 12:28:32AM +0900, Suwan Kim wrote: > This patch supports polling I/O via virtio-blk driver. Polling > feature is enabled based on "VIRTIO_BLK_F_MQ" feature and the number > of polling queues can be set by QEMU virtio-blk-pci property > "num-poll-queues=N". This patch

Re: [PATCH] virtio-blk: support polling I/O

2022-03-14 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 09:33:08PM +0900, Suwan Kim wrote: > On Mon, Mar 14, 2022 at 02:14:53PM +0800, Jason Wang wrote: > > > > 在 2022/3/11 下午11:28, Suwan Kim 写道: > > > diff --git a/include/uapi/linux/virtio_blk.h > > > b/include/uapi/linux/virtio_blk.h > > > index d888f013d9ff..3fcaf937afe1

Re: [PATCH] virtio-blk: Assign discard_granularity

2022-03-01 Thread Stefan Hajnoczi
On Tue, Mar 01, 2022 at 02:43:55PM +0900, Akihiko Odaki wrote: > On 2022/02/28 19:51, Stefan Hajnoczi wrote: > > On Thu, Feb 24, 2022 at 06:38:02PM +0900, Akihiko Odaki wrote: > > > Virtual I/O Device (VIRTIO) Version 1.1 > > > https://docs.oasis-open.org/virtio/virt

Re: [PATCH] virtio-blk: Assign discard_granularity

2022-02-28 Thread Stefan Hajnoczi
On Thu, Feb 24, 2022 at 06:38:02PM +0900, Akihiko Odaki wrote: > Virtual I/O Device (VIRTIO) Version 1.1 > https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html > > discard_sector_alignment can be used by OS when splitting a request > > based on alignment. > > According

Re: [PATCH v2] vhost/vsock: don't check owner in vhost_vsock_stop() while releasing

2022-02-24 Thread Stefan Hajnoczi
message [MST] > > v1: > https://lore.kernel.org/virtualization/20220221114916.107045-1-sgarz...@redhat.com > --- > drivers/vhost/vsock.c | 21 ++--- > 1 file changed, 14 insertions(+), 7 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP

Re: [PATCH 5/5] virtio_blk: simplify refcounting

2022-02-09 Thread Stefan Hajnoczi
ivers/block/virtio_blk.c | 74 +++--- > 1 file changed, 21 insertions(+), 53 deletions(-) Thanks! Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization

Re: [PATCH 2/5] virtio_blk: simplify refcounting

2022-02-03 Thread Stefan Hajnoczi
On Wed, Feb 02, 2022 at 04:56:56PM +0100, Christoph Hellwig wrote: > @@ -985,8 +947,6 @@ static void virtblk_remove(struct virtio_device *vdev) > kfree(vblk->vqs); > > mutex_unlock(>vdev_mutex); > - > - virtblk_put(vblk); > } Thank you, this is a nice cleanup! One question:

Re: [PATCH v3] vhost: cache avail index in vhost_enable_notify()

2022-02-02 Thread Stefan Hajnoczi
RT_SYMBOL_GPL(vhost_enable_notify); This changes behavior (fixes a bug?): previously the function returned false when called with avail buffers still pending (vq->last_avail_idx < vq->avail_idx). Now it returns true because we compare against vq->last_avail_idx and I think that's reasonable. R

Re: [PATCH v1] vhost: cache avail index in vhost_enable_notify()

2022-01-25 Thread Stefan Hajnoczi
On Tue, Jan 25, 2022 at 12:14:22PM +0100, Stefano Garzarella wrote: > On Mon, Jan 24, 2022 at 11:31:49AM +0000, Stefan Hajnoczi wrote: > > On Fri, Jan 14, 2022 at 10:05:08AM +0100, Stefano Garzarella wrote: > > > In vhost_enable_notify() we enable the notifications and we re

Re: [PATCH v1] vhost: cache avail index in vhost_enable_notify()

2022-01-24 Thread Stefan Hajnoczi
On Fri, Jan 14, 2022 at 10:05:08AM +0100, Stefano Garzarella wrote: > In vhost_enable_notify() we enable the notifications and we read > the avail index to check if new buffers have become available in > the meantime. > > We are not caching the avail index, so when the device will call >

Re: [PATCH 4/5] dax: remove the copy_from_iter and copy_to_iter methods

2021-12-15 Thread Stefan Hajnoczi
On Wed, Dec 15, 2021 at 10:43:33AM -0500, Vivek Goyal wrote: > On Wed, Dec 15, 2021 at 10:30:50AM +0000, Stefan Hajnoczi wrote: > > On Tue, Dec 14, 2021 at 03:32:43PM -0500, Vivek Goyal wrote: > > > On Tue, Dec 14, 2021 at 08:41:30AM -0800, Dan Williams wrote: > > > >

  1   2   3   4   5   6   7   8   >