Re: [PATCH 1/1] inside-secure irq balance

2020-07-17 Thread Herbert Xu
On Fri, Jul 17, 2020 at 09:53:34AM +0200, Sven Auhagen wrote: > > I do not have access to a numa node inside the inside secure > driver and can only use -1 as the cpumask_local_spread numa node. > Is that what you are looking for? Yes, at least it won't be giving us CPUs that are off-line. Cheers

RE: [PATCH 1/1] inside-secure irq balance

2020-07-17 Thread Van Leeuwen, Pascal
> -Original Message- > From: Sven Auhagen > Sent: Friday, July 17, 2020 9:54 AM > To: Herbert Xu > Cc: Van Leeuwen, Pascal ; linux-crypto@vger.kernel.org > Subject: Re: [PATCH 1/1] inside-secure irq balance > > <<< External Email >>> > On Fri,

Re: [PATCH 1/1] inside-secure irq balance

2020-07-17 Thread Sven Auhagen
On Fri, Jul 17, 2020 at 04:57:38PM +1000, Herbert Xu wrote: > On Fri, Jul 17, 2020 at 08:35:04AM +0200, Sven Auhagen wrote: > > > > I disagree as this is common practice among other kernel drivers > > like ethernet. > > Also this is also beeing done in other crypto drivers not to say > > that the s

Re: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Herbert Xu
On Fri, Jul 17, 2020 at 08:35:04AM +0200, Sven Auhagen wrote: > > I disagree as this is common practice among other kernel drivers > like ethernet. > Also this is also beeing done in other crypto drivers not to say > that the speed improvements are pretty significant. > > irqbalance can of course

Re: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Sven Auhagen
On Fri, Jul 17, 2020 at 03:20:50PM +1000, Herbert Xu wrote: > On Fri, Jul 17, 2020 at 07:01:34AM +0200, Sven Auhagen wrote: > > > > Alright, that makes sense, thank you. > > > > As I said in my second email yesterday, it is just a hint and not binding. > > I run some tests and here is what happens

Re: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Herbert Xu
On Fri, Jul 17, 2020 at 07:01:34AM +0200, Sven Auhagen wrote: > > Alright, that makes sense, thank you. > > As I said in my second email yesterday, it is just a hint and not binding. > I run some tests and here is what happens when I disable CPU3 on my 4 Core > MCBin: I don't think we should be

Re: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Sven Auhagen
On Thu, Jul 16, 2020 at 10:04:20PM +1000, Herbert Xu wrote: > On Thu, Jul 16, 2020 at 11:21:36AM +0200, Sven Auhagen wrote: > > > > You are correct, let me have a look at how to get the cpu bit correctly. > > Well everything runs on the first CPU now, what do you do if that does down > > or up? >

Re: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Herbert Xu
On Thu, Jul 16, 2020 at 11:21:36AM +0200, Sven Auhagen wrote: > > You are correct, let me have a look at how to get the cpu bit correctly. > Well everything runs on the first CPU now, what do you do if that does down > or up? > I think there is no mechanism in general at the moment for the current

Re: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Sven Auhagen
ypto@vger.kernel.org > > Subject: Re: [PATCH 1/1] inside-secure irq balance > > > > <<< External Email >>> > > Sven Auhagen wrote: > > > > > > + // Set affinity > > > + cpu = ring_id % num_online_cpus(); > > > +

Re: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Sven Auhagen
ypto@vger.kernel.org > > Subject: Re: [PATCH 1/1] inside-secure irq balance > > > > <<< External Email >>> > > Sven Auhagen wrote: > > > > > > + // Set affinity > > > + cpu = ring_id % num_online_cpus(); > > > +

RE: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Van Leeuwen, Pascal
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of Herbert Xu > Sent: Thursday, July 16, 2020 9:22 AM > To: Sven Auhagen > Cc: linux-crypto@vger.kernel.org > Subject: Re: [PATCH 1/1] inside-secure irq balance > > <<< Exte

Re: [PATCH 1/1] inside-secure irq balance

2020-07-16 Thread Herbert Xu
Sven Auhagen wrote: > > + // Set affinity > + cpu = ring_id % num_online_cpus(); > + irq_set_affinity_hint(irq, get_cpu_mask(cpu)); > + This doesn't look right. There is no guarantee that the online CPUs are the lowest bits in the bitmask. Also, what are you going to do when t