Re: [PATCH] block: switch to atomic_t for request references
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-12-07 16:03:42
Also in:
lkml
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-12-07 16:03:42
Also in:
lkml
On Tue, Dec 7, 2021 at 1:34 AM Peter Zijlstra [off-list ref] wrote:
Now, it could be GCC generates atrociously bad code simply because it doesn't know it can use the flags from the XADD in which case we can look at doing an arch asm implementation.
That may help.
This thread started because of alleged performance problems with
refcount_t. No numbers, and maybe it was wrong, but they have been
seen before, so I wouldn't dismiss the issue.
What I've seen personally is the horrendous "multiple different calls
to overflow functions with different arguments", which makes
__refcount_add() do stupid things and blow up the code. All for
entirely pointless debugging code.
Linus