From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH v2 2/2] virtio_net: Defer skb allocation in receive path Date: Sun, 17 Jan 2010 08:01:12 +1030 Message-ID: <201001170801.12721.rusty@rustcorp.com.au> References: <1261122090.4148.24.camel@localhost.localdomain> <1263236965.11949.1.camel@localhost.localdomain> <1263416018.29594.1.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , Amit Shah , Avi Kivity , netdev@vger.kernel.org, kvm@vger.kernel.org To: Shirley Ma Return-path: In-Reply-To: <1263416018.29594.1.camel@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, 14 Jan 2010 07:23:38 am Shirley Ma wrote: > virtio_net receives packets from its pre-allocated vring buffers, then it > delivers these packets to upper layer protocols as skb buffs. So it's not > necessary to pre-allocate skb for each mergable buffer, then frees extra > skbs when buffers are merged into a large packet. This patch has deferred > skb allocation in receiving packets for both big packets and mergeable buffers > to reduce skb pre-allocations and skb frees. It frees unused buffers by calling > detach_unused_buf in vring, so recv skb queue is not needed. > > Signed-off-by: Shirley Ma Thanks, applied! After testing I'll send it to DaveM. Rusty.