[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a0db971e4eb69fc84eb3d7ef94f718b483550b4a@git.kernel.org>
Date: Thu, 22 Jun 2017 04:11:18 -0700
From: tip-bot for Frederic Weisbecker <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, peterz@...radead.org, fweisbec@...il.com,
tglx@...utronix.de, linux-kernel@...r.kernel.org, hpa@...or.com,
riel@...hat.com, torvalds@...ux-foundation.org
Subject: [tip:sched/core] nohz: Move idle balancer registration to the idle
path
Commit-ID: a0db971e4eb69fc84eb3d7ef94f718b483550b4a
Gitweb: http://git.kernel.org/tip/a0db971e4eb69fc84eb3d7ef94f718b483550b4a
Author: Frederic Weisbecker <fweisbec@...il.com>
AuthorDate: Mon, 19 Jun 2017 04:12:01 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 22 Jun 2017 11:30:01 +0200
nohz: Move idle balancer registration to the idle path
The idle load balancing registration path assumes that we only stop the
tick when the CPU is idle, ignoring the nohz full case. As a result, a
nohz full CPU that is running a task may be chosen to perform idle load
balancing.
Lets make sure that only CPUs in dynticks idle mode can be picked as
idle load balancers.
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
Acked-by: Rik van Riel <riel@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1497838322-10913-3-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/time/tick-sched.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index b1b58a0..db023e9 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -782,7 +782,6 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
* the scheduler tick in nohz_restart_sched_tick.
*/
if (!ts->tick_stopped) {
- nohz_balance_enter_idle(cpu);
calc_load_nohz_start();
cpu_load_update_nohz_start();
@@ -923,8 +922,10 @@ static void __tick_nohz_idle_enter(struct tick_sched *ts)
ts->idle_expires = expires;
}
- if (!was_stopped && ts->tick_stopped)
+ if (!was_stopped && ts->tick_stopped) {
ts->idle_jiffies = ts->last_jiffies;
+ nohz_balance_enter_idle(cpu);
+ }
}
}
Powered by blists - more mailing lists