All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@monom.org>
To: Tejun Heo <tj@kernel.org>
Cc: lizefan@huawei.com, mhocko@suse.cz, rjw@sisk.pl,
	containers@lists.linux-foundation.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	fweisbec@gmail.com, Glauber Costa <glommer@parallels.com>
Subject: Re: [PATCH 1/9 v3] cgroup: add cgroup_subsys->post_create()
Date: Mon, 12 Nov 2012 14:04:56 +0100	[thread overview]
Message-ID: <50A0F3F8.6040000@monom.org> (raw)
In-Reply-To: <20121109172211.GB2711@htj.dyndns.org>

Hi Tejun,

On 09.11.2012 18:22, Tejun Heo wrote:
> Hey, Daniel.
>
> On Fri, Nov 09, 2012 at 12:09:38PM +0100, Daniel Wagner wrote:
>> On 08.11.2012 20:07, Tejun Heo wrote:> Subject: cgroup: add
>> cgroup_subsys->post_create()
>>>
>>> Currently, there's no way for a controller to find out whether a new
>>> cgroup finished all ->create() allocatinos successfully and is
>>> considered "live" by cgroup.
>>
>> I'd like add hierarchy support to net_prio and the first thing to
>> do is to get rid of get_prioidx(). It looks like it would be nice to
>
> Ooh, I'm already working on it.  I *think* I should be able to post
> the patches later today or early next week.

No problem. I didn't spend too much time in writing the patch. Getting
rid of get_prioidx() was simple. I just wanted to help out, but then
I might to slow to keep up with you :)

Though I have a question on the patch you are writing. When you disable
broken_hierarchy for the networking controllers, are you also 
considering to disable them on the root cgroup? Currently both
net_prio and net_cls will do work on the root cgroup. I think for
harmonizing the behavior or all controllers this should also be
disabled.

>> be able to use use_id and post_create() for this but as I read the
>> code this might not work because the netdev might access resources
>> allocated between create() and post_create(). So my question is
>> would it make sense to move
>>
>> cgroup_create():
>>
>> 		if (ss->use_id) {
>> 			err = alloc_css_id(ss, parent, cgrp);
>> 			if (err)
>> 				goto err_destroy;
>> 		}
>>
>> part before create() or add some protection between create() and
>> post_create() callback in net_prio. I have a patch but I see
>> I could drop it completely if post_create() is there.
>
> Glauber had about similar question about css_id and I need to think
> more about it but currently I think I want to phase out css IDs.  It's
> an id of the wrong thing (CSSes don't need IDs, cgroups do) and
> unnecessarily duplicates its own hierarchy when the hierarchy of
> cgroups already exists.  Once memcontrol moves away from walking using
> css_ids, I *think* I'll try to kill it.
>
> I'll add cgroup ID (no hierarchy funnies, just a single ida allocated
> number) so that it can be used for cgroup indexing.  Glauber, that
> should solve your problem too, right?

net_prio doesn't have any particular requirements on the indexing, 
unless there is one. So a global ida would work for net_prio.

cheers,
daniel


  reply	other threads:[~2012-11-12 13:04 UTC|newest]

Thread overview: 171+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-03  8:38 [PATCHSET cgroup/for-3.8] cgroup_freezer: implement proper hierarchy support Tejun Heo
2012-11-03  8:38 ` Tejun Heo
     [not found] ` <1351931915-1701-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-03  8:38   ` [PATCH 1/9] cgroup: add cgroup_subsys->post_create() Tejun Heo
2012-11-03  8:38     ` Tejun Heo
     [not found]     ` <1351931915-1701-2-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-05 13:42       ` Glauber Costa
2012-11-05 13:42         ` Glauber Costa
     [not found]         ` <5097C23B.3040808-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-11-05 18:02           ` [RFC] cgroup: deprecate clone_children Tejun Heo
2012-11-05 18:02             ` Tejun Heo
     [not found]             ` <20121105180213.GB19354-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-11-05 19:17               ` Serge Hallyn
