Migrating a process to another autogroup (or enabling cgroups v2 cpu)

Hi all

If you have /proc/sys/kernel/sched_autogroup_enabled set at 1, every process you have (as seen on /proc/<pid>) has an autogroup to which it belongs. A new autogroup is created a each call of setsid and it groups process as a way to increase interactivity. This has lots of consequences, individual niceness of a process isn’t as important as the niceness of the autogroup, which can be set via /proc. So grouping has to be done carefully. I usually encounter an already running program, say smplayer, which I should have launched from a new pty so it gets it own autogroup and doesn’t get penalized. I could launch a new pty afterwards, get the autogroup and try to migrate smplayer to it, but I don’t know how to do it, any one care to help?

Another alternative is use cgroups. I use cgroups v2 set up at kernel boot time without any v1 controller, but enabling the cpu controller as # echo "+cpu" >/sys/fs/cgroup/cgroups.subtree_control always fails. Anyone has a working cpu controller on cgroups v2? how did you do it?