[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

Yuanhan Liu yuanhan.liu at linux.intel.com
Mon Oct 10 16:42:09 CEST 2016


On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coquelin wrote:
> >>>At that time, a packet always use 2 descs. Since indirect desc is
> >>>enabled (by default) now, the assumption is not true then. What's
> >>>worse, it might even slow things a bit down. That should also be
> >>>part of the reason why performance is slightly worse than before.
> >>>
> >>>	--yliu
> >>
> >>I'm not sure I get what you are saying
> >>
> >>>commit 1d41d77cf81c448c1b09e1e859bfd300e2054a98
> >>>Author: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> >>>Date:   Mon May 2 17:46:17 2016 -0700
> >>>
> >>>    vhost: optimize dequeue for small packets
> >>>
> >>>    A virtio driver normally uses at least 2 desc buffers for Tx: the
> >>>    first for storing the header, and the others for storing the data.
> >>>
> >>>    Therefore, we could fetch the first data desc buf before the main
> >>>    loop, and do the copy first before the check of "are we done yet?".
> >>>    This could save one check for small packets that just have one data
> >>>    desc buffer and need one mbuf to store it.
> >>>
> >>>    Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> >>>    Acked-by: Huawei Xie <huawei.xie at intel.com>
> >>>    Tested-by: Rich Lane <rich.lane at bigswitch.com>
> >>
> >>This fast-paths the 2-descriptors format but it's not active
> >>for indirect descriptors. Is this what you mean?
> >
> >Yes. It's also not active when ANY_LAYOUT is actually turned on.
> >>Should be a simple matter to apply this optimization for indirect.
> >
> >Might be.
> 
> If I understand the code correctly, indirect descs also benefit from this
> optimization, or am I missing something?

Aha..., you are right!

	--yliu


More information about the dev mailing list