__css_rstat_updated(9)
π __css_rstat_updated β the Kernel API Manual moment
okay so bestie, welcome to `__css_rstat_updated(9) from the Kernel API Manual, and honestly? this little function is doing the most in the background so you don't have to π«Ά
β¨ NAME β¨
__css_rstat_updated β literally just keeping track of updated rstat_cpu, that's the whole job, icon behavior π
πΈ SYNOPSIS πΈ
void __css_rstat_updated (struct cgroup_subsys_state *css , int cpu );
π ARGUMENTS π
cssβ the target cgroup subsystem state, the main character of this whole operation β¨cpuβ the cpu on whichrstat_cpuwas updated, we gotta know where the tea happened
π¦ DESCRIPTION π¦
So what it does: it atomically inserts the css into the ss's llist for the given cpu. Atomic, no cap, no half-finished vibes π
And the best part? It's reentrant safe, meaning it's safe against softirq, hardirq and nmi. all of them. at once. it's giving unbothered queen π
Then the ss's llist gets processed at flush time to create the update tree π like it's all just chilling in the list until the flusher comes through and builds the whole tree. teamwork fr fr.
π NOTE π
okay this is the important one, listen up π β if the user needs the guarantee that the updater either adds itself in the lockless list or that the concurrent flusher flushes its updated stats, then a memory barrier is needed before the call to __css_rstat_updated.
Like, precisely: a barrier after updating the per-cpu stats and before calling __css_rstat_updated.
no barrier = no guarantee, and we don't do undefined chaos in this house π«π
π₯ SEE ALSO π₯
- Kernel file
./kernel/cgroup/rstat.c css_rstat_push_children(9)css_rstat_updated_list(9)css_rstat_flush(9)ss_rstat_init(9)
and that's the whole page bestie, go forth and update your rstat_cpu π this came straight out of ./kernel/cgroup, dated October 2026, and we're obsessed with her π§ββοΈβ
π¦ 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