diff options
author | Guillaume Chazarain <guichaz@yahoo.fr> | 2008-01-25 15:08:34 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:34 -0500 |
commit | cc203d2422004498909c4886d1b94a2e388d973e (patch) | |
tree | 10fd9f364bda783b7354cf0e7d04ba319899c079 /kernel/sched.c | |
parent | 782daeee3d596282bfee4cd9e976c86be0e194a8 (diff) |
sched: monitor clock underflows in /proc/sched_debug
We monitor clock overflows, let's also monitor clock underflows.
Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 3995d1679858..4d3a5a700866 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -465,7 +465,7 @@ struct rq { | |||
465 | u64 clock, prev_clock_raw; | 465 | u64 clock, prev_clock_raw; |
466 | s64 clock_max_delta; | 466 | s64 clock_max_delta; |
467 | 467 | ||
468 | unsigned int clock_warps, clock_overflows; | 468 | unsigned int clock_warps, clock_overflows, clock_underflows; |
469 | u64 idle_clock; | 469 | u64 idle_clock; |
470 | unsigned int clock_deep_idle_events; | 470 | unsigned int clock_deep_idle_events; |
471 | u64 tick_timestamp; | 471 | u64 tick_timestamp; |
@@ -3736,8 +3736,10 @@ void scheduler_tick(void) | |||
3736 | /* | 3736 | /* |
3737 | * Let rq->clock advance by at least TICK_NSEC: | 3737 | * Let rq->clock advance by at least TICK_NSEC: |
3738 | */ | 3738 | */ |
3739 | if (unlikely(rq->clock < next_tick)) | 3739 | if (unlikely(rq->clock < next_tick)) { |
3740 | rq->clock = next_tick; | 3740 | rq->clock = next_tick; |
3741 | rq->clock_underflows++; | ||
3742 | } | ||
3741 | rq->tick_timestamp = rq->clock; | 3743 | rq->tick_timestamp = rq->clock; |
3742 | update_cpu_load(rq); | 3744 | update_cpu_load(rq); |
3743 | curr->sched_class->task_tick(rq, curr, 0); | 3745 | curr->sched_class->task_tick(rq, curr, 0); |