From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH v2 2/2] virtio-ring: Allocate indirect buffers from cache when possible Date: Thu, 6 Sep 2012 11:45:26 +0300 Message-ID: <20120906084526.GE17656@redhat.com> References: <1346159043-16446-2-git-send-email-levinsasha928@gmail.com> <20120828132032.GB2039@redhat.com> <503CC904.3050207@gmail.com> <20120829110748.GB5970@redhat.com> <503E2F27.5060904@gmail.com> <20120829153833.GE7407@redhat.com> <503E4873.6060607@gmail.com> <871uigj747.fsf@rustcorp.com.au> <20120906050257.GA17656@redhat.com> <877gs7inx8.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <877gs7inx8.fsf@rustcorp.com.au> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Rusty Russell Cc: linux-kernel@vger.kernel.org, avi@redhat.com, Sasha Levin , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On Thu, Sep 06, 2012 at 05:27:23PM +0930, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > > Yes without checksum net core always linearizes packets, so yes it is > > screwed. > > For -net, skb always allocates space for 17 frags + linear part so > > it seems sane to do same in virtio core, and allocate, for -net, > > up to max_frags + 1 from cache. > > We can adjust it: no _SG -> 2 otherwise 18. > > But I thought it used individual buffers these days? Yes for receive, no for transmit. That's probably why we should have the threshold per vq, not per device, BTW. -- MST