diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-07-03 08:30:13 -0500 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2015-05-08 22:30:49 +0200 |
commit | 81d5d03226e21d8171dc8158db760a89cd7d235c (patch) | |
tree | d618a4d448b3c69ee1fddce26d481f65e9bde865 /mm | |
parent | 7191cb2b9fe3d4d049401c5f31b798f00da33b3a (diff) |
mm: make vmstat -rt aware
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmstat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 4590aa42b6cd..d65d0c30a536 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -221,6 +221,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item, long x; long t; + preempt_disable_rt(); x = delta + __this_cpu_read(*p); t = __this_cpu_read(pcp->stat_threshold); @@ -230,6 +231,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item, x = 0; } __this_cpu_write(*p, x); + preempt_enable_rt(); } EXPORT_SYMBOL(__mod_zone_page_state); @@ -262,6 +264,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item) s8 __percpu *p = pcp->vm_stat_diff + item; s8 v, t; + preempt_disable_rt(); v = __this_cpu_inc_return(*p); t = __this_cpu_read(pcp->stat_threshold); if (unlikely(v > t)) { @@ -270,6 +273,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item) zone_page_state_add(v + overstep, zone, item); __this_cpu_write(*p, -overstep); } + preempt_enable_rt(); } void __inc_zone_page_state(struct page *page, enum zone_stat_item item) @@ -284,6 +288,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item) s8 __percpu *p = pcp->vm_stat_diff + item; s8 v, t; + preempt_disable_rt(); v = __this_cpu_dec_return(*p); t = __this_cpu_read(pcp->stat_threshold); if (unlikely(v < - t)) { @@ -292,6 +297,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item) zone_page_state_add(v - overstep, zone, item); __this_cpu_write(*p, overstep); } + preempt_enable_rt(); } void __dec_zone_page_state(struct page *page, enum zone_stat_item item) |