Re: [RFC HACK] xfrm: make state refcounting percpu

2019-05-03 Thread Florian Westphal
Eric Dumazet wrote: On 5/3/19 2:07 AM, Steffen Klassert wrote: > > On Wed, Apr 24, 2019 at 12:40:23PM +0200, Florian Westphal wrote: > >> I'm not sure this is a good idea to begin with, refcount > >> is right next to state spinlock which is taken for both tx and rx ops, > >> plus this complicates

Re: [RFC HACK] xfrm: make state refcounting percpu

2019-05-03 Thread Eric Dumazet
On 5/3/19 2:07 AM, Steffen Klassert wrote: > On Wed, Apr 24, 2019 at 12:40:23PM +0200, Florian Westphal wrote: >> I'm not sure this is a good idea to begin with, refcount >> is right next to state spinlock which is taken for both tx and rx ops, >> plus this complicates debugging quite a bit. >

RE: [RFC HACK] xfrm: make state refcounting percpu

2019-05-02 Thread Vakul Garg
> -Original Message- > From: Steffen Klassert > Sent: Friday, May 3, 2019 12:16 PM > To: Vakul Garg > Cc: Florian Westphal ; netdev@vger.kernel.org > Subject: Re: [RFC HACK] xfrm: make state refcounting percpu > > On Fri, May 03, 2019 at 06:34:29AM

Re: [RFC HACK] xfrm: make state refcounting percpu

2019-05-02 Thread Steffen Klassert
On Fri, May 03, 2019 at 06:34:29AM +, Vakul Garg wrote: > > -Original Message- > > From: Steffen Klassert > > > > Also, is this a new problem or was it always like that? > > It is always like this. On 4-core, 8-core platforms as well, these atomics > consume significant cpu > (8 co

RE: [RFC HACK] xfrm: make state refcounting percpu

2019-05-02 Thread Vakul Garg
> -Original Message- > From: Steffen Klassert > Sent: Friday, May 3, 2019 11:52 AM > To: Vakul Garg > Cc: Florian Westphal ; netdev@vger.kernel.org > Subject: Re: [RFC HACK] xfrm: make state refcounting percpu > > On Fri, May 03, 2019 at 06:13:22AM

Re: [RFC HACK] xfrm: make state refcounting percpu

2019-05-02 Thread Steffen Klassert
On Fri, May 03, 2019 at 06:13:22AM +, Vakul Garg wrote: > > > > -Original Message- > > From: Steffen Klassert > > Sent: Friday, May 3, 2019 11:38 AM > > To: Florian Westphal > > Cc: Vakul Garg ; netdev@vger.kernel.org > > Subject: Re: [RFC

RE: [RFC HACK] xfrm: make state refcounting percpu

2019-05-02 Thread Vakul Garg
> -Original Message- > From: Steffen Klassert > Sent: Friday, May 3, 2019 11:38 AM > To: Florian Westphal > Cc: Vakul Garg ; netdev@vger.kernel.org > Subject: Re: [RFC HACK] xfrm: make state refcounting percpu > > On Wed, Apr 24, 2019 at 12:40:23PM +0200

Re: [RFC HACK] xfrm: make state refcounting percpu

2019-05-02 Thread Steffen Klassert
On Wed, Apr 24, 2019 at 12:40:23PM +0200, Florian Westphal wrote: > I'm not sure this is a good idea to begin with, refcount > is right next to state spinlock which is taken for both tx and rx ops, > plus this complicates debugging quite a bit. Hm, what would be the usecase where this could help?

Re: [RFC HACK] xfrm: make state refcounting percpu

2019-04-24 Thread Eric Dumazet
On 04/24/2019 03:40 AM, Florian Westphal wrote: > I'm not sure this is a good idea to begin with, refcount > is right next to state spinlock which is taken for both tx and rx ops, > plus this complicates debugging quite a bit. > Why not simply using include/linux/percpu-refcount.h ? > Also e