Skip to content

Commit

Permalink
sched_rt: don't start timer when rt bandwidth disabled
Browse files Browse the repository at this point in the history
Impact: fix incorrect condition check

No need to start rt bandwidth timer when rt bandwidth is disabled.
If this timer starts, it may stop at sched_rt_period_timer() on the first time.

Signed-off-by: Hiroshi Shimamoto <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
h-shimamoto authored and Ingo Molnar committed Feb 26, 2009
1 parent 694593e commit cac64d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
{
ktime_t now;

if (rt_bandwidth_enabled() && rt_b->rt_runtime == RUNTIME_INF)
if (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF)
return;

if (hrtimer_active(&rt_b->rt_period_timer))
Expand Down

0 comments on commit cac64d0

Please sign in to comment.