]> err.no Git - linux-2.6/commitdiff
sched: monitor clock underflows in /proc/sched_debug
authorGuillaume Chazarain <guichaz@yahoo.fr>
Fri, 25 Jan 2008 20:08:34 +0000 (21:08 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 25 Jan 2008 20:08:34 +0000 (21:08 +0100)
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>
kernel/sched.c
kernel/sched_debug.c

index 3995d1679858d2614bb39b8a68db25866c8f54f1..4d3a5a7008662d634c33baa85b94748002bc6df6 100644 (file)
@@ -465,7 +465,7 @@ struct rq {
        u64 clock, prev_clock_raw;
        s64 clock_max_delta;
 
-       unsigned int clock_warps, clock_overflows;
+       unsigned int clock_warps, clock_overflows, clock_underflows;
        u64 idle_clock;
        unsigned int clock_deep_idle_events;
        u64 tick_timestamp;
@@ -3736,8 +3736,10 @@ void scheduler_tick(void)
        /*
         * Let rq->clock advance by at least TICK_NSEC:
         */
-       if (unlikely(rq->clock < next_tick))
+       if (unlikely(rq->clock < next_tick)) {
                rq->clock = next_tick;
+               rq->clock_underflows++;
+       }
        rq->tick_timestamp = rq->clock;
        update_cpu_load(rq);
        curr->sched_class->task_tick(rq, curr, 0);
index 80fbbfc042909fb73ab5d1c8d96f3e114baf142f..9e5de098d47129207f81f90aac51602dc1eb0d34 100644 (file)
@@ -179,6 +179,7 @@ static void print_cpu(struct seq_file *m, int cpu)
        PN(prev_clock_raw);
        P(clock_warps);
        P(clock_overflows);
+       P(clock_underflows);
        P(clock_deep_idle_events);
        PN(clock_max_delta);
        P(cpu_load[0]);