2012-11-05 19:17                 ` Serge Hallyn
2012-11-05 19:26                 ` Tejun Heo
2012-11-05 19:26                   ` Tejun Heo
2012-11-07 15:25       ` [PATCH 1/9] cgroup: add cgroup_subsys->post_create() Michal Hocko
2012-11-07 15:25         ` Michal Hocko
     [not found]         ` <20121107152516.GA4131-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-07 17:02           ` Tejun Heo
2012-11-07 17:02             ` Tejun Heo
2012-11-07 17:15       ` [PATCH 1/9 v2] " Tejun Heo
2012-11-07 17:15         ` Tejun Heo
     [not found]         ` <20121107171508.GF2660-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-11-07 17:40           ` Michal Hocko
2012-11-07 17:40             ` Michal Hocko
2012-11-07 17:40           ` Michal Hocko
2012-11-08  2:59           ` Kamezawa Hiroyuki
2012-11-08  2:59           ` Kamezawa Hiroyuki
2012-11-08  2:59             ` Kamezawa Hiroyuki
2012-11-08 19:07       ` [PATCH 1/9 v3] " Tejun Heo
2012-11-08 19:07     ` Tejun Heo
2012-11-09  9:09       ` Li Zefan
2012-11-09  9:09         ` Li Zefan
     [not found]       ` <20121108190715.GD9672-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-09  9:09         ` Li Zefan
2012-11-09  9:09         ` Li Zefan
2012-11-09  9:09           ` Li Zefan
2012-11-09  9:09         ` Li Zefan
2012-11-09 11:09         ` Daniel Wagner
2012-11-09 11:09         ` Daniel Wagner
2012-11-09 11:09           ` Daniel Wagner
     [not found]           ` <509CE472.9040504-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-11-09 17:22             ` Tejun Heo
2012-11-09 17:22               ` Tejun Heo
2012-11-12 13:04               ` Daniel Wagner [this message]
     [not found]               ` <20121109172211.GB2711-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-10  1:35                 ` Glauber Costa
2012-11-10  1:35                 ` Glauber Costa
2012-11-10  1:35                   ` Glauber Costa
2012-11-12 13:04                 ` Daniel Wagner
2012-11-09 17:22             ` Tejun Heo
2012-11-03  8:38   ` [PATCH 2/9] cgroup: Use rculist ops for cgroup->children Tejun Heo
2012-11-03  8:38     ` Tejun Heo
2012-11-07 15:30     ` Michal Hocko
     [not found]     ` <1351931915-1701-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-07 15:30       ` Michal Hocko
2012-11-08  3:01       ` Kamezawa Hiroyuki
2012-11-08  3:01         ` Kamezawa Hiroyuki
2012-11-08  3:01       ` Kamezawa Hiroyuki
2012-11-09  9:10       ` Li Zefan
2012-11-09  9:10         ` Li Zefan
2012-11-03  8:38   ` [PATCH 3/9] cgroup: implement generic child / descendant walk macros Tejun Heo
2012-11-03  8:38     ` Tejun Heo
2012-11-06 20:31     ` Tejun Heo
     [not found]       ` <20121106203154.GV30069-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-11-07 15:38         ` Michal Hocko
2012-11-07 15:38           ` Michal Hocko
2012-11-07 15:38         ` Michal Hocko
2012-11-07 16:54     ` Michal Hocko
     [not found]       ` <20121107165457.GD4131-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-07 17:01         ` Tejun Heo
2012-11-07 17:01         ` Tejun Heo
2012-11-07 17:01           ` Tejun Heo
     [not found]           ` <20121107170118.GD2660-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-11-07 17:49             ` Michal Hocko
2012-11-07 17:49               ` Michal Hocko
2012-11-07 17:49             ` Michal Hocko
     [not found]     ` <1351931915-1701-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-06 20:31       ` Tejun Heo
2012-11-07 16:54       ` Michal Hocko
2012-11-08  3:21       ` Kamezawa Hiroyuki
2012-11-08  3:21         ` Kamezawa Hiroyuki
2012-11-08  9:50       ` Michal Hocko
2012-11-08  9:50         ` Michal Hocko
     [not found]         ` <20121108095013.GA31821-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-08 17:15           ` Tejun Heo
