]> err.no Git - linux-2.6/commit
procfs: reorder struct pid_dentry to save space on 64bit archs, and constify them
authorEric Dumazet <dada1@cosmosbay.com>
Tue, 8 May 2007 07:26:15 +0000 (00:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:03 +0000 (11:15 -0700)
commitc5141e6d64ab5c48a5e31413c7a6cdda84ac1d52
tree95a93ed2f56e98f6b6659ab906faee7abb252a49
parentd9a2f4a4945ebff54c9a011e4dc6e92d899ae26d
procfs: reorder struct pid_dentry to save space on 64bit archs, and constify them

Change the order of fields of struct pid_entry (file fs/proc/base.c) in order
to avoid a hole on 64bit archs.  (8 bytes saved per object)

Also change all pid_entry arrays to be const qualified, to make clear they
must not be modified.

Before (on x86_64) :

# size fs/proc/base.o
   text    data     bss     dec     hex filename
  15549    2192       0   17741    454d fs/proc/base.o

After :

# size fs/proc/base.o
   text    data     bss     dec     hex filename
  17229     176       0   17405    43fd fs/proc/base.o

Thats 336 bytes saved on kernel size on x86_64

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
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>
fs/proc/base.c