aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Franco <franciscofranco.1990@gmail.com>2016-08-26 12:33:43 +0000
committerMister Oyster <oysterized@gmail.com>2017-08-31 02:44:26 +0200
commit2b5e2863df427b516416a35806852cfe5e361f9e (patch)
treed374ddcb79270333b9d2dc1bf7e168d7cc1e805b
parent74fcfbf9f0923ceb544c706757c4cd11a14eab19 (diff)
vmstat: squash 4 patches from upstream
Partial merge: https://github.com/torvalds/linux/commit/7c8e0181e6e0b8079c4c2ce902bf52d7a2c6fa5d Merge: https://github.com/torvalds/linux/commit/bb0b6dffa2ccfbd9747ad0cc87c7459622896e60 Merge: https://github.com/torvalds/linux/commit/57c2e36b6f4dd52e7e90f4c748a665b13fa228d2 Partial merge: https://github.com/torvalds/linux/commit/176bed1de5bf977938cad26551969eca8f0883b1 Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
-rw-r--r--mm/vmstat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 3aa6634dc..8755899d5 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -200,7 +200,7 @@ void set_pgdat_percpu_threshold(pg_data_t *pgdat,
continue;
threshold = (*calculate_pressure)(zone);
- for_each_possible_cpu(cpu)
+ for_each_online_cpu(cpu)
per_cpu_ptr(zone->pageset, cpu)->stat_threshold
= threshold;
}
@@ -1209,7 +1209,8 @@ int sysctl_stat_interval __read_mostly = HZ;
static void vmstat_update(struct work_struct *w)
{
refresh_cpu_vm_stats(smp_processor_id());
- schedule_delayed_work(this_cpu_ptr(&vmstat_work),
+ schedule_delayed_work_on(smp_processor_id(),
+ this_cpu_ptr(&vmstat_work),
round_jiffies_relative(sysctl_stat_interval));
}
@@ -1218,7 +1219,8 @@ static void start_cpu_timer(int cpu)
struct delayed_work *work = &per_cpu(vmstat_work, cpu);
INIT_DEFERRABLE_WORK(work, vmstat_update);
- schedule_delayed_work_on(cpu, work, __round_jiffies_relative(HZ, cpu));
+ schedule_delayed_work_on(cpu,
+ &per_cpu(vmstat_work, cpu), 0);
}
/*