1、I try to use CLONE_INTO_CGROUP flag to Clone a task into a specific cpuset cgroup, then I found the child's cpuset is correct, but the real properties(task_struct->cpus_mask for me) are inherited from the parent process.It's not what I expected.
static void cpuset_fork(struct task_struct *task)
{
if (task_css_is_root(task, cpuset_cgrp_id))
return;
set_cpus_allowed_ptr(task, current->cpus_ptr);
task->mems_allowed = current->mems_allowed;
}
This code doesn't seem to have considered the CLONE_INTO_CGROUP flag; is it a bug?
the information of CLONE_INTO_CGROUP is very little,may i use it with wrong way?