From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH v4 5/8] cgroup: Wrap subsystem selection macro Date: Thu, 13 Sep 2012 14:41:34 +0800 Message-ID: <5051801E.2010703@huawei.com> References: <1347459128-32236-1-git-send-email-wagi@monom.org> <1347459128-32236-6-git-send-email-wagi@monom.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1347459128-32236-6-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Daniel Wagner Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Daniel Wagner , Gao feng , Jamal Hadi Salim , John Fastabend , Neil Horman , Tejun Heo On 2012/9/12 22:12, Daniel Wagner wrote: > From: Daniel Wagner > > Before we are able to define all subsystem ids at compile time we need > a more fine grained control what gets defined when we include > cgroup_subsys.h. For example we define the enums for the subsystems or > to declare for struct cgroup_subsys (builtin subsystem) by including > cgroup_subsys.h and defining SUBSYS accordingly. > > Currently, the decision if a subsys is used is defined inside the > header by testing if CONFIG_*=y is true. By moving this test outside > of cgroup_subsys.h we are able to control it on the include level. > > This is done by introducing IS_SUBSYS_ENABLED which then is defined > according the task, e.g. is CONFIG_*=y or CONFIG_*=m. > > Signed-off-by: Daniel Wagner > Cc: Gao feng > Cc: Jamal Hadi Salim > Cc: John Fastabend > Cc: Li Zefan > Cc: Neil Horman > Cc: Tejun Heo > Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Acked-by: Li Zefan > --- > include/linux/cgroup.h | 4 ++++ > include/linux/cgroup_subsys.h | 24 ++++++++++++------------ > kernel/cgroup.c | 1 + > 3 files changed, 17 insertions(+), 12 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH v4 5/8] cgroup: Wrap subsystem selection macro Date: Thu, 13 Sep 2012 14:41:34 +0800 Message-ID: <5051801E.2010703@huawei.com> References: <1347459128-32236-1-git-send-email-wagi@monom.org> <1347459128-32236-6-git-send-email-wagi@monom.org> Mime-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Cc: , , Daniel Wagner , Gao feng , Jamal Hadi Salim , John Fastabend , Neil Horman , Tejun Heo To: Daniel Wagner Return-path: In-Reply-To: <1347459128-32236-6-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 2012/9/12 22:12, Daniel Wagner wrote: > From: Daniel Wagner > > Before we are able to define all subsystem ids at compile time we need > a more fine grained control what gets defined when we include > cgroup_subsys.h. For example we define the enums for the subsystems or > to declare for struct cgroup_subsys (builtin subsystem) by including > cgroup_subsys.h and defining SUBSYS accordingly. > > Currently, the decision if a subsys is used is defined inside the > header by testing if CONFIG_*=y is true. By moving this test outside > of cgroup_subsys.h we are able to control it on the include level. > > This is done by introducing IS_SUBSYS_ENABLED which then is defined > according the task, e.g. is CONFIG_*=y or CONFIG_*=m. > > Signed-off-by: Daniel Wagner > Cc: Gao feng > Cc: Jamal Hadi Salim > Cc: John Fastabend > Cc: Li Zefan > Cc: Neil Horman > Cc: Tejun Heo > Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Acked-by: Li Zefan > --- > include/linux/cgroup.h | 4 ++++ > include/linux/cgroup_subsys.h | 24 ++++++++++++------------ > kernel/cgroup.c | 1 + > 3 files changed, 17 insertions(+), 12 deletions(-)