[PATCH 5/5] NFSD: Document reply_cache_stats ABI
Chuck Lever <[email protected]> Thu, 16 Jul 2026 20:12:32 -0400
| Newsgroups | gmane.linux.nfs |
|---|---|
| Message-ID | <[email protected]> |
/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. Signed-off-by: Chuck Lever <[email protected]> --- .../ABI/testing/procfs-nfsd-reply_cache_stats | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/ABI/testing/procfs-nfsd-reply_cache_stats diff --git a/Documentation/ABI/testing/procfs-nfsd-reply_cache_stats b/Documentation/ABI/testing/procfs-nfsd-reply_cache_stats new file mode 100644 index 000000000000..57ed5f8e6597 --- /dev/null +++ b/Documentation/ABI/testing/procfs-nfsd-reply_cache_stats @@ -0,0 +1,38 @@ +What: /proc/fs/nfsd/reply_cache_stats +Date: March 2013 +KernelVersion: 3.10 +Contact: [email protected] +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) -- 2.54.0