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-Tag: v2.6.24-rc1~1289^2~110 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a62eabc4d60980eb39fff659f168d903b55c6d7;p=linux-2.6 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 895fef74d9..ce79eb0f06 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,