uncharge_cg_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so welcome to uncharge_cg_locked(9) from the Kernel API Manual, bestie πŸ’– this page is literally about how you uncharge a resource for the rdma cgroup β€” yes, it’s giving β€œput that resource back” energy, but make it kernel-level 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

void uncharge_cg_locked (struct rdma_cgroup *cg , struct rdmacg_device
*device , enum rdmacg_resource_type index );

πŸŽ€ ARGUMENTS πŸŽ€

  • cg β€” pointer to the cg you’re uncharging, and all the parents in the hierarchy too β€” not just one lonely cg, bestie, the whole family tree gets handled πŸ’…
  • device β€” pointer to the rdmacg device, iconic ✨
  • index β€” the index of the resource to uncharge in cg (aka the resource pool) πŸŽ€

🌸 DESCRIPTION 🌸

so here’s the extra cleanup moment: it also frees the resource pool that was created as part of the charging operation β€” but only when there are no resources attached to the resource pool. literally β€œif it’s empty, free it” vibes πŸ§šβ€β™€οΈ no cap.

πŸ”₯ SEE ALSO πŸ”₯

go give these pages some love too, bestie 🫢


k that’s the whole page, bestie 🫢 this manual lives in ./kernel/cgroup, dated October 2026, and it’s the uncharge_cg_locked(9) moment. periodt πŸ’œβœ¨

πŸ“¦ where this page comes from