svc_stat_alloc_counts(9)
π 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β thesvc_statwhosevs_countarrays should be allocated. that's her whole thing. that's the assignment. thevs_countarrays are getting allocated andstatpis 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:
sunrpc_get_pool_mode(9)svc_serv_nrpools(9)svc_pool_for_cpu(9)svc_create(9)svc_create_pooled(9)svc_pool_wake_idle_thread(9)svc_new_thread(9)svc_set_pool_threads(9)svc_set_num_threads(9)svc_serv_maxthreads(9)svc_rqst_replace_page(9)svc_rqst_release_pages(9)svc_exit_thread(9)svc_register(9)svc_stat_free_counts(9)(her opposite number β the one who gives the arrays back π)svc_process(9)svc_process_bc(9)svc_max_payload(9)svc_proc_name(9)svc_encode_result_payload(9)svc_fill_symlink_pathname(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms