cgroup_move_task(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 target css_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 🌸


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