aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-08-02 11:41:40 -0400
committerIngo Molnar <mingo@elte.hu>2007-08-02 11:41:40 -0400
commit8179ca23d513717cc5e3dc81a1ffe01af0955468 (patch)
tree9b0912c0e7a7e57b1804a0f68c463a2e05bfb88c /kernel/sched_fair.c
parentc3c7011969274768818842b0a08ec45d88f45b4f (diff)
[PATCH] sched: use schedstat_set() API
make use of the new schedstat_set() API to eliminate two #ifdef sections. No functional changes: text data bss dec hex filename 29009 4122 28 33159 8187 sched.o.before 29009 4122 28 33159 8187 sched.o.after Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 243da6cae71c..5bf7285ad02c 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -292,10 +292,7 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr, u64 now)
292 return; 292 return;
293 293
294 delta_exec = curr->delta_exec; 294 delta_exec = curr->delta_exec;
295#ifdef CONFIG_SCHEDSTATS 295 schedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max));
296 if (unlikely(delta_exec > curr->exec_max))
297 curr->exec_max = delta_exec;
298#endif
299 296
300 curr->sum_exec_runtime += delta_exec; 297 curr->sum_exec_runtime += delta_exec;
301 cfs_rq->exec_clock += delta_exec; 298 cfs_rq->exec_clock += delta_exec;
@@ -425,13 +422,7 @@ __update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se, u64 now)
425{ 422{
426 unsigned long delta_fair = se->delta_fair_run; 423 unsigned long delta_fair = se->delta_fair_run;
427 424
428#ifdef CONFIG_SCHEDSTATS 425 schedstat_set(se->wait_max, max(se->wait_max, now - se->wait_start));
429 {
430 s64 delta_wait = now - se->wait_start;
431 if (unlikely(delta_wait > se->wait_max))
432 se->wait_max = delta_wait;
433 }
434#endif
435 426
436 if (unlikely(se->load.weight != NICE_0_LOAD)) 427 if (unlikely(se->load.weight != NICE_0_LOAD))
437 delta_fair = calc_weighted(delta_fair, se->load.weight, 428 delta_fair = calc_weighted(delta_fair, se->load.weight,