Hi Steven,
  This patch applies to 23-rt11 to fix that bug you found in the git-HEAD
  merge.  I will fold this patch into my 24 series so it is fixed there.  Feel
  free to fold this into patch "#8" instead of maintaining it seperately, if
  you prefer.

--------------------------

RT: Fix a bug for properly setting the priority on rt-dequeue

We need to update the priority on task-dequeue whenever it changes, not just
if more RT tasks are pending.

Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]>
---

 kernel/sched_rt.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index f05912a..864d18a 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -85,6 +85,8 @@ static inline void inc_rt_tasks(struct task_struct *p, struct 
rq *rq)
 
 static inline void dec_rt_tasks(struct task_struct *p, struct rq *rq)
 {
+       int highest_prio = rq->rt.highest_prio;
+
        WARN_ON(!rt_task(p));
        WARN_ON(!rq->rt.rt_nr_running);
        rq->rt.rt_nr_running--;
@@ -98,13 +100,15 @@ static inline void dec_rt_tasks(struct task_struct *p, 
struct rq *rq)
                        array = &rq->rt.active;
                        rq->rt.highest_prio =
                                sched_find_first_bit(array->bitmap);
-                       cpupri_set(rq->cpu, rq->rt.highest_prio);
                } /* otherwise leave rq->highest prio alone */
        } else
                rq->rt.highest_prio = MAX_RT_PRIO;
        if (p->nr_cpus_allowed > 1)
                rq->rt.rt_nr_migratory--;
 
+       if (rq->rt.highest_prio != highest_prio)
+               cpupri_set(rq->cpu, rq->rt.highest_prio);
+
        update_rt_migration(p, rq);
 #endif /* CONFIG_SMP */
 }

-
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