From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752983Ab3KAFh3 (ORCPT ); Fri, 1 Nov 2013 01:37:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33016 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751552Ab3KAFh1 (ORCPT ); Fri, 1 Nov 2013 01:37:27 -0400 Message-ID: <52733DFE.7090704@redhat.com> Date: Fri, 01 Nov 2013 13:37:02 +0800 From: Jason Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Rusty Russell , davem@davemloft.net, edumazet@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, mst@redhat.com, mwdalton@google.com, virtualization@lists.linux-foundation.org Subject: Re: [PATCH net-next 2/2] virtio-net: coalesce rx frags when possible during rx References: <1383215313-23651-1-git-send-email-jasowang@redhat.com> <1383215313-23651-2-git-send-email-jasowang@redhat.com> <87iowcc1id.fsf@rustcorp.com.au> In-Reply-To: <87iowcc1id.fsf@rustcorp.com.au> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/2013 10:13 AM, Rusty Russell wrote: > Jason Wang writes: >> Commit 2613af0ed18a11d5c566a81f9a6510b73180660a (virtio_net: migrate mergeable >> rx buffers to page frag allocators) try to increase the payload/truesize for >> MTU-sized traffic. But this will introduce the extra overhead for GSO packets >> received because of the frag list. This commit tries to reduce this issue by >> coalesce the possible rx frags when possible during rx. Test result shows the >> about 15% improvement on full size GSO packet receiving (and even better than >> commit 2613af0ed18a11d5c566a81f9a6510b73180660a). > I don't know about the other users of skb_add_rx_frag, but should > this coalesce-if-possible code be built into that? There're several other users without the possibility check. And Eric point out in do_tcp_sendpages() skb_add_rx_frag() and skb_can_coalesce() were used separatedly which can allows us to do some other things in the middle. So it was ok here. > > Thanks, > Rusty.