From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: virtio_net backport performance Date: Mon, 7 Jan 2008 19:23:44 +1100 Message-ID: <200801071923.45083.rusty@rustcorp.com.au> References: <477EB228.4030905@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Christian Borntraeger To: Anthony Liguori Return-path: In-Reply-To: <477EB228.4030905-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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. 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 " }"; Will continue looking for performance regression tomorrow (actually, better check my changes haven't introduced it in non-backports first!). 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/