[RFC][PATCH 2/5] mm: Switch mod_state() to __this_cpu_read()

From: Steven Rostedt
Date: Mon Sep 19 2011 - 17:27:54 EST


From: Steven Rostedt <srostedt@xxxxxxxxxx>

The code in mod_state() is already made to handle the raciness of
this_cpu_read(). Have the code use __this_cpu_read() instead so
the debug code does not trigger warnings about it.

Cc: Christoph Lameter <cl@xxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
mm/vmstat.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index d52b13d..41a843f 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -328,9 +328,9 @@ static inline void mod_state(struct zone *zone,
* Most of the time the thresholds are the same anyways
* for all cpus in a zone.
*/
- t = this_cpu_read(pcp->stat_threshold);
+ t = __this_cpu_read(pcp->stat_threshold);

- o = this_cpu_read(*p);
+ o = __this_cpu_read(*p);
n = delta + o;

if (n > t || n < -t) {
--
1.7.5.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/