[PATCH net-next v3 4/4] virtio_net: improve dim command request efficiency

2024-06-05 Thread Heng Qi
Currently, control vq handles commands synchronously, leading to increased delays for dim commands during multi-queue VM configuration and directly impacting dim performance. To address this, we are shifting to asynchronous processing of ctrlq's dim commands. Signed-off-by: Heng Qi --- drivers/

[PATCH net-next v3 2/4] virtio_net: enable irq for the control vq

2024-06-05 Thread Heng Qi
If the device does not respond to a request for a long time, then control vq polling elevates CPU utilization, a problem that exacerbates with more command requests. Enabling control vq's irq is advantageous for the guest, and this still doesn't support concurrent requests. Suggested-by: Jason Wa

[PATCH net-next v3 1/4] virtio_net: passing control_buf explicitly

2024-06-05 Thread Heng Qi
In a later patch, the driver may send requests concurrently, in which case each command will have its own control buffer, so we refactor virtnet_send_command_reply() to pass the control buffer explicitly as a parameter. Signed-off-by: Heng Qi --- drivers/net/virtio_net.c | 22 ---

[PATCH net-next v3 3/4] virtio_net: change the command token to completion

2024-06-05 Thread Heng Qi
Previously, control vq only allowed a single request to be sent, so using virtnet_info as a global token was fine. To support concurrent requests, the driver needs to use a command-level token to distinguish between requests that have been sent. Signed-off-by: Heng Qi --- drivers/net/virtio_net.

[PATCH net-next v3 0/4] virtio_net: enable the irq for ctrlq

2024-06-05 Thread Heng Qi
Ctrlq in polling mode may cause the virtual machine to hang and occupy additional CPU resources. Enabling the irq for ctrlq alleviates this problem and allows commands to be requested concurrently. Changelog = v2->v3: - Use the completion for dim cmds. v1->v2: - Refactor the patch 1 a

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-05 Thread Michael S. Tsirkin
On Thu, Jun 06, 2024 at 12:25:15PM +0800, Jason Wang wrote: > > If the codes of orphan mode don't have an impact when you enable > > napi_tx mode, please keep it if you can. > > For example, it complicates BQL implementation. > > Thanks I very much doubt sending interrupts to a VM can *on all be

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-05 Thread Jason Wang
On Thu, Jun 6, 2024 at 10:59 AM Jason Xing wrote: > > Hello Jason, > > On Thu, Jun 6, 2024 at 8:21 AM Jason Wang wrote: > > > > On Wed, Jun 5, 2024 at 7:51 PM Heng Qi wrote: > > > > > > On Wed, 5 Jun 2024 13:30:51 +0200, Jiri Pirko wrote: > > > > Mon, May 20, 2024 at 02:48:15PM CEST, j...@resnu

Re: [PATCH vhost v13 04/12] virtio_ring: support add premapped buf

2024-06-05 Thread Xuan Zhuo
On Tue, 04 Jun 2024 18:07:44 +0200, Ilya Leoshkevich wrote: > On Thu, 2023-08-10 at 20:30 +0800, Xuan Zhuo wrote: > > If the vq is the premapped mode, use the sg_dma_address() directly. > > > > Signed-off-by: Xuan Zhuo > > --- > >  drivers/virtio/virtio_ring.c | 19 +-- > >  1 file

Re: [PATCH net-next v2 2/2] virtio_net: improve dim command request efficiency

2024-06-05 Thread Heng Qi
On Thu, 6 Jun 2024 08:27:35 +0800, Jason Wang wrote: > On Wed, Jun 5, 2024 at 10:56 PM Heng Qi wrote: > > > > Currently, the control queue (ctrlq) handles commands synchronously, > > leading to increased delays for dim commands during multi-queue > > VM configuration and directly impacting dim pe

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-05 Thread Jason Xing
Hello Jason, On Thu, Jun 6, 2024 at 8:21 AM Jason Wang wrote: > > On Wed, Jun 5, 2024 at 7:51 PM Heng Qi wrote: > > > > On Wed, 5 Jun 2024 13:30:51 +0200, Jiri Pirko wrote: > > > Mon, May 20, 2024 at 02:48:15PM CEST, j...@resnulli.us wrote: > > > >Fri, May 10, 2024 at 09:11:16AM CEST, hen...@li

Re: [PATCH net-next v2 2/2] virtio_net: improve dim command request efficiency

2024-06-05 Thread Jason Wang
On Wed, Jun 5, 2024 at 10:56 PM Heng Qi wrote: > > Currently, the control queue (ctrlq) handles commands synchronously, > leading to increased delays for dim commands during multi-queue > VM configuration and directly impacting dim performance. > > To address this, we are shifting to asynchronous

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-05 Thread Jason Wang
On Wed, Jun 5, 2024 at 7:51 PM Heng Qi wrote: > > On Wed, 5 Jun 2024 13:30:51 +0200, Jiri Pirko wrote: > > Mon, May 20, 2024 at 02:48:15PM CEST, j...@resnulli.us wrote: > > >Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com wrote: > > >>On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko

Re: [PATCH vhost v13 04/12] virtio_ring: support add premapped buf

2024-06-05 Thread Ilya Leoshkevich
On Tue, 2024-06-04 at 18:17 +0200, Alexander Potapenko wrote: > On Tue, Jun 4, 2024 at 6:07 PM Ilya Leoshkevich > wrote: > > > > On Thu, 2023-08-10 at 20:30 +0800, Xuan Zhuo wrote: > > > If the vq is the premapped mode, use the sg_dma_address() > > > directly. > > > > > > Signed-off-by: Xuan Zhu

[PATCH net-next v2 2/2] virtio_net: improve dim command request efficiency

2024-06-05 Thread Heng Qi
Currently, the control queue (ctrlq) handles commands synchronously, leading to increased delays for dim commands during multi-queue VM configuration and directly impacting dim performance. To address this, we are shifting to asynchronous processing of ctrlq's dim commands. Signed-off-by: Heng Qi

[PATCH net-next v2 0/2] virtio_net: enable the irq for ctrlq

2024-06-05 Thread Heng Qi
Ctrlq in polling mode may cause the virtual machine to hang and occupy additional CPU resources. Enabling the irq for ctrlq alleviates this problem and allows commands to be requested concurrently. Changelog = v1->v2: - Refactor the patch 1 and rephase the commit log. Heng Qi (2): vir

[PATCH net-next v2 1/2] virtio_net: enable irq for the control vq

2024-06-05 Thread Heng Qi
If the device does not respond to a request for a long time, then control vq polling elevates CPU utilization, a problem that exacerbates with more command requests. Enabling control vq's irq is advantageous for the guest, and this still doesn't support concurrent requests. This code is basically

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-05 Thread Heng Qi
On Wed, 5 Jun 2024 13:30:51 +0200, Jiri Pirko wrote: > Mon, May 20, 2024 at 02:48:15PM CEST, j...@resnulli.us wrote: > >Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com wrote: > >>On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko wrote: > >>> From: Jiri Pirko > >>> > >>> Add support

Re: [patch net-next] virtio_net: add support for Byte Queue Limits

2024-06-05 Thread Jiri Pirko
Mon, May 20, 2024 at 02:48:15PM CEST, j...@resnulli.us wrote: >Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com wrote: >>On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Add support for Byte Queue Limits (BQL). >> >>Historically both Jason and Mich