Re: [PATCH v1 0/6] Fix some lock contention in the NFS server's DRC

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

 




> On Jul 10, 2023, at 9:03 AM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> 
> On Sun, 2023-07-09 at 11:45 -0400, Chuck Lever wrote:
>> This series optimizes DRC scalability by freeing cache objects only
>> once the hash bucket lock is no longer held. There are a couple of
>> related clean-ups to go along with this optimization.
>> 
> 
> 
> The conventional wisdom that I've always heard is that a kfree under
> spinlock is generally no big deal. It can't block and is usually quite
> fast. Are you able to measure any performance delta from this set?

Yes, a couple of percent better throughput with a tmpfs export and
a fast transport, which is not a common use case, granted.

I think the difference is that, after this change, we're holding
each bucket lock for a shorter period of time. That's enough to
reduce some lock contention.

But I also like the shrinker improvements.


>> ---
>> 
>> Chuck Lever (6):
>>      NFSD: Refactor nfsd_reply_cache_free_locked()
>>      NFSD: Rename nfsd_reply_cache_alloc()
>>      NFSD: Replace nfsd_prune_bucket()
>>      NFSD: Refactor the duplicate reply cache shrinker
>>      NFSD: Remove svc_rqst::rq_cacherep
>>      NFSD: Rename struct svc_cacherep
>> 
>> 
>> fs/nfsd/cache.h            |   8 +-
>> fs/nfsd/nfscache.c         | 203 ++++++++++++++++++++++++-------------
>> fs/nfsd/nfssvc.c           |  10 +-
>> fs/nfsd/trace.h            |  26 ++++-
>> include/linux/sunrpc/svc.h |   1 -
>> 5 files changed, 165 insertions(+), 83 deletions(-)
>> 
>> --
>> Chuck Lever
>> 
> 
> -- 
> Jeff Layton <jlayton@xxxxxxxxxx>


--
Chuck Lever






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux