public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Tejun Heo <tj@kernel.org>
Cc: lizefan@huawei.com, containers@lists.linux-foundation.org,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Balbir Singh <bsingharora@gmail.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Aristeu Rozanski <aris@redhat.com>,
	"Serge E. Hallyn" <serue@us.ibm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Vivek Goyal <vgoyal@redhat.com>,
	Neil Horman <nhorman@tuxdriver.com>, Thomas Graf <tgraf@suug.ch>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 3/6] cgroup: clean up cgroup_subsys names and initialization
Date: Mon, 20 Jan 2014 14:13:37 +0100	[thread overview]
Message-ID: <20140120131337.GD2626@dhcp22.suse.cz> (raw)
In-Reply-To: <1389982317-22225-4-git-send-email-tj@kernel.org>

On Fri 17-01-14 13:11:54, Tejun Heo wrote:
> cgroup_subsys is a bit messier than it needs to be.
> 
> * The name of a subsys can be different from its internal identifier
>   defined in cgroup_subsys.h.  Most subsystems use the matching name
>   but three - cpu, memory and perf_event - use different ones.
> 
> * cgroup_subsys_id enums are postfixed with _subsys_id and each
>   cgroup_subsys is postfixed with _subsys.  cgroup.h is widely
>   included throughout various subsystems, it doesn't and shouldn't
>   have claim on such generic names which don't have any qualifier
>   indicating that they belong to cgroup.
> 
> * cgroup_subsys->subsys_id should always equal the matching
>   cgroup_subsys_id enum; however, we require each controller to
>   initialize it and then BUG if they don't match, which is a bit
>   silly.
> 
> This patch cleans up cgroup_subsys names and initialization by doing
> the followings.
> 
> * cgroup_subsys_id enums are now postfixed with _cgrp_id, and each
>   cgroup_subsys with _cgrp_subsys.
> 
> * With the above, renaming subsys identifiers to match the userland
>   visible names doesn't cause any naming conflicts.  All non-matching
>   identifiers are renamed to match the official names.
> 
>   cpu_cgroup -> cpu
>   mem_cgroup -> memory
>   perf -> perf_event
> 
> * controllers no longer need to initialize ->subsys_id and ->name.
>   They're generated in cgroup core and set automatically during boot.
> 
> * Redundant cgroup_subsys declarations removed.
> 
> * While updating BUG_ON()s in cgroup_init_early(), convert them to
>   WARN()s.  BUGging that early during boot is stupid - the kernel
>   can't print anything, even through serial console and the trap
>   handler doesn't even link stack frame properly for back-tracing.
> 
> This patch doesn't introduce any behavior changes.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Li Zefan <lizefan@huawei.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@suse.cz>
> Cc: Balbir Singh <bsingharora@gmail.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Aristeu Rozanski <aris@redhat.com>
> Cc: Serge E. Hallyn <serue@us.ibm.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> Cc: Neil Horman <nhorman@tuxdriver.com>
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: "David S. Miller" <davem@davemloft.net>

For memcg and hugetlb
Acked-by: Michal Hocko <mhocko@suse.cz>

[...]

Thanks!
-- 
Michal Hocko
SUSE Labs

  parent reply	other threads:[~2014-01-20 13:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 18:11 [PATCHSET cgroup/for-3.14] cgroup: drop module support and cgroup_root_mutex Tejun Heo
2014-01-17 18:11 ` [PATCH 1/6] cgroup: make CONFIG_NET_CLS_CGROUP and CONFIG_NETPRIO_CGROUP bool instead of tristate Tejun Heo
2014-01-17 20:37   ` Neil Horman
2014-01-18  1:08   ` Li Zefan
2014-01-18 11:25     ` Daniel Borkmann
2014-01-18 15:10     ` Tejun Heo
2014-01-18 15:26       ` Daniel Borkmann
2014-01-18 15:28         ` Tejun Heo
2014-01-18 15:29           ` Daniel Borkmann
2014-01-18  3:10   ` David Miller
2014-01-17 18:11 ` [PATCH 2/6] cgroup: drop module support Tejun Heo
2014-01-17 18:11 ` [PATCH 3/6] cgroup: clean up cgroup_subsys names and initialization Tejun Heo
2014-01-17 20:49   ` Neil Horman
2014-01-18  3:10   ` David Miller
2014-01-20 13:13   ` Michal Hocko [this message]
2014-01-17 18:11 ` [PATCH 4/6] cgroup: rename cgroup_subsys->subsys_id to ->id Tejun Heo
2014-01-17 18:11 ` [PATCH 5/6] cgroup: update locking in cgroup_show_options() Tejun Heo
2014-01-17 18:11 ` [PATCH 6/6] cgroup: remove cgroup_root_mutex Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2014-01-28 23:43 [PATCHSET v2 cgroup/for-3.15] cgroup: drop module support and cgroup_root_mutex Tejun Heo
2014-01-28 23:43 ` [PATCH 3/6] cgroup: clean up cgroup_subsys names and initialization Tejun Heo
2014-01-29  0:04   ` Rafael J. Wysocki
2014-01-29  8:59   ` Michal Hocko
2014-01-29 10:46   ` Peter Zijlstra
2014-01-30  9:16     ` Ingo Molnar
2014-01-29 16:23   ` Aristeu Rozanski

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=20140120131337.GD2626@dhcp22.suse.cz \
    --to=mhocko@suse.cz \
    --cc=aris@redhat.com \
    --cc=bsingharora@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mingo@redhat.com \
    --cc=nhorman@tuxdriver.com \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=serue@us.ibm.com \
    --cc=tgraf@suug.ch \
    --cc=tj@kernel.org \
    --cc=vgoyal@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox