From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] virtio_net tx performance fix Date: Mon, 28 Jan 2008 09:32:56 -0600 Message-ID: <479DF5A8.8050103@us.ibm.com> References: <1201479224.3047.37.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , "virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" To: dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org Return-path: In-Reply-To: <1201479224.3047.37.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> 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 Hi Dor, How are you measuring performance? The numbers I've gotten with netperf before and after your patch are: tx - 647.27mbit rx - 89.22 tx - 27.82 rx - 79.93 So this patch is pretty much killing performance for netperf. Dor Laor wrote: > There was a problem with the location of the notify call in > add_buff function: > When VRING_USED_F_NO_NOTIFY is set, the host does not kick the > guest when packets were transmitted, as a result the guest runs > out of tx buffers sometimes. But even if F_NO_NOTIFY is set, if the tx buffer is full, we notify the guest, so this prevents that from happening. > This is fine but the problem lies > when add_buf fails, it called notify and the host sends all the > pending tx pkts. When enable_cb was called, more_used(vq) returned > false so eventually the skb was dropped. > I'm having a tough time following this part. If add_buf fails, we notify unconditionally (which is, I think what we want). I'm not sure how that relates to a packet getting dropped though. Regards, Anthony Liguori ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/