Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125329
b: refs/heads/master
c: 24600ce
h: refs/heads/master
i:
  125327: a989a09
v: v3
  • Loading branch information
Rusty Russell authored and Ingo Molnar committed Nov 24, 2008
1 parent 8e47442 commit a189172
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68e74568fbe5854952355e942acca51f138096d9
refs/heads/master: 24600ce89a819a8f2fb4fd69fd777218a82ade20
15 changes: 10 additions & 5 deletions trunk/kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,17 +805,20 @@ static int select_task_rq_rt(struct task_struct *p, int sync)

static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
{
cpumask_t mask;
cpumask_var_t mask;

if (rq->curr->rt.nr_cpus_allowed == 1)
return;

if (p->rt.nr_cpus_allowed != 1
&& cpupri_find(&rq->rd->cpupri, p, &mask))
if (!alloc_cpumask_var(&mask, GFP_ATOMIC))
return;

if (!cpupri_find(&rq->rd->cpupri, rq->curr, &mask))
return;
if (p->rt.nr_cpus_allowed != 1
&& cpupri_find(&rq->rd->cpupri, p, mask))
goto free;

if (!cpupri_find(&rq->rd->cpupri, rq->curr, mask))
goto free;

/*
* There appears to be other cpus that can accept
Expand All @@ -824,6 +827,8 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
*/
requeue_task_rt(rq, p, 1);
resched_task(rq->curr);
free:
free_cpumask_var(mask);
}

#endif /* CONFIG_SMP */
Expand Down

0 comments on commit a189172

Please sign in to comment.