Re: [PATCH cgroup/for-3.11 1/3] cgroup: mark "tasks" cgroup file as insane

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon 03-06-13 19:13:02, Tejun Heo wrote:
> Some resources controlled by cgroup aren't per-task and cgroup core
> allowing threads of a single thread_group to be in different cgroups
> forced memcg do explicitly find the group leader and use it.  This is
> gonna be nasty when transitioning to unified hierarchy and in general
> we don't want and won't support granularity finer than processes.
> 
> Mark "tasks" with CFTYPE_INSANE.

Hmm, I wasn't aware that procs is a better interface to work with
entities in the group so I was using tasks which worked well for memcg.
I am afraid I am not the only one. Can we get a warning when somebody
opens the file?

That being said, I do not object against removal, please just add a
warning to let people know that procs is a preferred interface.

> Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxx>
> Cc: Balbir Singh <bsingharora@xxxxxxxxx>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> Cc: cgroups@xxxxxxxxxxxxxxx
> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx>
> ---
>  kernel/cgroup.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -4037,6 +4037,7 @@ static int cgroup_clone_children_write(s
>  static struct cftype files[] = {
>  	{
>  		.name = "tasks",
> +		.flags = CFTYPE_INSANE,		/* use "procs" instead */
>  		.open = cgroup_tasks_open,
>  		.write_u64 = cgroup_tasks_write,
>  		.release = cgroup_pidlist_release,
> --
> To unsubscribe from this list: send the line "unsubscribe cgroups" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Michal Hocko
SUSE Labs
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers




[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux