Skip to content

Commit 3bed5e2

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
sched/core: Add missing update_rq_clock() call for task_hot()
Add the update_rq_clock() call at the top of the callstack instead of at the bottom where we find it missing, this to aid later effort to minimize the number of update_rq_lock() calls. WARNING: CPU: 30 PID: 194 at ../kernel/sched/sched.h:797 assert_clock_updated() rq->clock_update_flags < RQCF_ACT_SKIP Call Trace: dump_stack() __warn() warn_slowpath_fmt() assert_clock_updated.isra.63.part.64() can_migrate_task() load_balance() pick_next_task_fair() __schedule() schedule() worker_thread() kthread() 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: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 80f5c1b commit 3bed5e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/sched/fair.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8070,6 +8070,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
80708070

80718071
more_balance:
80728072
raw_spin_lock_irqsave(&busiest->lock, flags);
8073+
update_rq_clock(busiest);
80738074

80748075
/*
80758076
* cur_ld_moved - load moved in current iteration
@@ -8446,6 +8447,7 @@ static int active_load_balance_cpu_stop(void *data)
84468447
};
84478448

84488449
schedstat_inc(sd->alb_count);
8450+
update_rq_clock(busiest_rq);
84498451

84508452
p = detach_one_task(&env);
84518453
if (p) {

0 commit comments

Comments
 (0)