Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-28 Thread Jason Wang
On 2017年09月28日 06:19, Michael S. Tsirkin wrote: 2. add new APIs and move the loop into vhost core for more speedups I don't see any advantages, looks like just need some e.g callbacks in this case. Thanks IUC callbacks pretty much destroy the code cache locality advantages, IP is

Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-28 Thread Jason Wang
On 2017年09月28日 08:55, Willem de Bruijn wrote: @@ -461,6 +460,7 @@ static void handle_tx(struct vhost_net *net) struct socket *sock; struct vhost_net_ubuf_ref *uninitialized_var(ubufs); bool zcopy, zcopy_used; + int i, batched = VHOST_NET_BATCH;

Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-28 Thread Jason Wang
On 2017年09月28日 06:19, Michael S. Tsirkin wrote: On Wed, Sep 27, 2017 at 10:04:18AM +0800, Jason Wang wrote: On 2017年09月27日 03:25, Michael S. Tsirkin wrote: On Fri, Sep 22, 2017 at 04:02:35PM +0800, Jason Wang wrote: This patch implements basic batched processing of tx virtqueue by

Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-27 Thread Willem de Bruijn
> @@ -461,6 +460,7 @@ static void handle_tx(struct vhost_net *net) > struct socket *sock; > struct vhost_net_ubuf_ref *uninitialized_var(ubufs); > bool zcopy, zcopy_used; > + int i, batched = VHOST_NET_BATCH; > > mutex_lock(>mutex); > sock =

Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2017 at 10:04:18AM +0800, Jason Wang wrote: > > > On 2017年09月27日 03:25, Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2017 at 04:02:35PM +0800, Jason Wang wrote: > > > This patch implements basic batched processing of tx virtqueue by > > > prefetching desc indices and updating

Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-26 Thread Jason Wang
On 2017年09月27日 03:25, Michael S. Tsirkin wrote: On Fri, Sep 22, 2017 at 04:02:35PM +0800, Jason Wang wrote: This patch implements basic batched processing of tx virtqueue by prefetching desc indices and updating used ring in a batch. For non-zerocopy case, vq->heads were used for storing the

Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-26 Thread Michael S. Tsirkin
On Fri, Sep 22, 2017 at 04:02:35PM +0800, Jason Wang wrote: > This patch implements basic batched processing of tx virtqueue by > prefetching desc indices and updating used ring in a batch. For > non-zerocopy case, vq->heads were used for storing the prefetched > indices and updating used ring. It

[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-22 Thread Jason Wang
This patch implements basic batched processing of tx virtqueue by prefetching desc indices and updating used ring in a batch. For non-zerocopy case, vq->heads were used for storing the prefetched indices and updating used ring. It is also a requirement for doing more batching on top. For zerocopy