On Thu, 12 Jul 2018 02:31:10 +
"Li,Rongqing" wrote:
> > -邮件原件-
> > 发件人: Stefano Brivio [mailto:sbri...@redhat.com]
> > 发送时间: 2018年7月11日 18:52
> > 收件人: Li,Rongqing
> > 抄送: netdev@vger.kernel.org; Eric Dumazet
> > 主题: Re: [PATCH] net: co
From: "Li,Rongqing"
Date: Thu, 12 Jul 2018 03:03:51 +
>
>
>> -邮件原件-
>> 发件人: David Miller [mailto:da...@davemloft.net]
>> 发送时间: 2018年7月12日 10:49
>> 收件人: Li,Rongqing
>> 抄送: netdev@vger.kernel.org
>> 主题: Re: [PATCH] net: convert gr
> -邮件原件-
> 发件人: Eric Dumazet [mailto:eric.duma...@gmail.com]
> 发送时间: 2018年7月11日 19:32
> 收件人: Li,Rongqing ; netdev@vger.kernel.org
> 主题: Re: [PATCH] net: convert gro_count to bitmask
>
>
>
> On 07/11/2018 02:15 AM, Li RongQing wrote:
> > gro_hash si
> -邮件原件-
> 发件人: David Miller [mailto:da...@davemloft.net]
> 发送时间: 2018年7月12日 10:49
> 收件人: Li,Rongqing
> 抄送: netdev@vger.kernel.org
> 主题: Re: [PATCH] net: convert gro_count to bitmask
>
> From: Li RongQing
> Date: Wed, 11 Jul 2018 17:15:53 +0800
>
&
From: Li RongQing
Date: Wed, 11 Jul 2018 17:15:53 +0800
> + clear_bit(index, &napi->gro_bitmask);
Please don't use atomics here, at least use __clear_bit().
This is why I did the operations by hand in my version of the patch.
Also, if you are going to preempt my patch, at least reta
> -邮件原件-
> 发件人: Stefano Brivio [mailto:sbri...@redhat.com]
> 发送时间: 2018年7月11日 18:52
> 收件人: Li,Rongqing
> 抄送: netdev@vger.kernel.org; Eric Dumazet
> 主题: Re: [PATCH] net: convert gro_count to bitmask
>
> On Wed, 11 Jul 2018 17:15:53 +0800
> Li RongQing wrote:
On 07/11/2018 02:15 AM, Li RongQing wrote:
> 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
On Wed, 11 Jul 2018 17:15:53 +0800
Li RongQing wrote:
> @@ -5380,6 +5382,12 @@ static enum gro_result dev_gro_receive(struct
> napi_struct *napi, struct sk_buff
> if (grow > 0)
> gro_pull_from_frag0(skb, grow);
> ok:
> + if (napi->gro_hash[hash].count)
> + if
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