Re: [PATCH] virtio_net: fix lockdep warning on 32 bit

2020-05-06 Thread David Miller
From: "Michael S. Tsirkin" Date: Tue, 5 May 2020 20:01:31 -0400 > - u64_stats_update_end(>stats.syncp); > + u64_stats_update_end_irqrestore(>stats.syncp); Need to pass flags to this function. ___ Virtualization mailing list

Re: [vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?

2020-05-06 Thread David Hildenbrand
> Am 06.05.2020 um 22:28 schrieb Michael S. Tsirkin : > > On Tue, May 05, 2020 at 06:22:51PM +0200, David Hildenbrand wrote: >>> On 05.05.20 18:20, Michael S. Tsirkin wrote: >>> On Tue, May 05, 2020 at 05:46:44PM +0200, David Hildenbrand wrote: On 05.05.20 17:44, Michael S. Tsirkin wrote:

Re: [vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?

2020-05-06 Thread Michael S. Tsirkin
On Tue, May 05, 2020 at 06:22:51PM +0200, David Hildenbrand wrote: > On 05.05.20 18:20, Michael S. Tsirkin wrote: > > On Tue, May 05, 2020 at 05:46:44PM +0200, David Hildenbrand wrote: > >> On 05.05.20 17:44, Michael S. Tsirkin wrote: > >>> On Tue, May 05, 2020 at 04:50:13PM +0200, David

Re: [PATCH v3 64/75] x86/sev-es: Cache CPUID results for improved performance

2020-05-06 Thread Tom Lendacky
On 5/6/20 1:08 PM, Mike Stunes wrote: On Apr 28, 2020, at 8:17 AM, Joerg Roedel wrote: From: Mike Stunes To avoid a future VMEXIT for a subsequent CPUID function, cache the results returned by CPUID into an xarray. [tl: coding standard changes, register zero extension] Signed-off-by:

[PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers

2020-05-06 Thread Jason Wang
We should not exclude headroom and tailroom when XDP is set. So this patch fixes this by initializing the truesize from PAGE_SIZE when XDP is set. Cc: Jesper Dangaard Brouer Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Jason Wang
We tried to reserve space for vnet header before xdp.data_hard_start. But this is useless since the packet could be modified by XDP which may invalidate the information stored in the header and there's no way for XDP to know the existence of the vnet header currently. So let's just not reserve

Re: [PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote: > We should not exclude headroom and tailroom when XDP is set. So this > patch fixes this by initializing the truesize from PAGE_SIZE when XDP > is set. > > Cc: Jesper Dangaard Brouer > Signed-off-by: Jason Wang Seems too aggressive,

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Jason Wang
On 2020/5/6 下午3:53, Michael S. Tsirkin wrote: On Wed, May 06, 2020 at 02:16:32PM +0800, Jason Wang wrote: We tried to reserve space for vnet header before xdp.data_hard_start. But this is useless since the packet could be modified by XDP which may invalidate the information stored in the

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Jason Wang
On 2020/5/6 下午4:21, Jesper Dangaard Brouer wrote: On Wed, 6 May 2020 14:16:32 +0800 Jason Wang wrote: We tried to reserve space for vnet header before xdp.data_hard_start. But this is useless since the packet could be modified by XDP which may invalidate the information stored in the header

Re: [GIT PULL] vhost: fixes

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 03:28:47AM +, Justin He wrote: > Hi Michael > > > -Original Message- > > From: Michael S. Tsirkin > > Sent: Monday, May 4, 2020 8:16 PM > > To: Linus Torvalds > > Cc: k...@vger.kernel.org; virtualization@lists.linux-foundation.org; > > net...@vger.kernel.org;

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 02:16:32PM +0800, Jason Wang wrote: > We tried to reserve space for vnet header before > xdp.data_hard_start. But this is useless since the packet could be > modified by XDP which may invalidate the information stored in the > header and there's no way for XDP to know the

performance bug in virtio net xdp

2020-05-06 Thread Michael S. Tsirkin
So for mergeable bufs, we use ewma machinery to guess the correct buffer size. If we don't guess correctly, XDP has to do aggressive copies. Problem is, xdp paths do not update the ewma at all, except sometimes with XDP_PASS. So whatever we happen to have before we attach XDP, will mostly stay

Re: performance bug in virtio net xdp

2020-05-06 Thread Jason Wang
On 2020/5/6 下午4:08, Michael S. Tsirkin wrote: So for mergeable bufs, we use ewma machinery to guess the correct buffer size. If we don't guess correctly, XDP has to do aggressive copies. Problem is, xdp paths do not update the ewma at all, except sometimes with XDP_PASS. So whatever we happen

Re: performance bug in virtio net xdp

2020-05-06 Thread Jesper Dangaard Brouer
On Wed, 6 May 2020 04:08:27 -0400 "Michael S. Tsirkin" wrote: > So for mergeable bufs, we use ewma machinery to guess the correct buffer > size. If we don't guess correctly, XDP has to do aggressive copies. > > Problem is, xdp paths do not update the ewma at all, except > sometimes with

Re: [GIT PULL] vhost: fixes

2020-05-06 Thread Greg KH
On Wed, May 06, 2020 at 03:19:55AM -0400, Michael S. Tsirkin wrote: > On Wed, May 06, 2020 at 03:28:47AM +, Justin He wrote: > > Hi Michael > > > > > -Original Message- > > > From: Michael S. Tsirkin > > > Sent: Monday, May 4, 2020 8:16 PM > > > To: Linus Torvalds > > > Cc:

Re: [PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers

2020-05-06 Thread Jason Wang
On 2020/5/6 下午3:37, Michael S. Tsirkin wrote: On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote: We should not exclude headroom and tailroom when XDP is set. So this patch fixes this by initializing the truesize from PAGE_SIZE when XDP is set. Cc: Jesper Dangaard Brouer

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Jesper Dangaard Brouer
On Wed, 6 May 2020 14:16:32 +0800 Jason Wang wrote: > We tried to reserve space for vnet header before > xdp.data_hard_start. But this is useless since the packet could be > modified by XDP which may invalidate the information stored in the > header and IMHO above statements are wrong. XDP

Re: [GIT PULL] vhost: fixes

2020-05-06 Thread Stefano Garzarella
On Wed, May 06, 2020 at 03:19:55AM -0400, Michael S. Tsirkin wrote: > On Wed, May 06, 2020 at 03:28:47AM +, Justin He wrote: > > Hi Michael > > > > > -Original Message- > > > From: Michael S. Tsirkin > > > Sent: Monday, May 4, 2020 8:16 PM > > > To: Linus Torvalds > > > Cc:

Re: [PATCH] iommu/virtio: reverse arguments to list_add

2020-05-06 Thread Jean-Philippe Brucker
On Tue, May 05, 2020 at 08:47:47PM +0200, Julia Lawall wrote: > Elsewhere in the file, there is a list_for_each_entry with > >resv_regions as the second argument, suggesting that > >resv_regions is the list head. So exchange the > arguments on the list_add call to put the list head in the >

Re: [GIT PULL] vhost: fixes

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 11:25:46AM +0200, Stefano Garzarella wrote: > On Wed, May 06, 2020 at 03:19:55AM -0400, Michael S. Tsirkin wrote: > > On Wed, May 06, 2020 at 03:28:47AM +, Justin He wrote: > > > Hi Michael > > > > > > > -Original Message- > > > > From: Michael S. Tsirkin > >

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 04:19:40PM +0800, Jason Wang wrote: > > On 2020/5/6 下午3:53, Michael S. Tsirkin wrote: > > On Wed, May 06, 2020 at 02:16:32PM +0800, Jason Wang wrote: > > > We tried to reserve space for vnet header before > > > xdp.data_hard_start. But this is useless since the packet

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 04:34:36PM +0800, Jason Wang wrote: > > On 2020/5/6 下午4:21, Jesper Dangaard Brouer wrote: > > On Wed, 6 May 2020 14:16:32 +0800 > > Jason Wang wrote: > > > > > We tried to reserve space for vnet header before > > > xdp.data_hard_start. But this is useless since the

Re: performance bug in virtio net xdp

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 10:37:57AM +0200, Jesper Dangaard Brouer wrote: > On Wed, 6 May 2020 04:08:27 -0400 > "Michael S. Tsirkin" wrote: > > > So for mergeable bufs, we use ewma machinery to guess the correct buffer > > size. If we don't guess correctly, XDP has to do aggressive copies. > > >

Re: performance bug in virtio net xdp

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 04:37:41PM +0800, Jason Wang wrote: > > On 2020/5/6 下午4:08, Michael S. Tsirkin wrote: > > So for mergeable bufs, we use ewma machinery to guess the correct buffer > > size. If we don't guess correctly, XDP has to do aggressive copies. > > > > Problem is, xdp paths do not

Re: [PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 04:21:15PM +0800, Jason Wang wrote: > > On 2020/5/6 下午3:37, Michael S. Tsirkin wrote: > > On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote: > > > We should not exclude headroom and tailroom when XDP is set. So this > > > patch fixes this by initializing the