hrtimer: Make the statistics fields smaller
authorThomas Gleixner <tglx@linutronix.de>
Tue, 14 Apr 2015 21:08:34 +0000 (21:08 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 22 Apr 2015 15:06:49 +0000 (17:06 +0200)
No point in having usigned long for /proc/timer_list statistics. Make
them unsigned int.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/20150414203500.959773467@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/hrtimer.h
kernel/time/hrtimer.c
kernel/time/timer_list.c

index 8025156c8fa113e14c551e1f291818eddc6f6e30..d39f2847754ce88f01b474777314ac3c246717b6 100644 (file)
@@ -187,10 +187,10 @@ struct hrtimer_cpu_base {
        int                             in_hrtirq;
        int                             hres_active;
        int                             hang_detected;
-       unsigned long                   nr_events;
-       unsigned long                   nr_retries;
-       unsigned long                   nr_hangs;
-       ktime_t                         max_hang_time;
+       unsigned int                    nr_events;
+       unsigned int                    nr_retries;
+       unsigned int                    nr_hangs;
+       unsigned int                    max_hang_time;
 #endif
        struct hrtimer_clock_base       clock_base[HRTIMER_MAX_CLOCK_BASES];
 };
index 73131dab787e02acf0d474a0a18c59f05a6cb881..874e0914eb3c0bbe95ce3aafc4cfddbfffff9227 100644 (file)
@@ -1327,8 +1327,8 @@ retry:
        cpu_base->hang_detected = 1;
        raw_spin_unlock(&cpu_base->lock);
        delta = ktime_sub(now, entry_time);
-       if (delta.tv64 > cpu_base->max_hang_time.tv64)
-               cpu_base->max_hang_time = delta;
+       if ((unsigned int)delta.tv64 > cpu_base->max_hang_time)
+               cpu_base->max_hang_time = (unsigned int) delta.tv64;
        /*
         * Limit it to a sensible value as we enforce a longer
         * delay. Give the CPU at least 100ms to catch up.
index bdd5e987f1154319512eb6506049726a33aa905f..6232fc53618513ae7ef3dfc19908b739f772e79d 100644 (file)
@@ -165,7 +165,7 @@ static void print_cpu(struct seq_file *m, int cpu, u64 now)
        P(nr_events);
        P(nr_retries);
        P(nr_hangs);
-       P_ns(max_hang_time);
+       P(max_hang_time);
 #endif
 #undef P
 #undef P_ns