diff options
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r-- | kernel/sched/rt.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 858c4cc6f99b..ebaa4e619684 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c | |||
@@ -45,8 +45,8 @@ void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime) | |||
45 | 45 | ||
46 | raw_spin_lock_init(&rt_b->rt_runtime_lock); | 46 | raw_spin_lock_init(&rt_b->rt_runtime_lock); |
47 | 47 | ||
48 | hrtimer_init(&rt_b->rt_period_timer, | 48 | hrtimer_init(&rt_b->rt_period_timer, CLOCK_MONOTONIC, |
49 | CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 49 | HRTIMER_MODE_REL_HARD); |
50 | rt_b->rt_period_timer.function = sched_rt_period_timer; | 50 | rt_b->rt_period_timer.function = sched_rt_period_timer; |
51 | } | 51 | } |
52 | 52 | ||
@@ -67,7 +67,8 @@ static void start_rt_bandwidth(struct rt_bandwidth *rt_b) | |||
67 | * to update the period. | 67 | * to update the period. |
68 | */ | 68 | */ |
69 | hrtimer_forward_now(&rt_b->rt_period_timer, ns_to_ktime(0)); | 69 | hrtimer_forward_now(&rt_b->rt_period_timer, ns_to_ktime(0)); |
70 | hrtimer_start_expires(&rt_b->rt_period_timer, HRTIMER_MODE_ABS_PINNED); | 70 | hrtimer_start_expires(&rt_b->rt_period_timer, |
71 | HRTIMER_MODE_ABS_PINNED_HARD); | ||
71 | } | 72 | } |
72 | raw_spin_unlock(&rt_b->rt_runtime_lock); | 73 | raw_spin_unlock(&rt_b->rt_runtime_lock); |
73 | } | 74 | } |
@@ -2289,8 +2290,10 @@ static void watchdog(struct rq *rq, struct task_struct *p) | |||
2289 | } | 2290 | } |
2290 | 2291 | ||
2291 | next = DIV_ROUND_UP(min(soft, hard), USEC_PER_SEC/HZ); | 2292 | next = DIV_ROUND_UP(min(soft, hard), USEC_PER_SEC/HZ); |
2292 | if (p->rt.timeout > next) | 2293 | if (p->rt.timeout > next) { |
2293 | p->cputime_expires.sched_exp = p->se.sum_exec_runtime; | 2294 | posix_cputimers_rt_watchdog(&p->posix_cputimers, |
2295 | p->se.sum_exec_runtime); | ||
2296 | } | ||
2294 | } | 2297 | } |
2295 | } | 2298 | } |
2296 | #else | 2299 | #else |