Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / kernel / sched / rt.c
index 858c4cc6f99bccd888b4388c87c217052b33560a..ebaa4e619684112cc6c19bc6ba69fe15c3f2b52a 100644 (file)
@@ -45,8 +45,8 @@ void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime)
 
        raw_spin_lock_init(&rt_b->rt_runtime_lock);
 
-       hrtimer_init(&rt_b->rt_period_timer,
-                       CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+       hrtimer_init(&rt_b->rt_period_timer, CLOCK_MONOTONIC,
+                    HRTIMER_MODE_REL_HARD);
        rt_b->rt_period_timer.function = sched_rt_period_timer;
 }
 
@@ -67,7 +67,8 @@ static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
                 * to update the period.
                 */
                hrtimer_forward_now(&rt_b->rt_period_timer, ns_to_ktime(0));
-               hrtimer_start_expires(&rt_b->rt_period_timer, HRTIMER_MODE_ABS_PINNED);
+               hrtimer_start_expires(&rt_b->rt_period_timer,
+                                     HRTIMER_MODE_ABS_PINNED_HARD);
        }
        raw_spin_unlock(&rt_b->rt_runtime_lock);
 }
@@ -2289,8 +2290,10 @@ static void watchdog(struct rq *rq, struct task_struct *p)
                }
 
                next = DIV_ROUND_UP(min(soft, hard), USEC_PER_SEC/HZ);
-               if (p->rt.timeout > next)
-                       p->cputime_expires.sched_exp = p->se.sum_exec_runtime;
+               if (p->rt.timeout > next) {
+                       posix_cputimers_rt_watchdog(&p->posix_cputimers,
+                                                   p->se.sum_exec_runtime);
+               }
        }
 }
 #else