Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-16 Thread Eric Dumazet
On 11/16/2018 06:41 AM, David Laight wrote: > From: Eric Dumazet >> Sent: 16 November 2018 14:35 > ... >> I suggest to use a single cache line with a dedicated spinlock and these >> three s64 >> >> spinlock_t tcfp_lock cacheline_aligned_in_smp; >> s64 ... >>

RE: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-16 Thread David Laight
From: Eric Dumazet > Sent: 16 November 2018 14:35 ... > I suggest to use a single cache line with a dedicated spinlock and these > three s64 > > spinlock_t tcfp_lock cacheline_aligned_in_smp; > s64 ... > s64 ... > s64

Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-16 Thread Eric Dumazet
On 11/16/2018 06:34 AM, Eric Dumazet wrote: > >> +s64 tcfp_toks; >> +s64 tcfp_ptoks; >> +s64 tcfp_t_c; > > I suggest to use a single cache line with a dedicated spinlock and these > three s64 > > spinlock_t tcfp_

Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-16 Thread Eric Dumazet
On 11/16/2018 03:28 AM, Davide Caratti wrote: > On Thu, 2018-11-15 at 05:53 -0800, Eric Dumazet wrote: >> >> 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 spinlo

Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-16 Thread Davide Caratti
On Thu, 2018-11-15 at 05:53 -0800, Eric Dumazet wrote: > > 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 > > > >

Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-15 Thread Eric Dumazet
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

Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-15 Thread Davide Caratti
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 pre

Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-11-14 Thread Eric Dumazet
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 > --- > net/sched/ac

[PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-09-13 Thread Davide Caratti
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 --- net/sched/act_police.c | 156 - 1 f