NFSD: Document reply_cache_stats ABI

/proc/fs/nfsd/reply_cache_stats has been present since v3.10 but
has no entry in Documentation/ABI/. Add one under testing/ that
documents the current field set, types, and parsing expectations.

This establishes a contract that parsers should match on field
name rather than line position, allowing fields to be added or
removed across kernel versions without breaking well-written
consumers.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20260717001232.438792-6-cel@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
This commit is contained in:
Chuck Lever
2026-07-16 20:12:32 -04:00
parent 264226677d
commit 284a474e94

View File

@@ -0,0 +1,38 @@
What: /proc/fs/nfsd/reply_cache_stats
Date: March 2013
KernelVersion: 3.10
Contact: linux-nfs@vger.kernel.org
Description:
Provides statistics for the NFS server duplicate reply
cache (DRC). The file contains one labeled field per
line. Each line has the form "field name:" followed by
whitespace and a decimal value.
Fields:
======================= ====== ==========================
max entries u32 Upper bound on cache size
num entries u32 Current entry count
hash buckets u32 Number of hash buckets
mem usage s64 Bytes consumed by the DRC
cache hits s64 Requests answered from cache
cache misses s64 Requests not found in cache
not cached s64 Idempotent requests that
bypass the cache
payload misses s64 XID matched but request
checksum did not
longest chain len u32 Longest hash chain observed
cachesize at longest u32 Cache size when longest
chain was recorded
======================= ====== ==========================
Counter fields (cache hits, cache misses, not cached,
payload misses, mem usage) are maintained with per-cpu
counters and may briefly show stale values under
concurrent load. There is no way to reset these
counters; consumers should compute rates by sampling
over time.
New fields may be appended in future kernels. Parsers
should match on field name, not line position.
Users: nfs-utils (https://git.linux-nfs.org/?p=steved/nfs-utils.git)