Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-24 Thread Jason Wang
On Wed, May 24, 2023 at 5:15 PM Michael S. Tsirkin wrote: > > On Wed, May 24, 2023 at 04:18:41PM +0800, Jason Wang wrote: > > This patch convert rx mode setting to be done in a workqueue, this is > > a must for allow to sleep when waiting for the cvq command to > > response since current code is e

Re: [PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine

2023-05-24 Thread Jason Wang
On Wed, May 24, 2023 at 4:03 PM Jason Wang wrote: > > On Mon, May 8, 2023 at 6:05 PM Zhu Lingshan wrote: > > > > This commit synchronize irqs of the virtqueues > > and config space in the reset routine. > > Thus ifcvf_stop_hw() and reset() are refactored as well. > > > > Signed-off-by: Zhu Lingsh

Re: [PATCH] tools/virtio: Add .gitignore to ringtest

2023-05-24 Thread Xuan Zhuo
On Wed, 24 May 2023 20:36:12 +0800, Rong Tao wrote: > From: Rong Tao > > Ignore executions for ringtest. > > Signed-off-by: Rong Tao Is this the resend mail? Or a new version? I replyed to your last mail. THanks. > --- > tools/virtio/ringtest/.gitignore | 7 +++ > 1 file changed, 7 ins

[PATCH 3/3] vhost-scsi: Rename vhost_scsi_iov_to_sgl

2023-05-24 Thread Mike Christie
Rename vhost_scsi_iov_to_sgl to vhost_scsi_map_iov_to_sgl so it matches matches the naming style used for vhost_scsi_copy_iov_to_sgl. Signed-off-by: Mike Christie --- drivers/vhost/scsi.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/vhost/scsi.c b/dri

[PATCH 1/3] vhost-scsi: Fix alignment handling with windows

2023-05-24 Thread Mike Christie
The linux block layer requires bios/requests to have lengths with a 512 byte alignment. Some drivers/layers like dm-crypt and the directi IO code will test for it and just fail. Other drivers like SCSI just assume the requirement is met and will end up in infinte retry loops. The problem for driver

[PATCH 2/3] vhost-scsi: Remove unused write argument

2023-05-24 Thread Mike Christie
The write arg that's passed to the mapping functions is not used so remove it. Signed-off-by: Mike Christie --- drivers/vhost/scsi.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index dbad8fb579eb..382158b397

[PATCH 0/3] vhost-scsi: Fix IO hangs when using windows

2023-05-24 Thread Mike Christie
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 block layer but it requires 512 byte alignment, so depending on the block driver

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-24 Thread Eric W. Biederman
Oleg Nesterov writes: > On 05/23, Eric W. Biederman wrote: >> >> I want to point out that we need to consider not just SIGKILL, but >> SIGABRT that causes a coredump, as well as the process peforming >> an ordinary exit(2). All of which will cause get_signal to return >> SIGKILL in this context.

Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-05-24 Thread Oleg Nesterov
On 05/23, Eric W. Biederman wrote: > > I want to point out that we need to consider not just SIGKILL, but > SIGABRT that causes a coredump, as well as the process peforming > an ordinary exit(2). All of which will cause get_signal to return > SIGKILL in this context. Yes, but probably SIGABRT/exi

Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-24 Thread Michael S. Tsirkin
On Wed, May 24, 2023 at 04:18:41PM +0800, Jason Wang wrote: > This patch convert rx mode setting to be done in a workqueue, this is > a must for allow to sleep when waiting for the cvq command to > response since current code is executed under addr spin lock. > > Signed-off-by: Jason Wang > --- >

[PATCH V3 net-next 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-05-24 Thread Jason Wang
Adding cond_resched() to the command waiting loop for a better co-operation with the scheduler. This allows to give CPU a breath to run other task(workqueue) instead of busy looping when preemption is not allowed on a device whose CVQ might be slow. Signed-off-by: Jason Wang --- drivers/net/virt

[PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-24 Thread Jason Wang
This patch convert rx mode setting to be done in a workqueue, this is a must for allow to sleep when waiting for the cvq command to response since current code is executed under addr spin lock. Signed-off-by: Jason Wang --- Changes since V1: - use RTNL to synchronize rx mode worker --- drivers/n

[PATCH V3 net-next 0/2] virtio-net: don't busy poll for cvq command

2023-05-24 Thread Jason Wang
Hi all: The code used to busy poll for cvq command which turns out to have several side effects: 1) infinite poll for buggy devices 2) bad interaction with scheduler So this series tries to use cond_resched() in the waiting loop. Before doing this we need first make sure the cvq command is not e

Re: [PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine

2023-05-24 Thread Jason Wang
On Mon, May 8, 2023 at 6:05 PM Zhu Lingshan wrote: > > This commit synchronize irqs of the virtqueues > and config space in the reset routine. > Thus ifcvf_stop_hw() and reset() are refactored as well. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/ifcvf/ifcvf_base.c | 41 +