Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62cb1188 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

sched/idle: Move quiet_vmstate() into the NOHZ code



quiet_vmstat() is an expensive function that only makes sense when we
go into NOHZ.

Signed-off-by: default avatarPeter 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: default avatarIngo Molnar <mingo@kernel.org>
parent 151aeab7
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -219,7 +219,6 @@ static void do_idle(void)
	 */

	__current_set_polling();
	quiet_vmstat();
	tick_nohz_idle_enter();

	while (!need_resched()) {
+2 −0
Original line number Diff line number Diff line
@@ -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;