Thread (7 messages) 7 messages, 2 authors, 2018-06-06

Re: [PATCH 1.5/5] alpha: atomic: provide asm for the fastpath for _atomic_dec_and_lock_irqsave

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2018-06-04 12:55:30
Also in: lkml

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:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help