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

Steven Rostedt
2011-09-19T21:27:51Z

[-- Attachment #1: 0002-mm-Switch-mod_state-to-__this_cpu_read.patch --]
[-- Type: text/plain, Size: 868 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

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@linux.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
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