sched/core: Add missing update_rq_clock() in detach_task_cfs_rq()
authorPeter Zijlstra <peterz@infradead.org>
Mon, 3 Oct 2016 14:28:37 +0000 (16:28 +0200)
committerIngo Molnar <mingo@kernel.org>
Sat, 14 Jan 2017 10:29:33 +0000 (11:29 +0100)
commit80f5c1b84baa8180c3c27b7e227429712cd967b6
treecbf3e8473185ec512864d444f9031ffbb6be2fcc
parent4126bad6717336abe5d666440ae15555563ca53f
sched/core: Add missing update_rq_clock() in detach_task_cfs_rq()

Instead of adding the update_rq_clock() all the way at the bottom of
the callstack, add one at the top, this to aid later effort to
minimize update_rq_lock() calls.

  WARNING: CPU: 0 PID: 1 at ../kernel/sched/sched.h:797 detach_task_cfs_rq()
  rq->clock_update_flags < RQCF_ACT_SKIP

  Call Trace:
    dump_stack()
    __warn()
    warn_slowpath_fmt()
    detach_task_cfs_rq()
    switched_from_fair()
    __sched_setscheduler()
    _sched_setscheduler()
    sched_set_stop_task()
    cpu_stop_create()
    __smpboot_create_thread.part.2()
    smpboot_register_percpu_thread_cpumask()
    cpu_stop_init()
    do_one_initcall()
    ? print_cpu_info()
    kernel_init_freeable()
    ? rest_init()
    kernel_init()
    ret_from_fork()

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>
kernel/sched/core.c