diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2007-02-10 01:44:48 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 10:51:25 -0800 |
commit | 4ba4d4c0c52201009232fe9e781a281054a24e75 (patch) | |
tree | 4b4d47c78c561fc8f3d79713e7f80def3d9b73ce /fs/inode.c | |
parent | 0aa5de8590d684274f57647a870851f101bb3543 (diff) | |
download | linux-4ba4d4c0c52201009232fe9e781a281054a24e75.tar.gz linux-4ba4d4c0c52201009232fe9e781a281054a24e75.tar.bz2 linux-4ba4d4c0c52201009232fe9e781a281054a24e75.zip |
[PATCH] struct vfsmount: keep mnt_count & mnt_expiry_mark away from mnt_flags
I noticed cache misses in touch_atime() that can be avoided if we keep
mnt_count & mnt_expiry_mark in a different cache line than mnt_flags
(mostly read)
mnt_count & mnt_expiry_mark are modified each time a file is opened/closed
in a file system.
touch_atime() is called each time a file is read, and generally needs to
read mnt_flags.
Other fields of struct vfsmount are mostly read so I chose to move
mnt_count & mnt_expiry_mark at the end of struct vfsmount. And adding a
comment so that nobody tries to re-arrange fields to fill the holes :)
On 64bits platforms, the new offsetof(mnt_count) is 0xC0
On 32bits platforms, it is 0x60, so I didnot add a
____cacheline_aligned_in_smp because it would have a too big impact on the
size of this object (in particular if CONFIG_X86_L1_CACHE_SHIFT=7)
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/inode.c')
0 files changed, 0 insertions, 0 deletions