Skip to contentSkip to conversation

fs: Move bh_cachep to the __read_mostly section

PATCH Superseded Vlad Zolotarov 1 participant 1 message May 15, 2012 VFS

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: Move bh_cachep to the __read_mostly section

From: Shai Fultheim <[email protected]>

bh_cachep is only written to once on initialization, so move it to the __read_mostly section.

---
 fs/buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/buffer.c +1 -1
index 36d6665..a1d82fb 100644
@@ -3151,7 +3151,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
Signature · 1 line
1.7.7.6