2012-11-08 17:15         ` Tejun Heo
2012-11-08 17:59       ` [PATCH 3/9 v2] " Tejun Heo
2012-11-08 17:59     ` Tejun Heo
     [not found]       ` <20121108175946.GA9672-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-09  9:13         ` Li Zefan
2012-11-09  9:13           ` Li Zefan
2012-11-03  8:38   ` [PATCH 4/9] cgroup_freezer: trivial cleanups Tejun Heo
2012-11-03  8:38     ` Tejun Heo
     [not found]     ` <1351931915-1701-5-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-08  3:24       ` Kamezawa Hiroyuki
2012-11-08  3:24       ` Kamezawa Hiroyuki
2012-11-08  3:24         ` Kamezawa Hiroyuki
2012-11-08  9:53       ` Michal Hocko
2012-11-08  9:53         ` Michal Hocko
2012-11-03  8:38   ` [PATCH 5/9] cgroup_freezer: prepare freezer_change_state() for full hierarchy support Tejun Heo
2012-11-03  8:38     ` Tejun Heo
     [not found]     ` <1351931915-1701-6-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-08  4:25       ` Kamezawa Hiroyuki
2012-11-08  4:25         ` Kamezawa Hiroyuki
2012-11-08  4:25       ` Kamezawa Hiroyuki
2012-11-08  9:56       ` Michal Hocko
2012-11-08  9:56     ` Michal Hocko
2012-11-03  8:38   ` [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags Tejun Heo
2012-11-03  8:38     ` Tejun Heo
     [not found]     ` <1351931915-1701-7-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-08  4:37       ` Kamezawa Hiroyuki
2012-11-08  4:37       ` Kamezawa Hiroyuki
2012-11-08  4:37         ` Kamezawa Hiroyuki
     [not found]         ` <509B371E.9050005-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2012-11-08  4:42           ` Tejun Heo
2012-11-08  4:42             ` Tejun Heo
     [not found]             ` <20121108044255.GG2660-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-11-08  5:00               ` Kamezawa Hiroyuki
2012-11-08  5:00                 ` Kamezawa Hiroyuki
     [not found]                 ` <509B3C72.3050904-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2012-11-08 14:38                   ` Tejun Heo
2012-11-08 14:38                 ` Tejun Heo
2012-11-08  5:00               ` Kamezawa Hiroyuki
2012-11-08 10:39       ` Michal Hocko
2012-11-08 10:39         ` Michal Hocko
     [not found]         ` <20121108103928.GD31821-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-08 14:39           ` Tejun Heo
2012-11-08 14:39             ` Tejun Heo
     [not found]             ` <20121108143952.GD12973-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-08 14:47               ` Michal Hocko
2012-11-08 14:47                 ` Michal Hocko
2012-11-03  8:38   ` [PATCH 7/9] cgroup_freezer: introduce CGROUP_FREEZING_[SELF|PARENT] Tejun Heo
2012-11-03  8:38     ` Tejun Heo
     [not found]     ` <1351931915-1701-8-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-08  4:42       ` Kamezawa Hiroyuki
2012-11-08  4:42         ` Kamezawa Hiroyuki
     [not found]         ` <509B382E.4030707-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2012-11-08  4:45           ` Tejun Heo
2012-11-08  4:45             ` Tejun Heo
     [not found]             ` <20121108044521.GH2660-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-11-08  4:56               ` Kamezawa Hiroyuki
