From: Neil Horman <nhorman@tuxdriver.com>
To: Tejun Heo <tj@kernel.org>
Cc: lizefan@huawei.com, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>, Vivek Goyal <vgoyal@redhat.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Aristeu Rozanski <aris@redhat.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes
Date: Thu, 3 Jul 2014 07:14:40 -0400 [thread overview]
Message-ID: <20140703111440.GC9748@hmsreliant.think-freely.org> (raw)
In-Reply-To: <1404345055-8196-5-git-send-email-tj@kernel.org>
On Wed, Jul 02, 2014 at 07:50:54PM -0400, Tejun Heo wrote:
> Until now, cftype arrays carried files for both the default and legacy
> hierarchies and the files which needed to be used on only one of them
> were flagged with either CFTYPE_ONLY_ON_DFL or CFTYPE_INSANE. This
> gets confusing very quickly and we may end up exposing interface files
> to the default hierarchy without thinking it through.
>
> This patch makes cgroup core provide separate sets of interfaces for
> cftype handling so that the cftypes for the default and legacy
> hierarchies are clearly distinguished. The previous two patches
> renamed the existing ones so that they clearly indicate that they're
> for the legacy hierarchies. This patch adds the interface for the
> default hierarchy and apply them selectively depending on the
> hierarchy type.
>
> * cftypes added through cgroup_subsys->dfl_cftypes and
> cgroup_add_dfl_cftypes() only show up on the default hierarchy.
>
> * cftypes added through cgroup_subsys->legacy_cftypes and
> cgroup_add_legacy_cftypes() only show up on the legacy hierarchies.
>
> * cgroup_subsys->dfl_cftypes and ->legacy_cftypes can point to the
> same array for the cases where the interface files are identical on
> both types of hierarchies.
>
> * This makes all the existing subsystem interface files legacy-only by
> default and all subsystems will have no interface file created when
> enabled on the default hierarchy. Each subsystem should explicitly
> review and compose the interface for the default hierarchy.
>
> * A boot param "cgroup__DEVEL__legacy_files_on_dfl" is added which
> makes subsystems which haven't decided the interface files for the
> default hierarchy to present the legacy files on the default
> hierarchy so that its behavior on the default hierarchy can be
> tested. As the awkward name suggests, this is for development only.
>
> * memcg's CFTYPE_INSANE on "use_hierarchy" is noop now as the whole
> array isn't used on the default hierarchy. The flag is removed.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@suse.cz>
> Cc: Li Zefan <lizefan@huawei.com>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Aristeu Rozanski <aris@redhat.com>
> Cc: Neil Horman <nhorman@tuxdriver.com>
> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
next prev parent reply other threads:[~2014-07-03 11:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 23:50 [PATCHSET cgroup/for-3.17] " Tejun Heo
2014-07-02 23:50 ` [PATCH 1/5] cgroup: split cgroup_base_files[] into cgroup_{dfl|legacy}_base_files[] Tejun Heo
2014-07-04 17:11 ` [PATCH v2 " Tejun Heo
2014-07-02 23:50 ` [PATCH 2/5] cgroup: rename cgroup_subsys->base_cftypes to ->legacy_cftypes Tejun Heo
2014-07-03 11:02 ` Neil Horman
2014-07-02 23:50 ` [PATCH 3/5] cgroup: replace cgroup_add_cftypes() with cgroup_add_legacy_cftypes() Tejun Heo
2014-07-03 11:08 ` Neil Horman
2014-07-02 23:50 ` [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes Tejun Heo
2014-07-03 11:14 ` Neil Horman [this message]
2014-07-03 15:20 ` [PATCH v2 " Tejun Heo
2014-07-14 2:13 ` [PATCH " Li Zefan
2014-07-14 14:42 ` Tejun Heo
2014-07-02 23:50 ` [PATCH 5/5] cgroup: make CFTYPE_ONLY_ON_DFL and CFTYPE_NO_ internal to cgroup core Tejun Heo
2014-07-03 15:21 ` [PATCH 6/5] cgroup: initialize cgrp_dfl_root_inhibit_ss_mask from !->dfl_files test 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=20140703111440.GC9748@hmsreliant.think-freely.org \
--to=nhorman@tuxdriver.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=aris@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mhocko@suse.cz \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--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
all inboxes | Powered by JetHome®