From: Ingo Molnar Date: Mon, 15 Oct 2007 15:00:06 +0000 (+0200) Subject: sched: debug: update exec_clock only when SCHED_DEBUG X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a62eabc4d60980eb39fff659f168d903b55c6d7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sched: debug: update exec_clock only when SCHED_DEBUG micro-optimization: update cfs_rq->exec_clock only if CONFIG_SCHED_DEBUG=y. Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra Signed-off-by: Mike Galbraith Reviewed-by: Thomas Gleixner --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 895fef74d99a..ce79eb0f0660 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -301,7 +301,7 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr, schedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max)); curr->sum_exec_runtime += delta_exec; - cfs_rq->exec_clock += delta_exec; + schedstat_add(cfs_rq, exec_clock, delta_exec); delta_exec_weighted = delta_exec; if (unlikely(curr->load.weight != NICE_0_LOAD)) { delta_exec_weighted = calc_delta_fair(delta_exec_weighted,