Re: [PATCH 1/1] sbitmap: Replace cmpxchg with xchg

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

 



On 5/23/19 9:39 AM, Pavel Begunkov (Silence) wrote:
> From: Pavel Begunkov <asml.silence@xxxxxxxxx>
> 
> cmpxchg() with an immediate value could be replaced with less expensive
> xchg(). The same true if new value don't _depend_ on the old one.
> 
> In the second block, atomic_cmpxchg() return value isn't checked, so
> after atomic_cmpxchg() ->  atomic_xchg() conversion it could be replaced
> with atomic_set(). Comparison with atomic_read() in the second chunk was
> left as an optimisation (if that was the initial intention).

Applied, thanks.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux