[PATCH] procfs : reorder struct pid_dentry to save space on 64bit archs, and constify them

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Thursday, March 8, 2007 - 12:40 pm

This patches changes 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)

It also changes 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>

 fs/proc/base.c |   53 +++++++++++++++++++++++------------------------
 1 file changed, 27 insertions(+), 26 deletions(-)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] procfs : reorder struct pid_dentry to save space o ..., Eric Dumazet, (Thu Mar 8, 12:40 pm)