__css_rstat_updated(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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 which rstat_cpu was 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 πŸ”₯


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