Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
On 2020/6/23 上午12:00, Michael S. Tsirkin wrote: On Wed, Jun 17, 2020 at 11:19:26AM +0800, Jason Wang wrote: On 2020/6/11 下午7:34, Michael S. Tsirkin wrote: static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq) { kfree(vq->descs); @@ -394,6 +400,9 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) for (i = 0; i < dev->nvqs; ++i) { vq = dev->vqs[i]; vq->max_descs = dev->iov_limit; + if (vhost_vq_num_batch_descs(vq) < 0) { + return -EINVAL; + } This check breaks vdpa which set iov_limit to zero. Consider iov_limit is meaningless to vDPA, I wonder we can skip the test when device doesn't use worker. Thanks It doesn't need iovecs at all, right? -- MST Yes, so we may choose to bypass the iovecs as well. Thanks ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
On Mon, Jun 22, 2020 at 06:11:21PM +0200, Eugenio Perez Martin wrote: > On Mon, Jun 22, 2020 at 5:55 PM Michael S. Tsirkin wrote: > > > > On Fri, Jun 19, 2020 at 08:07:57PM +0200, Eugenio Perez Martin wrote: > > > On Mon, Jun 15, 2020 at 2:28 PM Eugenio Perez Martin > > > wrote: > > > > > > > > On Thu, Jun 11, 2020 at 5:22 PM Konrad Rzeszutek Wilk > > > > wrote: > > > > > > > > > > On Thu, Jun 11, 2020 at 07:34:19AM -0400, Michael S. Tsirkin wrote: > > > > > > As testing shows no performance change, switch to that now. > > > > > > > > > > What kind of testing? 100GiB? Low latency? > > > > > > > > > > > > > Hi Konrad. > > > > > > > > I tested this version of the patch: > > > > https://lkml.org/lkml/2019/10/13/42 > > > > > > > > It was tested for throughput with DPDK's testpmd (as described in > > > > http://doc.dpdk.org/guides/howto/virtio_user_as_exceptional_path.html) > > > > and kernel pktgen. No latency tests were performed by me. Maybe it is > > > > interesting to perform a latency test or just a different set of tests > > > > over a recent version. > > > > > > > > Thanks! > > > > > > I have repeated the tests with v9, and results are a little bit different: > > > * If I test opening it with testpmd, I see no change between versions > > > > > > OK that is testpmd on guest, right? And vhost-net on the host? > > > > Hi Michael. > > No, sorry, as described in > http://doc.dpdk.org/guides/howto/virtio_user_as_exceptional_path.html. > But I could add to test it in the guest too. > > These kinds of raw packets "bursts" do not show performance > differences, but I could test deeper if you think it would be worth > it. Oh ok, so this is without guest, with virtio-user. It might be worth checking dpdk within guest too just as another data point. > > > * If I forward packets between two vhost-net interfaces in the guest > > > using a linux bridge in the host: > > > > And here I guess you mean virtio-net in the guest kernel? > > Yes, sorry: Two virtio-net interfaces connected with a linux bridge in > the host. More precisely: > * Adding one of the interfaces to another namespace, assigning it an > IP, and starting netserver there. > * Assign another IP in the range manually to the other virtual net > interface, and start the desired test there. > > If you think it would be better to perform then differently please let me > know. Not sure why you bother with namespaces since you said you are using L2 bridging. I guess it's unimportant. > > > > > - netperf UDP_STREAM shows a performance increase of 1.8, almost > > > doubling performance. This gets lower as frame size increase. > > > - rests of the test goes noticeably worse: UDP_RR goes from ~6347 > > > transactions/sec to 5830 > > > > OK so it seems plausible that we still have a bug where an interrupt > > is delayed. That is the main difference between pmd and virtio. > > Let's try disabling event index, and see what happens - that's > > the trickiest part of interrupts. > > > > Got it, will get back with the results. > > Thank you very much! > > > > > > > > - TCP_STREAM goes from ~10.7 gbps to ~7Gbps > > > - TCP_RR from 6223.64 transactions/sec to 5739.44 > > ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
On Wed, Jun 17, 2020 at 11:19:26AM +0800, Jason Wang wrote: > > On 2020/6/11 下午7:34, Michael S. Tsirkin wrote: > > static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq) > > { > > kfree(vq->descs); > > @@ -394,6 +400,9 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev > > *dev) > > for (i = 0; i < dev->nvqs; ++i) { > > vq = dev->vqs[i]; > > vq->max_descs = dev->iov_limit; > > + if (vhost_vq_num_batch_descs(vq) < 0) { > > + return -EINVAL; > > + } > > > This check breaks vdpa which set iov_limit to zero. Consider iov_limit is > meaningless to vDPA, I wonder we can skip the test when device doesn't use > worker. > > Thanks It doesn't need iovecs at all, right? -- MST ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: AMD IOMMU + SME + amdgpu regression
Excerpts from Joerg Roedel's message of June 22, 2020 6:02 am: > Hi Alex, > > On Thu, Jun 11, 2020 at 07:05:21PM -0400, Alex Xu (Hello71) wrote: >> I am using an ASRock B450 Pro4 with Ryzen 1600 and ASUS RX 480. I don't >> understand this code at all, but let me know what I can do to >> troubleshoot. > > Does it boot without SME enabled? > > > Regards, > > Joerg > Yes, it works with SME off with dbed452a078 ("dma-pool: decouple DMA_REMAP from DMA_COHERENT_POOL") applied. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
On Fri, Jun 19, 2020 at 08:07:57PM +0200, Eugenio Perez Martin wrote: > On Mon, Jun 15, 2020 at 2:28 PM Eugenio Perez Martin > wrote: > > > > On Thu, Jun 11, 2020 at 5:22 PM Konrad Rzeszutek Wilk > > wrote: > > > > > > On Thu, Jun 11, 2020 at 07:34:19AM -0400, Michael S. Tsirkin wrote: > > > > As testing shows no performance change, switch to that now. > > > > > > What kind of testing? 100GiB? Low latency? > > > > > > > Hi Konrad. > > > > I tested this version of the patch: > > https://lkml.org/lkml/2019/10/13/42 > > > > It was tested for throughput with DPDK's testpmd (as described in > > http://doc.dpdk.org/guides/howto/virtio_user_as_exceptional_path.html) > > and kernel pktgen. No latency tests were performed by me. Maybe it is > > interesting to perform a latency test or just a different set of tests > > over a recent version. > > > > Thanks! > > I have repeated the tests with v9, and results are a little bit different: > * If I test opening it with testpmd, I see no change between versions OK that is testpmd on guest, right? And vhost-net on the host? > * If I forward packets between two vhost-net interfaces in the guest > using a linux bridge in the host: And here I guess you mean virtio-net in the guest kernel? > - netperf UDP_STREAM shows a performance increase of 1.8, almost > doubling performance. This gets lower as frame size increase. > - rests of the test goes noticeably worse: UDP_RR goes from ~6347 > transactions/sec to 5830 OK so it seems plausible that we still have a bug where an interrupt is delayed. That is the main difference between pmd and virtio. Let's try disabling event index, and see what happens - that's the trickiest part of interrupts. > - TCP_STREAM goes from ~10.7 gbps to ~7Gbps > - TCP_RR from 6223.64 transactions/sec to 5739.44 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: AMD IOMMU + SME + amdgpu regression
Hi Alex, On Thu, Jun 11, 2020 at 07:05:21PM -0400, Alex Xu (Hello71) wrote: > I am using an ASRock B450 Pro4 with Ryzen 1600 and ASUS RX 480. I don't > understand this code at all, but let me know what I can do to > troubleshoot. Does it boot without SME enabled? Regards, Joerg ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [RFC v9 09/11] vhost/scsi: switch to buf APIs
On Fri, Jun 19, 2020 at 08:23:00PM +0200, Eugenio Pérez wrote: > @@ -1139,9 +1154,9 @@ vhost_scsi_send_tmf_reject(struct vhost_scsi *vs, > iov_iter_init(_iter, READ, >iov[vc->out], vc->in, sizeof(rsp)); > > ret = copy_to_iter(, sizeof(rsp), _iter); > - if (likely(ret == sizeof(rsp))) > - vhost_add_used_and_signal(>dev, vq, vc->head, 0); > - else > + if (likely(ret == sizeof(rsp))) { > + vhost_scsi_signal_noinput(>dev, vq, >buf); > + } else > pr_err("Faulted on virtio_scsi_ctrl_tmf_resp\n"); > } The curly brackets are not necessary, but the patch still looks fine: Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [RFC v9 10/11] vhost/vsock: switch to the buf API
On Fri, Jun 19, 2020 at 08:23:01PM +0200, Eugenio Pérez wrote: > From: "Michael S. Tsirkin" > > A straight-forward conversion. > > Signed-off-by: Michael S. Tsirkin > Signed-off-by: Eugenio Pérez > --- > drivers/vhost/vsock.c | 30 ++ > 1 file changed, 18 insertions(+), 12 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH V2] drivers/block: Use kobj_to_dev() API
On Sat, Jun 20, 2020 at 09:53:43AM +0800, Wang Qing wrote: > Use kobj_to_dev() API instead of container_of(). > > Signed-off-by: Wang Qing > --- > drivers/block/virtio_blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
On 2020/6/20 上午2:07, Eugenio Perez Martin wrote: On Mon, Jun 15, 2020 at 2:28 PM Eugenio Perez Martin wrote: On Thu, Jun 11, 2020 at 5:22 PM Konrad Rzeszutek Wilk wrote: On Thu, Jun 11, 2020 at 07:34:19AM -0400, Michael S. Tsirkin wrote: As testing shows no performance change, switch to that now. What kind of testing? 100GiB? Low latency? Hi Konrad. I tested this version of the patch: https://lkml.org/lkml/2019/10/13/42 It was tested for throughput with DPDK's testpmd (as described in http://doc.dpdk.org/guides/howto/virtio_user_as_exceptional_path.html) and kernel pktgen. No latency tests were performed by me. Maybe it is interesting to perform a latency test or just a different set of tests over a recent version. Thanks! I have repeated the tests with v9, and results are a little bit different: * If I test opening it with testpmd, I see no change between versions * If I forward packets between two vhost-net interfaces in the guest using a linux bridge in the host: - netperf UDP_STREAM shows a performance increase of 1.8, almost doubling performance. This gets lower as frame size increase. - rests of the test goes noticeably worse: UDP_RR goes from ~6347 transactions/sec to 5830 - TCP_STREAM goes from ~10.7 gbps to ~7Gbps Which direction did you mean here? Guest TX or RX? - TCP_RR from 6223.64 transactions/sec to 5739.44 Perf diff might help. I think we can start from the RR result which should be easier. Maybe you can test it for each patch then you may see which patch is the source of the regression. Thanks ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization