blkg_rwstat_recursive_sum(9)
πΈ blkg_rwstat_recursive_sum(9) πΈ
okay bestie, welcome to the Kernel API Manual β this one's a little blkcg deep-dive and honestly it's giving "summon the whole family tree" energy π
β¨ NAME β¨
blkg_rwstat_recursive_sum β collect hierarchical blkg_rwstat π
π¦ SYNOPSIS π¦
void blkg_rwstat_recursive_sum (struct blkcg_gq *blkg , struct
blkcg_policy *pol , int off , struct blkg_rwstat_sample *sum );
π ARGUMENTS π
blkgβ theblkgof interest π like, the one you actually care aboutpolβ theblkcg_policythat contains theblkg_rwstatoffβ the offset to theblkg_rwstatinblkg_policy_dataorblkgsumβ yourblkg_rwstat_samplestructure, aka where the results go π«Ά
π DESCRIPTION π
So what this does: it collects the blkg_rwstat specified by blkg, pol and off and all its online descendants and their aux counts. the way it just scoops up the entire lineageβ¦ obsessed π
And here's the branching logic, no cap:
- if
polisNULL, theblkg_rwstatis atoffbytes intoblkg - otherwise, it's at
offbytes intoblkg'sblkg_policy_dataof the policy β¨
fr fr, thatpolcheck is the whole vibe check of this function βNULLmeans "raw offset intoblkg", non-NULLmeans "go through the policy'sblkg_policy_data". don't mix them up π
π SEE ALSO π
- Kernel file
./block/blk-cgroup-rwstat.c __blkg_prfill_rwstat(9)blkg_prfill_rwstat(9)
okay that's the whole thing, you ate that ππ β this cutie lives in the ./block source tree and the file's dated October 2026. go forth and recurse, bestie π§β¨
π¦ 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