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

2020-09-01 Thread David Laight
From: Al Viro > Sent: 31 August 2020 04:21 > > On Mon, Aug 31, 2020 at 09:43:31AM +0800, Shaokun Zhang wrote: > > > How about this? We try to replace atomic_cmpxchg with atomic_add to improve > > performance. The atomic_add does not check the current f_count value. > > Therefore, the number of on

Re: [NAK] Re: [PATCH] fs: Optimized fget to improve performance

2020-08-30 Thread Al Viro
On Mon, Aug 31, 2020 at 09:43:31AM +0800, Shaokun Zhang wrote: > How about this? We try to replace atomic_cmpxchg with atomic_add to improve > performance. The atomic_add does not check the current f_count value. > Therefore, the number of online CPUs is reserved to prevent multi-core > competitio

Re: [NAK] Re: [PATCH] fs: Optimized fget to improve performance

2020-08-30 Thread Shaokun Zhang
Hi Al, 在 2020/8/27 22:28, Al Viro 写道: > On Thu, Aug 27, 2020 at 06:19:44PM +0800, Shaokun Zhang wrote: >> From: Yuqi Jin >> >> It is well known that the performance of atomic_add is better than that of >> atomic_cmpxchg. >> The initial value of @f_count is 1. While @f_count is increased by 1 in >

Re: [NAK] Re: [PATCH] fs: Optimized fget to improve performance

2020-08-28 Thread Will Deacon
On Thu, Aug 27, 2020 at 03:28:48PM +0100, Al Viro wrote: > On Thu, Aug 27, 2020 at 06:19:44PM +0800, Shaokun Zhang wrote: > > From: Yuqi Jin > > > > It is well known that the performance of atomic_add is better than that of > > atomic_cmpxchg. > > The initial value of @f_count is 1. While @f_coun