cgroup_move_task(9)
NAME π
cgroup_move_task β move task to a different cgroup.
okay so bestie, welcome to the cgroup_move_task(9) page from the Kernel API Manual. this is literally the function that moves a task to a different cgroup. slay. π
SYNOPSIS β¨
void cgroup_move_task (struct task_struct *task , struct css_set *to );
itβs giving void, so no return value to catch β periodt. β¨
ARGUMENTS π
taskβ the task. like, the task being moved, bestie. π«Άtoβ the targetcss_set. the group itβs headed to. π¦
DESCRIPTION π
Move task to a new cgroup and safely migrate its associated stall state between the different groups. no cap, thatβs the main character move. π¦
This function acquires the taskβs rq lock to lock out concurrent changes to the taskβs scheduling state and β in case the task is running β concurrent changes to its stall state. highkey important: the lock is doing the βdonβt touch thatβ work so things donβt get messy. π
bestie, this is kernel-level stuff β the rq lock part is literally there to lock out those concurrent changes, so donβt sleep on it. π
SEE ALSO πΈ
- Kernel file
./kernel/sched/psi.c psi_memstall_enter(9)psi_memstall_leave(9)
mwah π this page lives under source/version ./kernel/sched, dated October 2026, and itβs still cgroup_move_task(9). bye bestie, go slay π«Άπ
π¦ 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