[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87qzzo8sle.fsf@intel.com>
Date: Thu, 12 Jun 2025 16:09:49 -0700
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Kristen Accardi <kristen.c.accardi@...el.com>, "David S. Miller"
<davem@...emloft.net>, Tom Zanussi <tom.zanussi@...ux.intel.com>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: iaa - Fix race condition when probing IAA devices
Herbert Xu <herbert@...dor.apana.org.au> writes:
> On Wed, Jun 11, 2025 at 02:17:49PM -0700, Vinicius Costa Gomes wrote:
>>
>> >From what I could gather, the idea of the per-cpu workqueue table ("map"
>> really) is more to "spread" the workqueues to different CPUS than to
>> reduce contention.
>>
>> If the question is more about the choice of using per-cpu variables, I
>> can look for alternatives.
>
> Prior to your patch, the compress/decompress paths simply did a
> lockless per-cpu lookup to find the wq. Now you're taking a global
> spinlock to do the same lookup.
>
> That makes no sense. Either it should be redesigned to not use
> a spinlock, or the per-cpu data structure should be removed since
> it serves no purpose as you're always taking a global spinlock.
>
Will think a bit harder on this. It could be the code is trying too hard
being smart and there's a easier/simpler way out. I was only trying to
solve a bug that some folks found.
> Cheers,
> --
> Email: Herbert Xu <herbert@...dor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Cheer,
--
Vinicius
Powered by blists - more mailing lists