From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH][net-next][v2] net: limit each hash list length to MAX_GRO_SKBS Date: Sat, 7 Jul 2018 17:22:01 -0700 Message-ID: <4df439f1-d80c-a2ff-d1ac-d5475694a59e@gmail.com> References: <1530772472-8674-1-git-send-email-lirongqing@baidu.com> <20180705.192035.695280292431389546.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: David Miller , lirongqing@baidu.com Return-path: Received: from mail-pl0-f68.google.com ([209.85.160.68]:46733 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754338AbeGHAWE (ORCPT ); Sat, 7 Jul 2018 20:22:04 -0400 Received: by mail-pl0-f68.google.com with SMTP id 30-v6so4428289pld.13 for ; Sat, 07 Jul 2018 17:22:04 -0700 (PDT) In-Reply-To: <20180705.192035.695280292431389546.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 07/05/2018 03:20 AM, David Miller wrote: > From: Li RongQing > Date: Thu, 5 Jul 2018 14:34:32 +0800 > >> After commit 07d78363dcff ("net: Convert NAPI gro list into a small hash >> table.")' there is 8 hash buckets, which allows more flows to be held for >> merging. but MAX_GRO_SKBS, the total held skb for merging, is 8 skb still, >> limit the hash table performance. >> >> keep MAX_GRO_SKBS as 8 skb, but limit each hash list length to 8 skb, not >> the total 8 skb >> >> Signed-off-by: Li RongQing > > Applied, thanks. > Maybe gro_count should be replaced by a bitmask, so that we can speed up napi_gro_flush(), since it now has to use 3 cache lines (gro_hash[] size is 192 bytes)