[PATCH 4/4] mm: cleancache: Use __read_mostly as appropiate.

From: Konrad Rzeszutek Wilk
Date: Thu Jan 12 2012 - 15:38:36 EST


From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>

The values are rarely changed so might as well put them in the
appropiate section.

Signed-off-by: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Reviewed-by: Konrad Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Cc: Jan Beulich <JBeulich@xxxxxxxxxx>
Cc: Seth Jennings <sjenning@xxxxxxxxxxxxxxxxxx>
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Nitin Gupta <ngupta@xxxxxxxxxx>
Cc: Matthew Wilcox <matthew@xxxxxx>
Cc: Chris Mason <chris.mason@xxxxxxxxxx>
Cc: Rik Riel <riel@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---
mm/cleancache.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/cleancache.c b/mm/cleancache.c
index deb9f2c..5646c74 100644
--- a/mm/cleancache.c
+++ b/mm/cleancache.c
@@ -25,14 +25,14 @@
* disabled), so is preferred to the slower alternative: a function
* call that checks a non-global.
*/
-int cleancache_enabled;
+int cleancache_enabled __read_mostly;
EXPORT_SYMBOL(cleancache_enabled);

/*
* cleancache_ops is set by cleancache_ops_register to contain the pointers
* to the cleancache "backend" implementation functions.
*/
-static struct cleancache_ops cleancache_ops;
+static struct cleancache_ops cleancache_ops __read_mostly;

/*
* Counters available via /sys/kernel/debug/frontswap (if debugfs is
--
1.7.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/