mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
sched/core: Don't skip remote tick for idle CPUs
This will be used in the next patch to get a loadavg update from nohz cpus. The delta check is skipped because idle_sched_class doesn't update se.exec_start. Signed-off-by: Scott Wood <swood@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lkml.kernel.org/r/1578736419-14628-2-git-send-email-swood@redhat.com
This commit is contained in:
parent
afa70d941f
commit
488603b815
@ -3669,22 +3669,24 @@ static void sched_tick_remote(struct work_struct *work)
|
|||||||
* statistics and checks timeslices in a time-independent way, regardless
|
* statistics and checks timeslices in a time-independent way, regardless
|
||||||
* of when exactly it is running.
|
* of when exactly it is running.
|
||||||
*/
|
*/
|
||||||
if (idle_cpu(cpu) || !tick_nohz_tick_stopped_cpu(cpu))
|
if (!tick_nohz_tick_stopped_cpu(cpu))
|
||||||
goto out_requeue;
|
goto out_requeue;
|
||||||
|
|
||||||
rq_lock_irq(rq, &rf);
|
rq_lock_irq(rq, &rf);
|
||||||
curr = rq->curr;
|
curr = rq->curr;
|
||||||
if (is_idle_task(curr) || cpu_is_offline(cpu))
|
if (cpu_is_offline(cpu))
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|
||||||
update_rq_clock(rq);
|
update_rq_clock(rq);
|
||||||
delta = rq_clock_task(rq) - curr->se.exec_start;
|
|
||||||
|
|
||||||
/*
|
if (!is_idle_task(curr)) {
|
||||||
* Make sure the next tick runs within a reasonable
|
/*
|
||||||
* amount of time.
|
* Make sure the next tick runs within a reasonable
|
||||||
*/
|
* amount of time.
|
||||||
WARN_ON_ONCE(delta > (u64)NSEC_PER_SEC * 3);
|
*/
|
||||||
|
delta = rq_clock_task(rq) - curr->se.exec_start;
|
||||||
|
WARN_ON_ONCE(delta > (u64)NSEC_PER_SEC * 3);
|
||||||
|
}
|
||||||
curr->sched_class->task_tick(rq, curr, 0);
|
curr->sched_class->task_tick(rq, curr, 0);
|
||||||
|
|
||||||
out_unlock:
|
out_unlock:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user