svc_stat_alloc_counts(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… svc_stat_alloc_counts(9) β€” the Kernel API Manual, bestie edition πŸŽ€

ok so like. first of all, welcome to the Kernel API Manual ✨ (yes, that manual, the kernel one, we're doing this). today's main character is svc_stat_alloc_counts, and honestly? she's a little allocator with one job and she does it. no cap.


🌸 NAME 🌸

svc_stat_alloc_counts β€” allocate per-netns per-version call count arrays πŸ’–

like. it allocates. the count arrays. per netns AND per version. both. at once. she's efficient like that 🫢


⭐ SYNOPSIS ⭐

int svc_stat_alloc_counts (struct svc_stat *statp );

literally just one argument, one return, we love a minimal signature πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • statp β€” the svc_stat whose vs_count arrays should be allocated. that's her whole thing. that's the assignment. the vs_count arrays are getting allocated and statp is the girlboss it's happening for πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea β˜•: statp->program must be set before calling this. like, before. not during, not after, not "oops I'll set it in a minute". before. consider this your vibe check 🚨

returns zero on success πŸŽ‰, or a negative errno otherwise 😭 (yes, plural errnos, it can hand you any one of the negative ones, don't ask which, the page isn't telling, and neither am I, because I refuse to make up lore).

fr fr set statp->program first. that's not a suggestion, that's the prerequisite. periodt. πŸ’€

🌈 SEE ALSO 🌈

okay so she runs with a whole squad, and the squad lives in the kernel file ./net/sunrpc/svc.c πŸ§šβ€β™€οΈ β€” here's everyone, no one left out:


and that's the whole page bestie, ily, go allocate responsibly πŸ’œβœ¨

πŸ“ source: ./net/sunrpc Β· dated October 2026 Β· svc_stat_alloc_counts(9) β€” signed, sealed, slayed πŸ’…
πŸ“¦ where this page comes from