From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756770Ab2IFIoJ (ORCPT ); Thu, 6 Sep 2012 04:44:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49566 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752760Ab2IFIoH (ORCPT ); Thu, 6 Sep 2012 04:44:07 -0400 Date: Thu, 6 Sep 2012 11:45:26 +0300 From: "Michael S. Tsirkin" To: Rusty Russell Cc: Sasha Levin , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, avi@redhat.com, kvm@vger.kernel.org Subject: Re: [PATCH v2 2/2] virtio-ring: Allocate indirect buffers from cache when possible 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-Disposition: inline In-Reply-To: <877gs7inx8.fsf@rustcorp.com.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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