]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
sched/idle: Move quiet_vmstate() into the NOHZ code
authorPeter Zijlstra <peterz@infradead.org>
Tue, 29 Aug 2017 13:07:54 +0000 (15:07 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Oct 2017 09:43:29 +0000 (11:43 +0200)
quiet_vmstat() is an expensive function that only makes sense when we
go into NOHZ.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: aubrey.li@linux.intel.com
Cc: cl@linux.com
Cc: fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/idle.c
kernel/time/tick-sched.c

index 257f4f0b4532b0428a8ff3c72513b0a54cb0029d..b2e8f0afbb4200dbdd931c4108286e2ccb078e8c 100644 (file)
@@ -219,7 +219,6 @@ static void do_idle(void)
         */
 
        __current_set_polling();
-       quiet_vmstat();
        tick_nohz_idle_enter();
 
        while (!need_resched()) {
index c7a899c5ce643f04fcfa1bbeb9eb97c0d0984016..7b258c59d78a92dd9f819bd347e448f8670cc95b 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/irq_work.h>
 #include <linux/posix-timers.h>
 #include <linux/context_tracking.h>
+#include <linux/mm.h>
 
 #include <asm/irq_regs.h>
 
@@ -787,6 +788,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
        if (!ts->tick_stopped) {
                calc_load_nohz_start();
                cpu_load_update_nohz_start();
+               quiet_vmstat();
 
                ts->last_tick = hrtimer_get_expires(&ts->sched_timer);
                ts->tick_stopped = 1;