On Wed, Mar 16, 2022 at 05:30:22PM +0100, Felip Moll <felip@xxxxxxxxxxx> wrote: > That's not exact. If slurmd (my main process) forks a slurmstepd (child > process) and I want to move slurmstepd into a delegated subtree from the > scope I already created, I must use AttachProcessesToUnit(), isn't that > true? Just a sidenote, I'd suggest the idiom: fork,migrate,exec (in this synchronous order) to make sure the new program runs under the target cgroup. > Or are you saying that I can just migrate processes wildly without > informing systemd and just doing an 'echo > cgroup.procs' from one > non-delegated tree to my delegated subtree? I'd still recommend going through the API. Or at least migrate between two delegated subtrees. (As I hinted in my previous message, bypassing API makes sense only with the unified cgroup mode and you must be privileged to do this.) Michal