fs: Move bh_cachep to the __read_mostly section
authorShai Fultheim <shai@scalemp.com>
Tue, 15 May 2012 09:29:52 +0000 (12:29 +0300)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 31 May 2012 01:04:52 +0000 (21:04 -0400)
bh_cachep is only written to once on initialization, so move it to the
__read_mostly section.

Signed-off-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Vlad Zolotarov <vlad@scalemp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/buffer.c

index ad5938c..838a9cf 100644 (file)
@@ -3152,7 +3152,7 @@ SYSCALL_DEFINE2(bdflush, int, func, long, data)
 /*
  * Buffer-head allocation
  */
-static struct kmem_cache *bh_cachep;
+static struct kmem_cache *bh_cachep __read_mostly;
 
 /*
  * Once the number of bh's in the machine exceeds this level, we start