cgroup_e_css(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 cgroup_e_css πŸ’… β€” Kernel API Manual ✨

okay so bestie, we're in the kernel API manual today and the vibe is extremely "I live in ./kernel/cgroup and I know things." sit down, grab a strawberry πŸ“, let's talk about how to get a cgroup's effective css. it's giving niche but iconic, iykyk.


✨ NAME ✨

cgroup_e_css β€” obtain a cgroup's effective css for the specified subsystem πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct cgroup_subsys_state * cgroup_e_css (struct cgroup *cgrp , struct cgroup_subsys *ss );

like, that's the whole signature. no crumbs. slay. ✨


🎯 ARGUMENTS 🎯

  • cgrp β€” the cgroup of interest πŸ‘€ like the one you're literally asking about
  • ss β€” the subsystem of interest πŸ’– the one you want it for

πŸ‘‘ DESCRIPTION πŸ‘‘

okay here's the main character moment: this function finds and gets the effective css of cgrp for ss. and what even is the effective css, you ask? it's defined as the matching css of the nearest ancestor including self which has ss enabled β€” so basically you walk up the family tree (starting with the cgroup itself, yes self counts bestie) until you find the closest one with that subsystem turned on. found family but make it cgroups. 🧚

and if ss is not mounted on the hierarchy that cgrp is on? the root css gets returned. so no cap, this function always returns a valid css. it never leaves you on read. 🫢

⚠️ but listen β€” the returned css is not guaranteed to be online, and therefore it is the caller's responsibility to try get a reference for it. so don't just take it and run, that's not the vibe. get your own reference, be responsible, protect your peace. πŸ’€

🌈 SEE ALSO 🌈

the whole friend group, in the order they appear β€” not one of them skipped, we do not do that here πŸ’…:

that's the whole group chat, nobody left on delivered. πŸ“±πŸ’–


alright bestie, that's the page β€” brought to you from the ./kernel/cgroup directory, dated October 2026, manual section 9, no notes, periodt. go get that css and get a reference for it. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from