NFSv4/pnfs: Grow the deviceid cache hash table

The global deviceid cache has 32 buckets shared by every server and
layout type.  Striping deployments initially anticipate device counts
scaling to 1024 or more devices, which leaves those chains 32 entries
deep for every resolution to walk.

Grow to 256 buckets, four deep at that scale, for 2KB of BSS on
64-bit.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Benjamin Coddington <bcodding@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
This commit is contained in:
Benjamin Coddington 2026-09-15 08:22:23 -04:00 committed by Anna Schumaker
parent db485e0625
commit 19932b33af

View File

@ -40,8 +40,11 @@
/*
* Device ID RCU cache. A device ID is unique per server and layout type.
*
* 256 buckets keeps the chains short at the 1024-or-more devices a
* striping deployment expects, for 2KB of BSS on 64-bit.
*/
#define NFS4_DEVICE_ID_HASH_BITS 5
#define NFS4_DEVICE_ID_HASH_BITS 8
#define NFS4_DEVICE_ID_HASH_SIZE (1 << NFS4_DEVICE_ID_HASH_BITS)
#define NFS4_DEVICE_ID_HASH_MASK (NFS4_DEVICE_ID_HASH_SIZE - 1)