Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156253
b: refs/heads/master
c: 07903af
h: refs/heads/master
i:
  156251: ffa01da
v: v3
  • Loading branch information
Gregory Haskins authored and Ingo Molnar committed Aug 2, 2009
1 parent 2e9c984 commit 2b8f087
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: e414314cce7539788dd5d2c35decad11782dd858
refs/heads/master: 07903af152b0597d94e9b0030746b63c4664e787
15 changes: 14 additions & 1 deletion trunk/kernel/sched_cpupri.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,21 @@ int cpupri_find(struct cpupri *cp, struct task_struct *p,
if (cpumask_any_and(&p->cpus_allowed, vec->mask) >= nr_cpu_ids)
continue;

if (lowest_mask)
if (lowest_mask) {
cpumask_and(lowest_mask, &p->cpus_allowed, vec->mask);

/*
* We have to ensure that we have at least one bit
* still set in the array, since the map could have
* been concurrently emptied between the first and
* second reads of vec->mask. If we hit this
* condition, simply act as though we never hit this
* priority level and continue on.
*/
if (cpumask_any(lowest_mask) >= nr_cpu_ids)
continue;
}

return 1;
}

Expand Down

0 comments on commit 2b8f087

Please sign in to comment.