set_comm_cgroup(9)
π set_comm_cgroup(9) β the Kernel API Manual, bestie edition π
okay so this is set_comm_cgroup, a little function living in the Kernel API Manual (section 9, kernel-dev vibes only β¨). It's the one that grabs threads by their name prefix and yeets them into a cgroup. Let's get into it π¦
πΈ NAME πΈ
set_comm_cgroup β set the cgroup for all the threads whose names start with char *comm_prefix π
Literally what it says on the tin: you give it a prefix, it goes and finds the matching threads, and moves them into a cgroup. iconic behaviour tbh π
β¨ SYNOPSIS β¨
int set_comm_cgroup (const char *comm_prefix , const char *cgroup );
that's the whole signature, no cap β two const char * args and it hands you back an int π«Ά
π ARGUMENTS π
comm_prefixβ ngl the man page itself just says -- undescribed -- π so like, the prefix that thread names get matched against, per the NAME section. That's all we've got, bestie, don't come for me πcgroupβ also literally -- undescribed -- π see DESCRIPTION for what it actually does with it, that's where the lore is β¨
fr fr these two are marked undescribed in the source page, so I'm not out here inventing details. staying in my lane π
π₯ DESCRIPTION π₯
okay so here's the tea β
If the cgroup argument is not NULL, the threads will move to the given cgroup. slay, that's the main character behaviour right there π
Otherwise β like, when cgroup is NULL β the cgroup of the calling thread will be used. and by "the calling thread" we specifically mean rtla, iykyk π§
It supports cgroup v2. only v2, so don't come at it with your legacy cgroup v1 energy, it's not the vibe π
Returns 1 on success, 0 otherwise. that's it. one for yes, zero for nope π
π¦ SEE ALSO π¦
- Kernel file
./tools/tracing/rtla/src/utils.c auto_house_keeping(9)
go read those if you want the full picture, bestie πβ¨
and that's the whole page!! mwah π this lil gem comes from ./tools/tracing/rtla/src, dated October 2026 β so like, future vibes ππ«Ά 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