vmstat: Add cpu isolation awareness
Ensure vmstat updates do not run on isolated cpus.
Change-Id: I401de0b52fa6d20573187265ee56edd543b1419e
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
[rameezmustafa@codeaurora.org: Port to msm-4.9]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 604f26a..25a1f39 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1612,7 +1612,7 @@
static void vmstat_update(struct work_struct *w)
{
- if (refresh_cpu_vm_stats(true)) {
+ if (refresh_cpu_vm_stats(true) && !cpu_isolated(smp_processor_id())) {
/*
* Counters were updated so we expect more updates
* to occur in the future. Keep on running the
@@ -1696,7 +1696,8 @@
for_each_online_cpu(cpu) {
struct delayed_work *dw = &per_cpu(vmstat_work, cpu);
- if (!delayed_work_pending(dw) && need_update(cpu))
+ if (!delayed_work_pending(dw) && need_update(cpu) &&
+ !cpu_isolated(cpu))
queue_delayed_work_on(cpu, vmstat_wq, dw, 0);
}
put_online_cpus();