public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
Cc: kvm-devel
	<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Christian Borntraeger
	<borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
Subject: Re: virtio_net backport performance
Date: Mon, 07 Jan 2008 10:20:08 -0600	[thread overview]
Message-ID: <47825138.8070003@us.ibm.com> (raw)
In-Reply-To: <200801071923.45083.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>

Rusty Russell wrote:
> On Saturday 05 January 2008 09:24:40 Anthony Liguori wrote:
>   
>> Hey Rusty et al,
>>
>> I've got automatic backports of the virtio modules[1] working back to
>> 2.6.18.  Everything seems okay except that for any kernel with the older
>> NAPI api, performance is extremely bad.  I get about 1gbit on TX with
>> 2.6.24 but I get somewhere around 20mbit on 2.6.22.
>>     
>
> OK, I tested this backport and immediately got oopses.  Revealed some 
> interesting races in net driver (again, it's that damn callback disable 
> causing problems).  New queue fixes these, but get awful performance:
> 'dd bs=1M count=1000 if=/dev/zero | nc 172.20.0.1 8889' takes almost 30 
> seconds.
>   

rx performance is pretty abysmal but tx performance seems respectable.  
I'm getting strange results with netperf but my guess is that we're 
getting around 800mbit tx but only 25mbit rx.

tx is right around what it should be but rx is about an order of 
magnitude off.

> Found one bug in your code tho: if enable_cb returns false, it means the queue 
> has *not* been enabled:
>
> --- hack-module.awk.~1~	2008-01-06 10:49:16.000000000 +1100
> +++ hack-module.awk	2008-01-07 19:08:40.000000000 +1100
> @@ -49,7 +49,6 @@
>      print "	netif_rx_complete(vi->dev);";
>      print "";
>      print "	if (!no_work && netif_rx_reschedule(vi->dev, received)) {";
> -    print "		vi->rvq->vq_ops->disable_cb(vi->rvq);";
>      print "		skb = NULL;";
>      print "		goto again;";
>      print "	}";
>   

Thanks, I've applied this to the backport tree.

> Will continue looking for performance regression tomorrow (actually, better 
> check my changes haven't introduced it in non-backports first!).
>   

Excellent, thanks!

Regards,

Anthony Liguori

> Thanks!
> Rusty.
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

      parent reply	other threads:[~2008-01-07 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04 22:24 virtio_net backport performance Anthony Liguori
     [not found] ` <477EB228.4030905-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-01-04 23:59   ` Rusty Russell
2008-01-07  8:23   ` Rusty Russell
     [not found]     ` <200801071923.45083.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2008-01-07 16:20       ` Anthony Liguori [this message]

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=47825138.8070003@us.ibm.com \
    --to=aliguori-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org \
    /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