[PATCH 1/7] cgroups: Shrink struct cgroup_subsys

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Li Zefan
Date: Friday, October 22, 2010 - 1:09 am

On x86_32, sizeof(struct cgroup_subsys) shrinks from 276 bytes
to 264.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
include/linux/cgroup.h |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ed4ba11..e23ded6 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -481,14 +481,16 @@ struct cgroup_subsys {
 	void (*bind)(struct cgroup_subsys *ss, struct cgroup *root);
 
 	int subsys_id;
-	int active;
-	int disabled;
-	int early_init;
+
+	unsigned int active:1;
+	unsigned int disabled:1;
+	unsigned int early_init:1;
 	/*
 	 * True if this subsys uses ID. ID is not available before cgroup_init()
 	 * (not available in early_init time.)
 	 */
-	bool use_id;
+	unsigned int use_id:1;
+
 #define MAX_CGROUP_TYPE_NAMELEN 32
 	const char *name;
 
-- 
1.7.0.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Li Zefan, (Fri Oct 22, 1:09 am)
Re: [PATCH 7/7] cgroups: Update documentation for bindable ..., KAMEZAWA Hiroyuki, (Sun Oct 24, 5:36 pm)
Re: [PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Paul Menage, (Thu Oct 28, 4:34 pm)
Re: [PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Paul Menage, (Tue Nov 9, 2:05 pm)
Re: [PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Paul Menage, (Tue Nov 9, 6:53 pm)
Re: [PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Paul Menage, (Tue Nov 9, 7:15 pm)