summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-09-05 11:33:54 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2016-09-05 11:33:54 -0400
commit1a34eb296a82d3fc9508369fde2e635454453fcb (patch)
tree43973ccecfed8a082eb61786072940d01aff5e7e
parent7ee560ca1c5d94879b51c75170a0f9f88fb53bdd (diff)
download4.8-rt-patches-1a34eb296a82d3fc9508369fde2e635454453fcb.tar.gz
mm: vmstat context refreshrt-v4.7-6197-g1c88e19b0f6a
-rw-r--r--patches/mm-make-vmstat-rt-aware.patch36
1 files changed, 20 insertions, 16 deletions
diff --git a/patches/mm-make-vmstat-rt-aware.patch b/patches/mm-make-vmstat-rt-aware.patch
index 34b5f818f923fa..5f81ab64209175 100644
--- a/patches/mm-make-vmstat-rt-aware.patch
+++ b/patches/mm-make-vmstat-rt-aware.patch
@@ -1,6 +1,8 @@
+From d2db1fffc291a47719857d6bd7b24837d2859dd6 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:30:13 -0500
-Subject: mm/vmstat: Protect per cpu variables with preempt disable on RT
+Subject: [PATCH] mm/vmstat: Protect per cpu variables with preempt disable on
+ RT
Disable preemption on -RT for the vmstat code. On vanila the code runs in
IRQ-off regions while on -RT it is not. "preempt_disable" ensures that the
@@ -9,14 +11,11 @@ same ressources is not updated in parallel due to preemption.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
----
- include/linux/vmstat.h | 4 ++++
- mm/vmstat.c | 6 ++++++
- 2 files changed, 10 insertions(+)
-
+diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
+index 613771909b6e..e28c5a43229d 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
-@@ -33,7 +33,9 @@ DECLARE_PER_CPU(struct vm_event_state, v
+@@ -33,7 +33,9 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
*/
static inline void __count_vm_event(enum vm_event_item item)
{
@@ -26,7 +25,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
static inline void count_vm_event(enum vm_event_item item)
-@@ -43,7 +45,9 @@ static inline void count_vm_event(enum v
+@@ -43,7 +45,9 @@ static inline void count_vm_event(enum vm_event_item item)
static inline void __count_vm_events(enum vm_event_item item, long delta)
{
@@ -36,9 +35,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
static inline void count_vm_events(enum vm_event_item item, long delta)
+diff --git a/mm/vmstat.c b/mm/vmstat.c
+index 89cec42d19ff..feb9eb115aaa 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
-@@ -226,6 +226,7 @@ void __mod_zone_page_state(struct zone *
+@@ -245,6 +245,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
long x;
long t;
@@ -46,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
x = delta + __this_cpu_read(*p);
t = __this_cpu_read(pcp->stat_threshold);
-@@ -235,6 +236,7 @@ void __mod_zone_page_state(struct zone *
+@@ -254,6 +255,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
x = 0;
}
__this_cpu_write(*p, x);
@@ -54,7 +55,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
EXPORT_SYMBOL(__mod_zone_page_state);
-@@ -267,6 +269,7 @@ void __inc_zone_state(struct zone *zone,
+@@ -306,6 +308,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
s8 __percpu *p = pcp->vm_stat_diff + item;
s8 v, t;
@@ -62,15 +63,15 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
v = __this_cpu_inc_return(*p);
t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v > t)) {
-@@ -275,6 +278,7 @@ void __inc_zone_state(struct zone *zone,
+@@ -314,6 +317,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)
-@@ -289,6 +293,7 @@ void __dec_zone_state(struct zone *zone,
+ void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
+@@ -350,6 +354,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
s8 __percpu *p = pcp->vm_stat_diff + item;
s8 v, t;
@@ -78,11 +79,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
v = __this_cpu_dec_return(*p);
t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v < - t)) {
-@@ -297,6 +302,7 @@ void __dec_zone_state(struct zone *zone,
+@@ -358,6 +363,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)
+ void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
+--
+2.5.0
+