diff options
| author | Olav Haugan <ohaugan@codeaurora.org> | 2016-05-29 19:37:20 -0700 |
|---|---|---|
| committer | Olav Haugan <ohaugan@codeaurora.org> | 2016-09-24 10:59:56 -0700 |
| commit | 287b1a8c1cb83f2c4bed561a2dc48b673e4eb1c9 (patch) | |
| tree | 775d05040f2bcae85eb54f105f1182eedc5ded5f /mm/vmstat.c | |
| parent | 4400ef145f2b7aac21676b25942f32fb32ed724e (diff) | |
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>
Diffstat (limited to 'mm/vmstat.c')
| -rw-r--r-- | mm/vmstat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index ca75eeecbad1..77b8eabd5446 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1390,7 +1390,7 @@ static cpumask_var_t cpu_stat_off; 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 @@ -1402,7 +1402,8 @@ static void vmstat_update(struct work_struct *w) } else { /* * We did not update any counters so the app may be in - * a mode where it does not cause counter updates. + * a mode where it does not cause counter updates or the cpu + * was isolated. * We may be uselessly running vmstat_update. * Defer the checking for differentials to the * shepherd thread on a different processor. @@ -1469,7 +1470,7 @@ static void vmstat_shepherd(struct work_struct *w) get_online_cpus(); /* Check processors whose vmstat worker threads have been disabled */ for_each_cpu(cpu, cpu_stat_off) - if (need_update(cpu) && + if (!cpu_isolated(cpu) && need_update(cpu) && cpumask_test_and_clear_cpu(cpu, cpu_stat_off)) queue_delayed_work_on(cpu, vmstat_wq, |
