RE: [PATCH] fs: Optimized fget to improve performance

From: David Laight
Date: Thu Aug 27 2020 - 10:56:28 EST


From: Matthew Wilcox
> Sent: 27 August 2020 13:31
> On Thu, Aug 27, 2020 at 06:19:44PM +0800, Shaokun Zhang wrote:
> > From: Yuqi Jin <jinyuqi@xxxxxxxxxx>
> >
> > It is well known that the performance of atomic_add is better than that of
> > atomic_cmpxchg.
>
> I don't think that's well-known at all.

Especially since on (probably) every architecture except x86
atomic_add() is implemented using atomic_cmpxchg().

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)