[PATCH] reduce sizeof(struct file)
authorEric Dumazet <dada1@cosmosbay.com>
Sun, 30 Oct 2005 23:02:16 +0000 (15:02 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:19 +0000 (17:37 -0800)
commit2f51201662b28dbf8c15fb7eb972bc51c6cc3fa5
tree96826df796058560bc5dd1f7d8d476c5a741d7bc
parent503af334ecf23b9d65d2ff0cc759f3a0bf338290
[PATCH] reduce sizeof(struct file)

Now that RCU applied on 'struct file' seems stable, we can place f_rcuhead
in a memory location that is not anymore used at call_rcu(&f->f_rcuhead,
file_free_rcu) time, to reduce the size of this critical kernel object.

The trick I used is to move f_rcuhead and f_list in an union called f_u

The callers are changed so that f_rcuhead becomes f_u.fu_rcuhead and f_list
becomes f_u.f_list

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/tty_io.c
fs/dquot.c
fs/file_table.c
fs/proc/generic.c
fs/super.c
include/linux/fs.h
security/selinux/hooks.c
security/selinux/selinuxfs.c