]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - kernel/sched_rt.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth
[mv-sheeva.git] / kernel / sched_rt.c
index a9d3c6bc684adcc7d68e598d878912ce6af686e2..056cbd2e2a27fea8cb15e76bfc711fe32de03303 100644 (file)
@@ -655,6 +655,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
 
        if (rt_rq->rt_time > runtime) {
                rt_rq->rt_throttled = 1;
+               printk_once(KERN_WARNING "sched: RT throttling activated\n");
                if (rt_rq_throttled(rt_rq)) {
                        sched_rt_rq_dequeue(rt_rq);
                        return 1;
@@ -1031,7 +1032,7 @@ select_task_rq_rt(struct task_struct *p, int sd_flag, int flags)
         */
        if (curr && unlikely(rt_task(curr)) &&
            (curr->rt.nr_cpus_allowed < 2 ||
-            curr->prio < p->prio) &&
+            curr->prio <= p->prio) &&
            (p->rt.nr_cpus_allowed > 1)) {
                int target = find_lowest_rq(p);
 
@@ -1179,7 +1180,7 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep);
 static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
 {
        if (!task_running(rq, p) &&
-           (cpu < 0 || cpumask_test_cpu(cpu, &p->cpus_allowed)) &&
+           (cpu < 0 || cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) &&
            (p->rt.nr_cpus_allowed > 1))
                return 1;
        return 0;
@@ -1324,7 +1325,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
                         */
                        if (unlikely(task_rq(task) != rq ||
                                     !cpumask_test_cpu(lowest_rq->cpu,
-                                                      &task->cpus_allowed) ||
+                                                      tsk_cpus_allowed(task)) ||
                                     task_running(rq, task) ||
                                     !task->on_rq)) {
 
@@ -1563,7 +1564,7 @@ static void task_woken_rt(struct rq *rq, struct task_struct *p)
            p->rt.nr_cpus_allowed > 1 &&
            rt_task(rq->curr) &&
            (rq->curr->rt.nr_cpus_allowed < 2 ||
-            rq->curr->prio < p->prio))
+            rq->curr->prio <= p->prio))
                push_rt_tasks(rq);
 }
 
@@ -1608,9 +1609,6 @@ static void set_cpus_allowed_rt(struct task_struct *p,
 
                update_rt_migration(&rq->rt);
        }
-
-       cpumask_copy(&p->cpus_allowed, new_mask);
-       p->rt.nr_cpus_allowed = weight;
 }
 
 /* Assumes rq->lock is held */