From: "Michael S. Tsirkin" <mst@redhat.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>,
Stephen Hemminger <stephen@networkplumber.org>,
dev@dpdk.org, qemu-devel@nongnu.org, "Wang,
Zhihong" <zhihong.wang@intel.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature
Date: Mon, 10 Oct 2016 06:46:44 +0300 [thread overview]
Message-ID: <20161010064113-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20161010033744.GW1597@yliu-dev.sh.intel.com>
On Mon, Oct 10, 2016 at 11:37:44AM +0800, Yuanhan Liu wrote:
> On Thu, Sep 29, 2016 at 11:21:48PM +0300, Michael S. Tsirkin wrote:
> > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote:
> > >
> > >
> > > On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote:
> > Yes but two points.
> >
> > 1. why is this memset expensive?
>
> I don't have the exact answer, but just some rough thoughts:
>
> It's an external clib function: there is a call stack and the
> IP register will bounch back and forth.
for memset 0? gcc 5.3.1 on fedora happily inlines it.
> BTW, It's kind of an
> overkill to use that for resetting 14 bytes structure.
>
> Some trick like
> *(struct virtio_net_hdr *)hdr = {0, };
>
> Or even
> hdr->xxx = 0;
> hdr->yyy = 0;
>
> should behaviour better.
>
> There was an example: the vhost enqueue optmization patchset from
> Zhihong [0] uses memset, and it introduces more than 15% drop (IIRC)
> on my Ivybridge server: it has no such issue on his server though.
>
> [0]: http://dpdk.org/ml/archives/dev/2016-August/045272.html
>
> --yliu
I'd say that's weird. what's your config? any chance you
are using an old compiler?
> > Is the test completely skipping looking
> > at the packet otherwise?
> >
> > 2. As long as we are doing this, see
> > Alignment vs. Networking
> > ========================
> > in Documentation/unaligned-memory-access.txt
> >
> >
> > > From the micro-benchmarks results, we can expect +10% compared to
> > > indirect descriptors, and + 5% compared to using 2 descs in the
> > > virtqueue.
> > > Also, it should have the same benefits as indirect descriptors for 0%
> > > pkt loss (as we can fill 2x more packets in the virtqueue).
> > >
> > > What do you think?
> > >
> > > Thanks,
> > > Maxime
next prev parent reply other threads:[~2016-10-10 3:46 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 6:40 [PATCH 0/2] enables vhost/virtio any layout feature Yuanhan Liu
2016-09-26 6:40 ` [PATCH 1/2] vhost: enable " Yuanhan Liu
2016-09-26 18:01 ` Stephen Hemminger
2016-09-26 19:24 ` Michael S. Tsirkin
2016-09-26 19:24 ` [Qemu-devel] " Michael S. Tsirkin
2016-09-27 3:11 ` Yuanhan Liu
2016-09-27 3:11 ` [Qemu-devel] " Yuanhan Liu
2016-09-27 19:48 ` Stephen Hemminger
2016-09-27 19:48 ` [Qemu-devel] " Stephen Hemminger
2016-09-27 19:56 ` Michael S. Tsirkin
2016-09-27 19:56 ` [Qemu-devel] " Michael S. Tsirkin
2016-09-28 2:28 ` Yuanhan Liu
2016-09-28 2:28 ` [Qemu-devel] " Yuanhan Liu
2016-09-29 15:30 ` Maxime Coquelin
2016-09-29 17:57 ` Michael S. Tsirkin
2016-09-29 20:05 ` Maxime Coquelin
2016-09-29 20:21 ` Michael S. Tsirkin
2016-09-29 21:23 ` Maxime Coquelin
2016-09-30 12:05 ` Maxime Coquelin
2016-09-30 19:16 ` Michael S. Tsirkin
2016-10-10 4:05 ` Yuanhan Liu
2016-10-10 4:17 ` Michael S. Tsirkin
2016-10-10 4:22 ` Yuanhan Liu
2016-10-10 4:25 ` Michael S. Tsirkin
2016-10-10 12:40 ` Maxime Coquelin
2016-10-10 14:42 ` Yuanhan Liu
2016-10-10 14:54 ` Maxime Coquelin
2016-10-11 6:04 ` Yuanhan Liu
2016-10-11 6:39 ` Maxime Coquelin
2016-10-11 6:49 ` Yuanhan Liu
2016-10-03 14:20 ` Maxime Coquelin
2016-10-10 3:37 ` Yuanhan Liu
2016-10-10 3:46 ` Michael S. Tsirkin [this message]
2016-10-10 3:59 ` Yuanhan Liu
2016-10-10 4:16 ` Wang, Zhihong
2016-10-10 4:24 ` Michael S. Tsirkin
2016-10-10 4:39 ` Michael S. Tsirkin
2016-10-11 6:57 ` Yuanhan Liu
2016-10-12 3:21 ` Yuanhan Liu
2016-10-12 3:21 ` [Qemu-devel] [dpdk-dev] " Yuanhan Liu
[not found] ` <F5DF4F0E3AFEF648ADC1C3C33AD4DBF16C2409EB@SHSMSX101.ccr.corp.intel.com>
2016-10-13 2:52 ` [Qemu-devel] " Yang, Zhiyong
2016-10-13 2:52 ` [Qemu-devel] [dpdk-dev] " Yang, Zhiyong
2016-10-10 3:50 ` [Qemu-devel] " Yuanhan Liu
2016-10-09 23:20 ` Michael S. Tsirkin
2016-10-09 23:20 ` [Qemu-devel] " Michael S. Tsirkin
2016-10-10 3:03 ` Yuanhan Liu
2016-10-10 3:03 ` [Qemu-devel] " Yuanhan Liu
2016-10-10 3:04 ` Michael S. Tsirkin
2016-10-10 3:04 ` [Qemu-devel] " Michael S. Tsirkin
2016-10-10 3:10 ` Yuanhan Liu
2016-10-10 3:10 ` [Qemu-devel] " Yuanhan Liu
2016-09-26 6:40 ` [PATCH 2/2] net/virtio: " Yuanhan Liu
2016-09-26 18:04 ` Stephen Hemminger
2016-09-29 18:00 ` Michael S. Tsirkin
2016-09-29 18:01 ` Michael S. Tsirkin
2016-11-10 15:18 ` [PATCH 0/2] enables vhost/virtio " Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161010064113-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stephen@networkplumber.org \
--cc=yuanhan.liu@linux.intel.com \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.