2012-11-08  4:56             ` Kamezawa Hiroyuki
     [not found]               ` <509B3B94.1070407-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2012-11-08 14:41                 ` Tejun Heo
2012-11-08 14:41                   ` Tejun Heo
2012-11-08  4:42       ` Kamezawa Hiroyuki
2012-11-08 12:47       ` Michal Hocko
2012-11-08 12:47     ` Michal Hocko
     [not found]       ` <20121108124755.GG31821-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-08 14:42         ` Tejun Heo
2012-11-08 14:42       ` Tejun Heo
2012-11-03  8:38   ` [PATCH 8/9] cgroup_freezer: add ->post_create() and ->pre_destroy() and track online state Tejun Heo
2012-11-03  8:38     ` Tejun Heo
2012-11-08 13:23     ` Michal Hocko
     [not found]       ` <20121108132306.GH31821-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-08 17:17         ` Tejun Heo
2012-11-08 17:17           ` Tejun Heo
2012-11-08 17:17         ` Tejun Heo
     [not found]     ` <1351931915-1701-9-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-08  4:48       ` Kamezawa Hiroyuki
2012-11-08  4:48       ` Kamezawa Hiroyuki
2012-11-08  4:48         ` Kamezawa Hiroyuki
     [not found]         ` <509B3999.6060505-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2012-11-08 15:41           ` Tejun Heo
2012-11-08 15:41             ` Tejun Heo
2012-11-08 15:41           ` Tejun Heo
2012-11-08 13:23       ` Michal Hocko
2012-11-03  8:38   ` [PATCH 9/9] cgroup_freezer: implement proper hierarchy support Tejun Heo
2012-11-03  8:38     ` Tejun Heo
2012-11-07 11:00     ` Michal Hocko
2012-11-07 16:31       ` Tejun Heo
     [not found]       ` <20121107110024.GA4143-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-07 16:31         ` Tejun Heo
     [not found]     ` <1351931915-1701-10-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-07 11:00       ` Michal Hocko
2012-11-07 16:39       ` [PATCH 9/9 v2] " Tejun Heo
2012-11-07 16:39         ` Tejun Heo
     [not found]         ` <20121107163919.GC2660-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-11-08 14:08           ` Michal Hocko
2012-11-08 14:08             ` Michal Hocko
     [not found]             ` <20121108140852.GI31821-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-08 14:18               ` Tejun Heo
2012-11-08 14:18                 ` Tejun Heo
2012-11-08 15:20                 ` Michal Hocko
     [not found]                   ` <20121108152039.GL31821-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-08 15:29                     ` Tejun Heo
2012-11-08 15:29                       ` Tejun Heo
     [not found]                       ` <20121108152923.GG12973-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-08 15:57                         ` Michal Hocko
2012-11-08 15:57                       ` Michal Hocko
2012-11-08 15:29                     ` Tejun Heo
     [not found]                 ` <20121108141848.GA12973-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-08 15:20                   ` Michal Hocko
2012-11-08 14:18               ` Tejun Heo
2012-11-08 17:57       ` [PATCH 9/9 v3] " Tejun Heo
2012-11-08 17:57       ` Tejun Heo
2012-11-08 17:57         ` Tejun Heo
     [not found]         ` <20121108175750.GK12973-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-08 18:02           ` Michal Hocko
2012-11-08 18:02             ` Michal Hocko
     [not found]             ` <20121108180246.GA17415-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-11-08 18:04               ` Tejun Heo
2012-11-08 18:04                 ` Tejun Heo
     [not found]                 ` <20121108180417.GC9672-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-08 18:08                   ` Michal Hocko
2012-11-08 18:08                     ` Michal Hocko
2012-11-08 18:02           ` Michal Hocko
2012-11-08 18:01   ` [PATCHSET cgroup/for-3.8] " Tejun Heo
2012-11-09 17:15   ` Tejun Heo
2012-11-09 17:15     ` Tejun Heo
2012-11-08 18:01 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A0F3F8.6040000@monom.org \
    --to=wagi@monom.org \
    --cc=cgroups@vger.kernel.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=glommer@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mhocko@suse.cz \
    --cc=rjw@sisk.pl \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.