Re: [patch] Re: autogroup: sched_setscheduler() fails

From: Yong Zhang
Date: Wed Jan 12 2011 - 00:40:47 EST


On Wed, Jan 12, 2011 at 11:37 AM, Bharata B Rao
<bharata@xxxxxxxxxxxxxxxxxx> wrote:
>> Unless I fscked up, set_task_rq() is the group change. ÂAs soon as the
>> task's class changes, it'll be moved to the root_task_group.
>
> Ok, this is what I understand, may be Peter Z can confirm...
>
> set_task_rq() just changes the task's cfs_rq and rt_rq as per its
> task_group(). The normal way to change a task's group is to first
> change its cgroup pointer (task->cgroups, see cgroup_attach_task())
> After this you change the runqueues by calling set_task_rq() which
> now refers to new group's runqueues.
>
> In your code, I don't see where you really change task's group. AFAICS,
> it continues to remain in the same autogroup.

IMHO, task->cgroups will not change when autogroup take effect.
IOW, autogroup will only take effect when task belongs to root_task_group.

Thanks,
Yong

>
> Regards,
> Bharata.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
>



--
Only stand for myself
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/