From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: Network performance with small packets Date: Tue, 1 Feb 2011 23:41:14 +0200 Message-ID: <20110201214114.GA31105@redhat.com> References: <1296157547.1640.45.camel@localhost.localdomain> <20110127200548.GE5228@redhat.com> <20110127.130240.104065182.davem@davemloft.net> <1296163838.1640.53.camel@localhost.localdomain> <20110201172346.GA24392@redhat.com> <1296590943.26937.797.camel@localhost.localdomain> <20110201201715.GA30050@redhat.com> <1296591908.26937.809.camel@localhost.localdomain> <20110201212110.GC30770@redhat.com> <1296595725.26937.819.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , steved@us.ibm.com, netdev@vger.kernel.org, kvm@vger.kernel.org, rusty@rustcorp.com.au To: Shirley Ma Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57058 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072Ab1BAVld (ORCPT ); Tue, 1 Feb 2011 16:41:33 -0500 Content-Disposition: inline In-Reply-To: <1296595725.26937.819.camel@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Feb 01, 2011 at 01:28:45PM -0800, Shirley Ma wrote: > On Tue, 2011-02-01 at 23:21 +0200, Michael S. Tsirkin wrote: > > Confused. We compare capacity to skb frags, no? > > That's sg I think ... > > Current guest kernel use indirect buffers, num_free returns how many > available descriptors not skb frags. So it's wrong here. > > Shirley I see. Good point. In other words when we complete the buffer it was indirect, but when we add a new one we can not allocate indirect so we consume. And then we start the queue and add will fail. I guess we need some kind of API to figure out whether the buf we complete was indirect? Another failure mode is when skb_xmit_done wakes the queue: it might be too early, there might not be space for the next packet in the vq yet. A solution might be to keep some kind of pool around for indirect, we wanted to do it for block anyway ... -- MST