[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFULd4bM0=oNvp5VAfHa59nBK3=f++PR3EB2B-Zds1ae+14dfA@mail.gmail.com>
Date: Sat, 10 Sep 2022 08:28:22 +0200
From: Uros Bizjak <ubizjak@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: "the arch/x86 maintainers" <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2 RESEND] locking/lockref/x86: Enable ARCH_USE_CMPXCHG_LOCKREF
for X86_CMPXCHG64
On Sun, Jul 3, 2022 at 11:01 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> On Sun, Jun 26, 2022 at 1:18 PM Uros Bizjak <ubizjak@...il.com> wrote:
> >
> > Also, by using try_cmpxchg64() instead of cmpxchg64()
> > in CMPXCHG_LOOP macro, the compiler actually produces sane code,
> > improving lockref_get_or_lock main loop from:
>
> Heh. I'm actually looking at that function because I committed my "add
> sparse annotation for conditional locking" patch, and
> lockref_get_or_lock() has the wrong "polarity" for conditional locking
> (it returns false when it takes the lock).
>
> But then I started looking closer, and that function has no users any
> more. In fact, it hasn't had users since back in 2013.
>
> So while I still think ARCH_USE_CMPXCHG_LOCKREF is fine for 32-bit
> x86, the part about improving lockref_get_or_lock() code generation is
> kind of pointless. I'm going to remove that function as "unused, and
> with the wrong return value".
May I consider this message as a formal Acked-by: for the patch? I'll
resubmit the patch with a commit message updated to reference
lockref_put_not_zero instead of the removed lockref_get_or_lock.
Thanks,
Uros.
Powered by blists - more mailing lists