Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Jason Wang
On Mon, Jan 22, 2024 at 3:36 PM Xuan Zhuo wrote: > > On Mon, 22 Jan 2024 15:19:12 +0800, Jason Wang wrote: > > On Mon, Jan 22, 2024 at 3:07 PM Xuan Zhuo > > wrote: > > > > > > On Mon, 22 Jan 2024 14:58:09 +0800, Jason Wang > > > wrote: > > > > On Mon, Jan 22, 2024 at 2:55 PM Jason Wang wrote

Re: [PATCH net-next 3/3] virtio-net: reduce the CPU consumption of dim worker

2024-01-21 Thread Xuan Zhuo
On Tue, 16 Jan 2024 21:11:33 +0800, Heng Qi wrote: > Accumulate multiple request commands to kick the device once, > and obtain the processing results of the corresponding commands > asynchronously. The batch command method is used to optimize the > CPU overhead of the DIM worker caused by the gue

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Xuan Zhuo
On Mon, 22 Jan 2024 15:19:12 +0800, Jason Wang wrote: > On Mon, Jan 22, 2024 at 3:07 PM Xuan Zhuo wrote: > > > > On Mon, 22 Jan 2024 14:58:09 +0800, Jason Wang wrote: > > > On Mon, Jan 22, 2024 at 2:55 PM Jason Wang wrote: > > > > > > > > On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo > > > > wrot

Re: [PATCH net-next 3/3] virtio-net: reduce the CPU consumption of dim worker

2024-01-21 Thread Xuan Zhuo
On Tue, 16 Jan 2024 21:11:33 +0800, Heng Qi wrote: > Accumulate multiple request commands to kick the device once, > and obtain the processing results of the corresponding commands > asynchronously. The batch command method is used to optimize the > CPU overhead of the DIM worker caused by the gue

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Jason Wang
On Mon, Jan 22, 2024 at 3:07 PM Xuan Zhuo wrote: > > On Mon, 22 Jan 2024 14:58:09 +0800, Jason Wang wrote: > > On Mon, Jan 22, 2024 at 2:55 PM Jason Wang wrote: > > > > > > On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo > > > wrote: > > > > > > > > On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang >

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Xuan Zhuo
On Mon, 22 Jan 2024 14:58:09 +0800, Jason Wang wrote: > On Mon, Jan 22, 2024 at 2:55 PM Jason Wang wrote: > > > > On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo > > wrote: > > > > > > On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang > > > wrote: > > > > On Mon, Jan 22, 2024 at 12:00 PM Xuan Zhuo >

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Xuan Zhuo
On Mon, 22 Jan 2024 14:55:46 +0800, Jason Wang wrote: > On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo wrote: > > > > On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang wrote: > > > On Mon, Jan 22, 2024 at 12:00 PM Xuan Zhuo > > > wrote: > > > > > > > > On Mon, 22 Jan 2024 11:14:30 +0800, Jason Wang

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Jason Wang
On Mon, Jan 22, 2024 at 2:55 PM Jason Wang wrote: > > On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo wrote: > > > > On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang wrote: > > > On Mon, Jan 22, 2024 at 12:00 PM Xuan Zhuo > > > wrote: > > > > > > > > On Mon, 22 Jan 2024 11:14:30 +0800, Jason Wang >

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Jason Wang
On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo wrote: > > On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang wrote: > > On Mon, Jan 22, 2024 at 12:00 PM Xuan Zhuo > > wrote: > > > > > > On Mon, 22 Jan 2024 11:14:30 +0800, Jason Wang > > > wrote: > > > > On Mon, Jan 22, 2024 at 10:12 AM Zhu Yanjun >

Re: [PATCH net-next v3 06/27] virtio_ring: introduce virtqueue_get_buf_ctx_dma()

2024-01-21 Thread Jason Wang
On Mon, Jan 22, 2024 at 2:12 PM Xuan Zhuo wrote: > > On Mon, 22 Jan 2024 12:18:51 +0800, Jason Wang wrote: > > On Tue, Jan 16, 2024 at 3:47 PM Xuan Zhuo > > wrote: > > > > > > On Thu, 11 Jan 2024 16:34:09 +0800, Jason Wang > > > wrote: > > > > On Fri, Dec 29, 2023 at 3:31 PM Xuan Zhuo > > >

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Xuan Zhuo
On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang wrote: > On Mon, Jan 22, 2024 at 12:00 PM Xuan Zhuo wrote: > > > > On Mon, 22 Jan 2024 11:14:30 +0800, Jason Wang wrote: > > > On Mon, Jan 22, 2024 at 10:12 AM Zhu Yanjun wrote: > > > > > > > > > > > > 在 2024/1/20 1:29, Andrew Lunn 写道: > > > >

Re: [PATCH net-next v3 06/27] virtio_ring: introduce virtqueue_get_buf_ctx_dma()

