rdmacg_event_locked(9)
π rdmacg_event_locked β like, the Kernel API Manual one, bestie
okay so we're in the Kernel API Manual today and the star of the show is rdmacg_event_locked β say that five times fast, i actually can't π
β¨ NAME β¨
rdmacg_event_locked β fire an event when a resource allocation goes over the limit π₯
πΈ SYNOPSIS πΈ
void rdmacg_event_locked (struct rdma_cgroup *cg , struct rdma_cgroup
*over_cg , struct rdmacg_device *device , enum rdmacg_resource_type
index );
like yes bestie it returns void, it's giving "i just do my thing and leave" π
π ARGUMENTS π
cgβ the cgroup that's doing the requesting, aka the one asking for stuff π«Άover_cgβ the cgroup whose limit got exceeded, rip to her honestly πdeviceβ the rdma device, the whole reason we're here β¨indexβ the resource type index, like which resource we're talking about π¦
π DESCRIPTION π
okay so the one thing you cannot skip: this must be called under rdmacg_mutex. no cap. that's the vibe check and you have to pass it π
once you're in there, here's the whole little routine she runs:
- updates the event counters in the resource pools of
cgandover_cgπ - propagates hierarchical max events from
over_cg(including itself, yes, herself too, main character energy) upward β¬οΈ - notifies userspace via
cgroup_file_notifyπ£
that's it, that's the whole function, and honestly? she ate π
π§ SEE ALSO π§
Kernel file ./kernel/cgroup/rdma.c
uncharge_cg_locked(9)rdmacg_uncharge_hierarchy(9)rdmacg_uncharge(9)rdmacg_try_charge(9)rdmacg_register_device(9)rdmacg_unregister_device(9)rdmacg_css_offline(9)
like go read those too, iykyk π
fr fr: if you're not holding rdmacg_mutex when you call this, you're doing it wrong and i will be judging you π
and that's the whole page bestie!! sourced from ./kernel/cgroup, dated October 2026, all wrapped up in rdmacg_event_locked(9) β mwah, slay, periodt ππβ¨
π¦ 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