[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200703082040.57150.dada1@cosmosbay.com>
Date: Thu, 8 Mar 2007 20:40:57 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] procfs : reorder struct pid_dentry to save space on 64bit archs, and constify them
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@...mosbay.com>
fs/proc/base.c | 53 +++++++++++++++++++++++------------------------
1 file changed, 27 insertions(+), 26 deletions(-)
View attachment "pid_entry.patch" of type "text/plain" (6919 bytes)
Powered by blists - more mailing lists