From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH][net-next][v2] net: convert gro_count to bitmask Date: Mon, 16 Jul 2018 13:41:31 -0700 (PDT) Message-ID: <20180716.134131.1554894339720285923.davem@davemloft.net> References: <1531464096-11319-1-git-send-email-lirongqing@baidu.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, edumazet@google.com, sbrivio@redhat.com To: lirongqing@baidu.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:59808 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728075AbeGPVKg (ORCPT ); Mon, 16 Jul 2018 17:10:36 -0400 In-Reply-To: <1531464096-11319-1-git-send-email-lirongqing@baidu.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Li RongQing Date: Fri, 13 Jul 2018 14:41:36 +0800 > gro_hash size is 192 bytes, and uses 3 cache lines, if there is few > flows, gro_hash may be not fully used, so it is unnecessary to iterate > all gro_hash in napi_gro_flush(), to occupy unnecessary cacheline. > > convert gro_count to a bitmask, and rename it as gro_bitmask, each bit > represents a element of gro_hash, only flush a gro_hash element if the > related bit is set, to speed up napi_gro_flush(). > > and update gro_bitmask only if it will be changed, to reduce cache > update > > Suggested-by: Eric Dumazet > Signed-off-by: Li RongQing > Cc: Stefano Brivio > --- > netperf shows no difference, maybe because my testing machine has large > cache Applied.