aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorGuillaume Chazarain <guichaz@yahoo.fr>2008-01-25 15:08:34 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-25 15:08:34 -0500
commitcc203d2422004498909c4886d1b94a2e388d973e (patch)
tree10fd9f364bda783b7354cf0e7d04ba319899c079 /kernel
parent782daeee3d596282bfee4cd9e976c86be0e194a8 (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')
-rw-r--r--kernel/sched.c6
-rw-r--r--kernel/sched_debug.c1
2 files changed, 5 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);
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 80fbbfc04290..9e5de098d471 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -179,6 +179,7 @@ static void print_cpu(struct seq_file *m, int cpu)
179 PN(prev_clock_raw); 179 PN(prev_clock_raw);
180 P(clock_warps); 180 P(clock_warps);
181 P(clock_overflows); 181 P(clock_overflows);
182 P(clock_underflows);
182 P(clock_deep_idle_events); 183 P(clock_deep_idle_events);
183 PN(clock_max_delta); 184 PN(clock_max_delta);
184 P(cpu_load[0]); 185 P(cpu_load[0]);