Re: [PATCH 0/5] virtio_net: enable premapped mode by default

2024-10-18 Thread Darren Kenny
Hi Michael / Xuan Zhuo, On Wednesday, 2024-10-16 at 08:55:21 +01, Darren Kenny wrote: > Hi Michael, > > On Monday, 2024-10-14 at 00:57:41 -04, Michael S. Tsirkin wrote: >> On Mon, Oct 14, 2024 at 11:12:29AM +0800, Xuan Zhuo wrote: >>> In the last linux version, we disabled this feature to fix the

Re: [PATCH 4/5] virtio_net: enable premapped mode for merge and small by default

2024-10-18 Thread Jason Wang
On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote: > > Currently, the virtio core will perform a dma operation for each > buffer. Although, the same page may be operated multiple times. > > In premapped mod, we can perform only one dma operation for the pages of > the alloc frag. This is beneficial

Re: [PATCH 2/5] virtio_net: introduce vi->mode

2024-10-18 Thread Jason Wang
On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote: > > Now, if we want to judge the rx work mode, we have to use such codes: > > 1. merge mode: vi->mergeable_rx_bufs > 2. big mode: vi->big_packets && !vi->mergeable_rx_bufs > 3. small: !vi->big_packets && !vi->mergeable_rx_bufs > > This is inc

Re: [PATCH 5/5] virtio_net: rx remove premapped failover code

2024-10-18 Thread Jason Wang
On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote: > > Now, the premapped mode can be enabled unconditionally. > > So we can remove the failover code for merge and small mode. > > Signed-off-by: Xuan Zhuo Let's be more verbose here. For example, the virtnet_rq_xxx() helper would be only used if t

Re: [PATCH 1/5] virtio-net: fix overflow inside virtnet_rq_alloc

2024-10-18 Thread Jason Wang
On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote: > > When the frag just got a page, then may lead to regression on VM. > Specially if the sysctl net.core.high_order_alloc_disable value is 1, > then the frag always get a page when do refill. > > Which could see reliable crashes or scp failure (scp