All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] [RFC] vhost: micro vhost optimization
@ 2016-05-03  0:46 Yuanhan Liu
  2016-05-03  0:46 ` [PATCH 1/3] vhost: pre update used ring for Tx and Rx Yuanhan Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Yuanhan Liu @ 2016-05-03  0:46 UTC (permalink / raw)
  To: dev; +Cc: huawei.xie, Yuanhan Liu

Here is a small patch set does the micro optimization, which brings about
10% performance boost in my 64B packet testing, with the following topo:

    pkt generator <----> NIC <-----> Virtio NIC

Patch 1 pre updates the used ring and update them in batch. It should be
feasible from my understanding: there will be no issue, guest driver will
not start processing them as far as we haven't updated the "used->idx"
yet. I could miss something though.

Patch 2 saves one check for small packets (that can be hold in one desc
buf and mbuf).

Patch 3 moves several frequently used fields into one cache line, for
better cache sharing. 

Note that this patch set is based on my latest vhost ABI refactoring patchset.


---
Yuanhan Liu (3):
  vhost: pre update used ring for Tx and Rx
  vhost: optimize dequeue for small packets
  vhost: arrange virtio_net fields for better cache sharing

 lib/librte_vhost/vhost-net.h  |   8 +--
 lib/librte_vhost/vhost_rxtx.c | 110 ++++++++++++++++++++++++------------------
 2 files changed, 68 insertions(+), 50 deletions(-)

-- 
1.9.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-06-14 12:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-03  0:46 [PATCH 0/3] [RFC] vhost: micro vhost optimization Yuanhan Liu
2016-05-03  0:46 ` [PATCH 1/3] vhost: pre update used ring for Tx and Rx Yuanhan Liu
2016-06-01  6:40   ` Xie, Huawei
2016-06-01  6:55     ` Yuanhan Liu
2016-06-03  8:18       ` Xie, Huawei
2016-06-01 13:05     ` Michael S. Tsirkin
2016-05-03  0:46 ` [PATCH 2/3] vhost: optimize dequeue for small packets Yuanhan Liu
2016-06-01  6:24   ` Xie, Huawei
2016-06-01  6:44     ` Yuanhan Liu
2016-06-03  7:42       ` Xie, Huawei
2016-06-03  7:43   ` Xie, Huawei
2016-05-03  0:46 ` [PATCH 3/3] vhost: arrange virtio_net fields for better cache sharing Yuanhan Liu
2016-06-01  6:42   ` Xie, Huawei
2016-05-10 21:49 ` [PATCH 0/3] [RFC] vhost: micro vhost optimization Rich Lane
2016-05-10 22:08   ` Yuanhan Liu
2016-06-14 12:42 ` Yuanhan Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.