[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180604125520.pkxvwg4sjlws2lrs@linutronix.de>
Date: Mon, 4 Jun 2018 14:55:20 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
Ingo Molnar <mingo@...hat.com>,
Anna-Maria Gleixner <anna-maria@...utronix.de>,
Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>, linux-alpha@...r.kernel.org
Subject: Re: [PATCH 1.5/5] alpha: atomic: provide asm for the fastpath for
_atomic_dec_and_lock_irqsave
On 2018-06-04 13:48:52 [+0200], Peter Zijlstra wrote:
> On Mon, Jun 04, 2018 at 12:27:57PM +0200, Sebastian Andrzej Siewior wrote:
> > I just looked at Alpha's atomic_dec_and_lock assembly and did something
> > that should work for atomic_dec_and_lock_irqsave. I think it works but I
> > would prefer for someone from the Alpha-Camp to ack this before it goes
> > in. It is not critical because the non-optimized version should work.
>
> I would vote to simply delete this entire file and get alpha on the
> generic code.
>
> Afaict, this asm gets the ordering wrong, and I doubt it is much faster
> than using atomic_add_unless() in any case (+- the ordering of course).
I *think* the Alpha version is slightly wrong here. It does
load
dec by one
cmpeq
while the __atomic_add_unless() implementation does
load
cmpeq
which is the right thing (unless I can't parse the assembly properly).
Sebastian
Powered by blists - more mailing lists