Also, it looks to me that active_rt_tasks[] was never modified.

Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>

---

 kernel/timer.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Index: working/kernel/timer.c
===================================================================
--- working.orig/kernel/timer.c 2007-09-04 16:46:40.000000000 +1000
+++ working/kernel/timer.c      2007-09-04 16:46:54.000000000 +1000
@@ -953,21 +953,25 @@ unsigned long avenrun_rt[3];
 static inline void calc_load(unsigned long ticks)
 {
        unsigned long active_tasks; /* fixed-point */
-       unsigned long active_rt_tasks; /* fixed-point */
        static int count = LOAD_FREQ;
+#ifdef CONFIG_PREEMPT_RT
+       unsigned long active_rt_tasks; /* fixed-point */
+#endif
 
        count -= ticks;
        if (unlikely(count < 0)) {
                active_tasks = count_active_tasks();
+#ifdef CONFIG_PREEMPT_RT
                active_rt_tasks = count_active_rt_tasks();
+#endif
                do {
                        CALC_LOAD(avenrun[0], EXP_1, active_tasks);
                        CALC_LOAD(avenrun[1], EXP_5, active_tasks);
                        CALC_LOAD(avenrun[2], EXP_15, active_tasks);
 #ifdef CONFIG_PREEMPT_RT
-                       CALC_LOAD(avenrun_rt[0], EXP_1, active_tasks);
-                       CALC_LOAD(avenrun_rt[1], EXP_5, active_tasks);
-                       CALC_LOAD(avenrun_rt[2], EXP_15, active_tasks);
+                       CALC_LOAD(avenrun_rt[0], EXP_1, active_rt_tasks);
+                       CALC_LOAD(avenrun_rt[1], EXP_5, active_rt_tasks);
+                       CALC_LOAD(avenrun_rt[2], EXP_15, active_rt_tasks);
 #endif
                        count += LOAD_FREQ;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to