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

2018-06-29 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 and

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

2018-06-29 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for 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 | 92 ++

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

2018-06-29 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 --- 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 e7cf7d2..62bb8e8 100644 --- a/drivers

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

2018-06-29 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 --- drivers/vhost/vhost.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) d

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

2018-06-29 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. This patches are splited from previous big patch: http://patchwork.ozlabs.org/patch/934673/ For more pe

Re: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread Wei Wang
On 06/25/2018 08:05 PM, Wei Wang wrote: This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be u

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

2018-06-29 Thread Michael S. Tsirkin
On Fri, Jun 29, 2018 at 05:09:50PM +0900, Toshiaki Makita wrote: > Under heavy load vhost busypoll may run without suppressing > notification. For example tx zerocopy callback can push tx work while > handle_tx() is running, then busyloop exits due to vhost_has_work() > condition and enables notifi

Re: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread Michael S. Tsirkin
On Fri, Jun 29, 2018 at 03:52:40PM +, Wang, Wei W wrote: > On Friday, June 29, 2018 10:46 PM, Michael S. Tsirkin wrote: > > To: David Hildenbrand > > Cc: Wang, Wei W ; virtio-...@lists.oasis-open.org; > > linux-ker...@vger.kernel.org; virtualization@lists.linux-foundation.org; > > k...@vger.ke

Re: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread David Hildenbrand
>> Why would your suggestion still be applicable? >> >> Your point for now is "I might not want to have page hinting enabled due to >> the overhead, but still a live migration speedup". If that overhead actually >> exists (we'll have to see) or there might be another reason to disable page >> hin

RE: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread Wang, Wei W
On Friday, June 29, 2018 7:54 PM, David Hildenbrand wrote: > On 29.06.2018 13:31, Wei Wang wrote: > > On 06/29/2018 03:46 PM, David Hildenbrand wrote: > >>> > >>> I'm afraid it can't. For example, when we have a guest booted, > >>> without too many memory activities. Assume the guest has 8GB free >

RE: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread Wang, Wei W
On Friday, June 29, 2018 10:46 PM, Michael S. Tsirkin wrote: > To: David Hildenbrand > Cc: Wang, Wei W ; virtio-...@lists.oasis-open.org; > linux-ker...@vger.kernel.org; virtualization@lists.linux-foundation.org; > k...@vger.kernel.org; linux...@kvack.org; mho...@kernel.org; > a...@linux-foundatio

Re: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread David Hildenbrand
>> And looking at all the discussions and problems that already happened >> during the development of this series, I think we should rather look >> into how clean free page hinting might solve the same problem. > > I'm not sure I follow the logic. We found that neat tricks > especially re-using th

Re: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread Michael S. Tsirkin
On Wed, Jun 27, 2018 at 01:06:32PM +0200, David Hildenbrand wrote: > On 25.06.2018 14:05, Wei Wang wrote: > > This patch series is separated from the previous "Virtio-balloon > > Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, > > implemented by this series enables the virt

Re: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread David Hildenbrand
On 29.06.2018 13:31, Wei Wang wrote: > On 06/29/2018 03:46 PM, David Hildenbrand wrote: >>> >>> I'm afraid it can't. For example, when we have a guest booted, without >>> too many memory activities. Assume the guest has 8GB free memory. The >>> arch_free_page there won't be able to capture the 8GB

Re: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread Wei Wang
On 06/29/2018 03:46 PM, David Hildenbrand wrote: I'm afraid it can't. For example, when we have a guest booted, without too many memory activities. Assume the guest has 8GB free memory. The arch_free_page there won't be able to capture the 8GB free pages since there is no free() called. This res

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

2018-06-29 Thread Jason Wang
On 2018年06月29日 16:09, Toshiaki Makita wrote: Under heavy load vhost busypoll may run without suppressing notification. For example tx zerocopy callback can push tx work while handle_tx() is running, then busyloop exits due to vhost_has_work() condition and enables notification but immediately r

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

2018-06-29 Thread Toshiaki Makita
Under heavy load vhost busypoll may run without suppressing notification. For example tx zerocopy callback can push tx work while handle_tx() is running, then busyloop exits due to vhost_has_work() condition and enables notification but immediately reenters handle_tx() because the pushed work was t

Re: [PATCH v34 0/4] Virtio-balloon: support free page reporting

2018-06-29 Thread David Hildenbrand
On 29.06.2018 05:51, Wei Wang wrote: > On 06/27/2018 07:06 PM, David Hildenbrand wrote: >> On 25.06.2018 14:05, Wei Wang wrote: >>> This patch series is separated from the previous "Virtio-balloon >>> Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, >>> implemented by this ser