]> err.no Git - linux-2.6/commitdiff
sched: debug: update exec_clock only when SCHED_DEBUG
authorIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:06 +0000 (17:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:06 +0000 (17:00 +0200)
micro-optimization: update cfs_rq->exec_clock only if
CONFIG_SCHED_DEBUG=y.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
kernel/sched_fair.c

index 895fef74d99a7c8c8843c546be35be62996022b8..ce79eb0f06601c84e6218e4f5b5d9452f385ab11 100644 (file)
@@ -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,