]> www.infradead.org Git - users/hch/misc.git/commitdiff
NFSD: Reduce DRC bucket size
authorChuck Lever <chuck.lever@oracle.com>
Thu, 21 Aug 2025 14:53:21 +0000 (10:53 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 21 Sep 2025 23:24:50 +0000 (19:24 -0400)
The common case is that a DRC lookup will not find the XID in the
bucket. Reduce the amount of pointer chasing during the lookup by
keeping fewer entries in each hash bucket.

Changing the bucket size constant forces the size of the DRC hash
table to increase, and the height of each bucket r-b tree to be
reduced.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfscache.c

index d929c8c63bd91cd0e317159ea17fe819d1fd191e..ab13ee9c7fd8421ce6f66e3dc20d657b6442fbb8 100644 (file)
@@ -27,7 +27,7 @@
  * cache size, the idea being that when the cache is at its maximum number
  * of entries, then this should be the average number of entries per bucket.
  */
-#define TARGET_BUCKET_SIZE     64
+#define TARGET_BUCKET_SIZE     8
 
 struct nfsd_drc_bucket {
        struct rb_root rb_head;