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. Before someone asks, it is valid to declare a pointer as 'read mostly', even if the data pointed by the pointer is heavily modified. hash table pointers and kmem_cache pointers are setup at boot time, so they are perfect candidates to 'read_mostly' section. Same apply for 'struct vfsmount *' Signed-off-by: Eric Dumazet