aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pid.h
diff options
context:
space:
mode:
authorRichard Kennedy <richard@rsk.demon.co.uk>2008-07-25 04:48:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 13:53:45 -0400
commit33166b1ffca5e1945246bcaa77d72a22b0d3e531 (patch)
tree5e949f9f68c93ad4a487aa84aa959a5658cfd321 /include/linux/pid.h
parent3ae4eed34be0177a8e003411a84e4ee212adbced (diff)
shrink struct pid by removing padding on 64 bit builds
When struct pid is built on a 64 bit platform gcc has to insert padding to maintain the correct alignment, by simply reordering its members the memory usage shrinks from 88 bytes to 80. I've successfully run with this patch on my desktop AMD64 machine. There are no significant kernel size changes to a default config.X86_64 on the latest git v2.6.26-rc1 text data bss dec hex filename 5404828 976760 734280 7115868 6c945c vmlinux 5404811 976760 734280 7115851 6c944b vmlinux.pid-patch Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/pid.h')
-rw-r--r--include/linux/pid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h
index c21c7e8124a7..6f084b9e2c40 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -57,10 +57,10 @@ struct upid {
57struct pid 57struct pid
58{ 58{
59 atomic_t count; 59 atomic_t count;
60 unsigned int level;
60 /* lists of tasks that use this pid */ 61 /* lists of tasks that use this pid */
61 struct hlist_head tasks[PIDTYPE_MAX]; 62 struct hlist_head tasks[PIDTYPE_MAX];
62 struct rcu_head rcu; 63 struct rcu_head rcu;
63 unsigned int level;
64 struct upid numbers[1]; 64 struct upid numbers[1];
65}; 65};
66 66