Re: [PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-07-02 Thread Jason Wang
On 2018年07月03日 13:48, Tonghao Zhang wrote: On Tue, Jul 3, 2018 at 10:12 AM Jason Wang wrote: On 2018年07月02日 20:57, xiangxia.m@gmail.com wrote: From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can

Re: [PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-07-02 Thread Tonghao Zhang
On Tue, Jul 3, 2018 at 10:12 AM Jason Wang wrote: > > > > On 2018年07月02日 20:57, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > Factor out generic busy polling logic and will be > > used for in tx path in the next patch. And with the patch, > > qemu can set differently the

[PATCH net-next 8/8] vhost: event suppression for packed ring

2018-07-02 Thread Jason Wang
This patch introduces support for event suppression. This is done by have a two areas: device area and driver area. One side could then try to disable or enable (delayed) notification from other side by using a boolean hint or event index interface in the areas. For more information, please refer

[PATCH net-next 7/8] vhost: packed ring support

2018-07-02 Thread Jason Wang
This patch introduces basic support for packed ring. The idea behinds packed ring is to use a single descriptor ring instead of three different rings (avail, used and descriptor). This could help to reduce the cache contention and PCI transactions. So it was designed to help for the performance

[PATCH net-next 6/8] virtio: introduce packed ring defines

2018-07-02 Thread Jason Wang
Signed-off-by: Jason Wang --- include/uapi/linux/virtio_config.h | 2 ++ include/uapi/linux/virtio_ring.h | 32 2 files changed, 34 insertions(+) diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index 449132c..947f6a3

[PATCH net-next 5/8] vhost: vhost_put_user() can accept metadata type

2018-07-02 Thread Jason Wang
We assumes used ring update is the only user for vhost_put_user() in the past. This may not be the case for the incoming packed ring which may update the descriptor ring for used. So introduce a new type parameter. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 14 +++--- 1 file

[PATCH net-next 4/8] vhost_net: do not explicitly manipulate vhost_used_elem

2018-07-02 Thread Jason Wang
Two helpers of setting/getting used len were introduced to avoid explicitly manipulating vhost_used_elem in zerocopy code. This will be used to hide used_elem internals and simplify packed ring implementation. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 11 +--

[PATCH net-next 3/8] vhost: do not use vring_used_elem

2018-07-02 Thread Jason Wang
Instead of depending on the exported vring_used_elem, this patch switches to use a new internal structure vhost_used_elem which embed vring_used_elem in itself. This could be used to let vhost to record extra metadata for the incoming packed ring layout. Signed-off-by: Jason Wang ---

[PATCH net-next 2/8] vhost: hide used ring layout from device

2018-07-02 Thread Jason Wang
We used to return descriptor head by vhost_get_vq_desc() to device and pass it back to vhost_add_used() and its friends. This exposes the internal used ring layout to device which makes it hard to be extended for e.g packed ring layout. So this patch tries to hide the used ring layout by -

[PATCH net-next 1/8] vhost: move get_rx_bufs to vhost.c

2018-07-02 Thread Jason Wang
Move get_rx_bufs() to vhost.c and rename it to vhost_get_bufs(). This helps to hide vring internal layout from specific device implementation. Packed ring implementation will benefit from this. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 77

[PATCH net-next 0/8] Packed virtqueue for vhost

2018-07-02 Thread Jason Wang
Hi all: This series implements packed virtqueues. The code were tested with Tiwei's RFC V6 at https://lkml.org/lkml/2018/6/5/120. Pktgen test for both RX and TX does not show obvious difference with split virtqueues. The main bottleneck is the guest Linux driver, since it can not stress vhost

Re: [PATCH 0/9] Fix references for some missing documentation files

2018-07-02 Thread Jonathan Corbet
On Tue, 26 Jun 2018 06:49:02 -0300 Mauro Carvalho Chehab wrote: > Having nothing to do while waiting for my plane to arrive while > returning back from Japan, I ended by writing a small series of > patches meant to reduce the number of bad Documentation/* > links that are detected by: >

Re: [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones

2018-07-02 Thread Juergen Gross
On 25/06/18 12:29, Jan Beulich wrote: > This saves one insn byte per instance, summing up to a savings of over > 4k in my (stripped down) configuration. No variant of to be patched in > replacement code relies on the one byte larger size. > > Signed-off-by: Jan Beulich Reviewed-by: Juergen

[PATCH net-next v4 4/4] net: vhost: add rx busy polling in tx path

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the iperf3 to test its bandwidth, use the netperf to test throughput

[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. Signed-off-by: Tonghao Zhang --- drivers/vhost/net.c | 94

[PATCH net-next v4 2/4] net: vhost: replace magic number of lock annotation

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[PATCH net-next v4 1/4] vhost: lock the vqs one by one

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 24 +++- 1

[PATCH net-next v4 0/4] net: vhost: improve performance when enable busyloop

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4. v3 -> v4: fix some issues v2 -> v3: This patches are

Re: [PATCH vhost] vhost_net: Fix too many vring kick on busypoll

2018-07-02 Thread Jason Wang
On 2018年07月02日 16:05, Toshiaki Makita wrote: On 2018/07/02 16:52, Jason Wang wrote: On 2018年07月02日 15:11, Toshiaki Makita wrote: On 2018/07/02 15:17, Jason Wang wrote: On 2018年07月02日 12:37, Toshiaki Makita wrote: On 2018/07/02 11:54, Jason Wang wrote: On 2018年07月02日 10:45, Toshiaki Makita

Re: [PATCH vhost] vhost_net: Fix too many vring kick on busypoll

2018-07-02 Thread Toshiaki Makita
On 2018/07/02 16:52, Jason Wang wrote: > On 2018年07月02日 15:11, Toshiaki Makita wrote: >> On 2018/07/02 15:17, Jason Wang wrote: >>> On 2018年07月02日 12:37, Toshiaki Makita wrote: On 2018/07/02 11:54, Jason Wang wrote: > On 2018年07月02日 10:45, Toshiaki Makita wrote: >> Hi Jason, >>

Re: [PATCH vhost] vhost_net: Fix too many vring kick on busypoll

2018-07-02 Thread Jason Wang
On 2018年07月02日 15:11, Toshiaki Makita wrote: On 2018/07/02 15:17, Jason Wang wrote: On 2018年07月02日 12:37, Toshiaki Makita wrote: On 2018/07/02 11:54, Jason Wang wrote: On 2018年07月02日 10:45, Toshiaki Makita wrote: Hi Jason, On 2018/06/29 18:30, Jason Wang wrote: On 2018年06月29日 16:09,

Re: [PATCH vhost] vhost_net: Fix too many vring kick on busypoll

2018-07-02 Thread Jason Wang
On 2018年07月02日 12:37, Toshiaki Makita wrote: On 2018/07/02 11:54, Jason Wang wrote: On 2018年07月02日 10:45, Toshiaki Makita wrote: Hi Jason, On 2018/06/29 18:30, Jason Wang wrote: On 2018年06月29日 16:09, Toshiaki Makita wrote: ... To fix this, poll the work instead of enabling notification