Thread (16 messages) 16 messages, 4 authors, 2025-05-12

Re: [PATCH] KEYS: Reduce smp_mb() calls in key_put()

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-05-04 00:36:33
Also in: keyrings, linux-crypto, linux-integrity, lkml

On Sat, May 03, 2025 at 11:19:21PM +0100, David Howells wrote:
Possibly we only need smp_mb() in the IN_QUOTA branch in key_put().
Just change the smp_mb to smp_mb__before_atomic, at least on x86
it just disappears because set_bit is already a serialising operation.

Or even better, reverse the FINAL_PUT bit and call it ALIVE, so
that you can use test_bit_acquire and clear_bit_unlock.

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help