[PATCH 1/2] locking/lockref: Use try_cmpxchg64 in CMPXCHG_LOOP macro

Linus Torvalds torvalds at linux-foundation.org
Fri May 27 02:52:04 AEST 2022


On Thu, May 26, 2022 at 5:15 AM Michael Ellerman <mpe at ellerman.id.au> wrote:
>
> Do you know of a benchmark that shows it up? I tried a few things but
> couldn't get lockref_get() to count for more than 1-2%.

Heh. 1% for a small instruction sequence that is only handful of
instructions and is used in just a couple of places counts as "very
hot" for me.

I assume you did the natural thing: threaded pathname lookup (with
paths being of the longer variety to not be dominated by system call
etc costs).

               Linus


More information about the Linuxppc-dev mailing list