2024-01-21 Thread Xuan Zhuo
On Mon, 22 Jan 2024 12:18:51 +0800, Jason Wang wrote: > On Tue, Jan 16, 2024 at 3:47 PM Xuan Zhuo wrote: > > > > On Thu, 11 Jan 2024 16:34:09 +0800, Jason Wang wrote: > > > On Fri, Dec 29, 2023 at 3:31 PM Xuan Zhuo > > > wrote: > > > > > > > > introduce virtqueue_get_buf_ctx_dma() to collect t

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Heng Qi
在 2024/1/22 上午11:08, Jason Wang 写道: On Fri, Jan 19, 2024 at 10:27 PM Heng Qi wrote: 在 2024/1/18 下午8:01, Zhu Yanjun 写道: 在 2024/1/16 20:04, Paolo Abeni 写道: On Mon, 2024-01-15 at 09:29 +0800, Zhu Yanjun wrote: From: Zhu Yanjun Some devices emulate the virtio_net hardwares. When virtio_ne

Re: [PATCH net-next 00/17] virtio-net: support AF_XDP zero copy (3/3)

2024-01-21 Thread Jason Wang
On Wed, Jan 17, 2024 at 1:58 PM Xuan Zhuo wrote: > > On Tue, 16 Jan 2024 07:07:05 -0800, Jakub Kicinski wrote: > > On Tue, 16 Jan 2024 13:37:30 +0100 Paolo Abeni wrote: > > > For future submission it would be better if you split this series in > > > smaller chunks: the maximum size allowed is 15

Re: [PATCH net-next v3 06/27] virtio_ring: introduce virtqueue_get_buf_ctx_dma()

2024-01-21 Thread Jason Wang
On Tue, Jan 16, 2024 at 3:47 PM Xuan Zhuo wrote: > > On Thu, 11 Jan 2024 16:34:09 +0800, Jason Wang wrote: > > On Fri, Dec 29, 2023 at 3:31 PM Xuan Zhuo > > wrote: > > > > > > introduce virtqueue_get_buf_ctx_dma() to collect the dma info when > > > get buf from virtio core for premapped mode. >

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Jason Wang
On Mon, Jan 22, 2024 at 12:00 PM Xuan Zhuo wrote: > > On Mon, 22 Jan 2024 11:14:30 +0800, Jason Wang wrote: > > On Mon, Jan 22, 2024 at 10:12 AM Zhu Yanjun wrote: > > > > > > > > > 在 2024/1/20 1:29, Andrew Lunn 写道: > > > >while (!virtqueue_get_buf(vi->cvq, &tmp) && > > > > -

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Xuan Zhuo
On Mon, 22 Jan 2024 11:14:30 +0800, Jason Wang wrote: > On Mon, Jan 22, 2024 at 10:12 AM Zhu Yanjun wrote: > > > > > > 在 2024/1/20 1:29, Andrew Lunn 写道: > > >while (!virtqueue_get_buf(vi->cvq, &tmp) && > > > - !virtqueue_is_broken(vi->cvq)) > > > + !virtque

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Jason Wang
On Mon, Jan 22, 2024 at 10:12 AM Zhu Yanjun wrote: > > > 在 2024/1/20 1:29, Andrew Lunn 写道: > >while (!virtqueue_get_buf(vi->cvq, &tmp) && > > - !virtqueue_is_broken(vi->cvq)) > > + !virtqueue_is_broken(vi->cvq)) { > > +if (timeout) > > +

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Jason Wang
On Fri, Jan 19, 2024 at 10:27 PM Heng Qi wrote: > > > > 在 2024/1/18 下午8:01, Zhu Yanjun 写道: > > > > 在 2024/1/16 20:04, Paolo Abeni 写道: > >> On Mon, 2024-01-15 at 09:29 +0800, Zhu Yanjun wrote: > >>> From: Zhu Yanjun > >>> > >>> Some devices emulate the virtio_net hardwares. When virtio_net > >>> d

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Jason Wang
On Mon, Jan 15, 2024 at 6:22 PM Zhu Yanjun wrote: > > > 在 2024/1/15 10:20, Jason Wang 写道: > > On Mon, Jan 15, 2024 at 9:35 AM Zhu Yanjun wrote: > > From: Zhu Yanjun > > Some devices emulate the virtio_net hardwares. When virtio_net > driver sends commands to the emulated hardware, normally the >

Re: [PATCH 1/1] virtio_net: Add timeout handler to avoid kernel hang

2024-01-21 Thread Zhu Yanjun
在 2024/1/20 1:29, Andrew Lunn 写道:   while (!virtqueue_get_buf(vi->cvq, &tmp) && -   !virtqueue_is_broken(vi->cvq)) +   !virtqueue_is_broken(vi->cvq)) { +    if (timeout) +    timeout--; This is not really a timeout, just a loop counter. 200 iterations could be