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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux