[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ef73ea1-2f0e-b1c5-3a0a-1742db67b59a@gmail.com>
Date: Thu, 15 Nov 2018 05:53:46 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Davide Caratti <dcaratti@...hat.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in
the data path
On 11/15/2018 03:43 AM, Davide Caratti wrote:
> On Wed, 2018-11-14 at 22:46 -0800, Eric Dumazet wrote:
>>
>> On 09/13/2018 10:29 AM, Davide Caratti wrote:
>>> use RCU instead of spinlocks, to protect concurrent read/write on
>>> act_police configuration. This reduces the effects of contention in the
>>> data path, in case multiple readers are present.
>>>
>>> Signed-off-by: Davide Caratti <dcaratti@...hat.com>
>>> ---
>>> net/sched/act_police.c | 156 ++++++++++++++++++++++++-----------------
>>> 1 file changed, 92 insertions(+), 64 deletions(-)
>>>
>>
>> I must be missing something obvious with this patch.
>
> hello Eric,
>
> On the opposite, I missed something obvious when I wrote that patch: there
> is a race condition on tcfp_toks, tcfp_ptoks and tcfp_t_c: thank you for
> noticing it.
>
> These variables still need to be protected with a spinlock. I will do a
> patch and evaluate if 'act_police' is still faster than a version where
> 2d550dbad83c ("net/sched: .... ") is reverted, and share results in the
> next hours.
>
> Ok?
>
SGTM, thanks.
Powered by blists - more mailing lists