[PATCH] Use __read_mostly on some hot fs variables
I discovered on oprofile hunting on a SMP platform that dentry lookups were slowed down because d_hash_mask, d_hash_shift and dentry_hashtable were in a cache line that contained inodes_stat. So each time inodes_stats is changed by a cpu, other cpus have to refill their cache line. This patch moves some variables to the __read_mostly section, in order to avoid false sharing. RCU dentry lookups can go full speed. Signed-off-by:Eric Dumazet <dada1@cosmosbay.com> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
Showing
- fs/bio.c 2 additions, 2 deletionsfs/bio.c
- fs/block_dev.c 2 additions, 2 deletionsfs/block_dev.c
- fs/dcache.c 7 additions, 7 deletionsfs/dcache.c
- fs/dcookies.c 3 additions, 3 deletionsfs/dcookies.c
- fs/dnotify.c 2 additions, 2 deletionsfs/dnotify.c
- fs/eventpoll.c 3 additions, 3 deletionsfs/eventpoll.c
- fs/fcntl.c 2 additions, 2 deletionsfs/fcntl.c
- fs/inode.c 4 additions, 4 deletionsfs/inode.c
- fs/inotify.c 6 additions, 6 deletionsfs/inotify.c
- fs/locks.c 1 addition, 1 deletionfs/locks.c
- fs/namespace.c 2 additions, 2 deletionsfs/namespace.c
- fs/pipe.c 1 addition, 1 deletionfs/pipe.c
Please register or sign in to comment