sched/fair: Consider missed ticks in NOHZ_FULL in update_cpu_load_nohz()
Usually the tick can be stopped for an idle CPU in NOHZ. However in NOHZ_FULL mode, a non-idle CPU's tick can also be stopped. However, update_cpu_load_nohz() does not consider the case a non-idle CPU's tick has been stopped at all. This patch makes the update_cpu_load_nohz() know if the calling path comes from NOHZ_FULL or idle NOHZ. Signed-off-by: Byungchul Park <byungchul.park@lge.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> 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> Link: http://lkml.kernel.org/r/1447115762-19734-3-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Этот коммит содержится в:

коммит произвёл
Ingo Molnar

родитель
5954327548
Коммит
525705d15e
@@ -694,11 +694,11 @@ out:
|
||||
return tick;
|
||||
}
|
||||
|
||||
static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now)
|
||||
static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now, int active)
|
||||
{
|
||||
/* Update jiffies first */
|
||||
tick_do_update_jiffies64(now);
|
||||
update_cpu_load_nohz();
|
||||
update_cpu_load_nohz(active);
|
||||
|
||||
calc_load_exit_idle();
|
||||
touch_softlockup_watchdog();
|
||||
@@ -725,7 +725,7 @@ static void tick_nohz_full_update_tick(struct tick_sched *ts)
|
||||
if (can_stop_full_tick())
|
||||
tick_nohz_stop_sched_tick(ts, ktime_get(), cpu);
|
||||
else if (ts->tick_stopped)
|
||||
tick_nohz_restart_sched_tick(ts, ktime_get());
|
||||
tick_nohz_restart_sched_tick(ts, ktime_get(), 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -916,7 +916,7 @@ void tick_nohz_idle_exit(void)
|
||||
tick_nohz_stop_idle(ts, now);
|
||||
|
||||
if (ts->tick_stopped) {
|
||||
tick_nohz_restart_sched_tick(ts, now);
|
||||
tick_nohz_restart_sched_tick(ts, now, 0);
|
||||
tick_nohz_account_idle_ticks(ts);
|
||||
}
|
||||
|
||||
|
Ссылка в новой задаче
Block a user