From: "Michael S. Tsirkin" <mst@redhat.com>
To: Shirley Ma <mashirle@us.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
David Miller <davem@davemloft.net>,
kvm@vger.kernel.org, netdev@vger.kernel.org,
Herbert Xu <herbert@gondor.hengli.com.au>
Subject: Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop
Date: Fri, 18 Mar 2011 15:15:58 +0200 [thread overview]
Message-ID: <20110318131558.GC4221@redhat.com> (raw)
In-Reply-To: <1300418927.3255.62.camel@localhost.localdomain>
On Thu, Mar 17, 2011 at 08:28:47PM -0700, Shirley Ma wrote:
> On Thu, 2011-03-17 at 08:18 -0700, Shirley Ma wrote:
> > On Thu, 2011-03-17 at 07:02 +0200, Michael S. Tsirkin wrote:
> > > So, this just tries to make sure there's enough space for
> > > max packet in the ring, if not - drop and return OK.
> > > Why bother checking beforehand though?
> > > If that's what we want to do, we can just call add_buf and see
> > > if it fails?
> >
> > In add_buf, there is an additional kick, see below. I added check
> > capacity to avoid this, thought it would be better performance. I will
> > retest it w/i add_buf to see the performance difference.
> >
> > if (vq->num_free < out + in) {
> > pr_debug("Can't add buf len %i - avail = %i\n",
> > out + in, vq->num_free);
> > /* FIXME: for historical reasons, we force a notify
> > here
> > if
> > * there are outgoing parts to the buffer. Presumably
> > the
> > * host should service the ring ASAP. */
> > if (out)
> > vq->notify(&vq->vq);
> > END_USE(vq);
> > return -ENOSPC;
> > }
> >
Rusty, could you pls clarify what are the historical reasons here?
Are they still valid?
If yes we could dedicate a feature flag to disabling this,
or guess that the host is new by looking at some
other feature flag.
> More test results:
>
> UDP_STREAM test results (% is guest vcpu, guest has 2 vpus):
>
> Send(netperf)
> ----
>
> size 2.6.38-rc8 2.6.38-rc8+ 2.6.38-rc8
> addbuf failure check capacity
> -----------------------------------------------------
> 1K 1541.0/50.14% 2169.1/50.03% 3018.9/50%
> 2K 1649.7/33.74% 3362.6/50.18% 4518.8/50.47%
> 4K 2957.8/44.83% 5965.9/50.03% 9592.5/50%
> 8K 3788/39.01% 9852.8/50.25% 15483.8/50%
> 16K 4736.1/34.13% 14946.5/50.01% 21645.0/50%
Is this the local or remote throughput?
With UDP_STREAM you are mostly interested in
remote throughput, local one can be pretty high
while most packets get dropped.
> Looks like the additional guest notify in add_buf doesn't cost that much
> than I thought to be.
>
> Thanks
> Shirley
next prev parent reply other threads:[~2011-03-18 13:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 0:12 [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop Shirley Ma
2011-03-17 5:02 ` Michael S. Tsirkin
2011-03-17 15:18 ` Shirley Ma
2011-03-18 3:28 ` Shirley Ma
2011-03-18 13:15 ` Michael S. Tsirkin [this message]
2011-03-18 16:54 ` Shirley Ma
2011-03-17 5:10 ` Rusty Russell
2011-03-17 15:10 ` Shirley Ma
2011-03-18 13:33 ` Herbert Xu
2011-03-19 1:41 ` Shirley Ma
2011-03-21 18:03 ` Shirley Ma
2011-03-22 11:36 ` Michael S. Tsirkin
2011-03-23 2:26 ` Shirley Ma
2011-03-24 0:30 ` Rusty Russell
2011-03-24 4:14 ` Shirley Ma
2011-03-24 14:28 ` Michael S. Tsirkin
2011-03-24 17:46 ` Shirley Ma
2011-03-24 18:10 ` Michael S. Tsirkin
2011-03-25 4:51 ` Rusty Russell
2011-03-25 4:50 ` Rusty Russell
2011-03-27 7:52 ` Michael S. Tsirkin
2011-04-04 6:13 ` Rusty Russell
2011-03-24 0:16 ` Rusty Russell
2011-03-24 6:39 ` 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=20110318131558.GC4221@redhat.com \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.hengli.com.au \
--cc=kvm@vger.kernel.org \
--cc=mashirle@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).