Skip to content

Commit

Permalink
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: rt-bandwidth accounting fix
  sched: fix sched_rt_rq_enqueue() resched idle
  • Loading branch information
Linus Torvalds committed Aug 28, 2008
2 parents e52c885 + cc2991c commit 0234bf1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ static inline struct rt_rq *group_rt_rq(struct sched_rt_entity *rt_se)

static inline void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
{
if (rt_rq->rt_nr_running)
resched_task(rq_of_rt_rq(rt_rq)->curr);
}

static inline void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
Expand Down Expand Up @@ -438,9 +440,6 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
{
u64 runtime = sched_rt_runtime(rt_rq);

if (runtime == RUNTIME_INF)
return 0;

if (rt_rq->rt_throttled)
return rt_rq_throttled(rt_rq);

Expand Down Expand Up @@ -491,9 +490,11 @@ static void update_curr_rt(struct rq *rq)
rt_rq = rt_rq_of_se(rt_se);

spin_lock(&rt_rq->rt_runtime_lock);
rt_rq->rt_time += delta_exec;
if (sched_rt_runtime_exceeded(rt_rq))
resched_task(curr);
if (sched_rt_runtime(rt_rq) != RUNTIME_INF) {
rt_rq->rt_time += delta_exec;
if (sched_rt_runtime_exceeded(rt_rq))
resched_task(curr);
}
spin_unlock(&rt_rq->rt_runtime_lock);
}
}
Expand Down

0 comments on commit 0234bf1

Please sign in to comment.