git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
padata: Use a timer to handle remaining objects in the reorder queues
[safe/jmp/linux-2.6]
/
kernel
/
sched_cpupri.c
diff --git
a/kernel/sched_cpupri.c
b/kernel/sched_cpupri.c
index
0f052fc
..
e6871cb
100644
(file)
--- a/
kernel/sched_cpupri.c
+++ b/
kernel/sched_cpupri.c
@@
-27,6
+27,7
@@
* of the License.
*/
* of the License.
*/
+#include <linux/gfp.h>
#include "sched_cpupri.h"
/* Convert between a 140 based task->prio, and our 102 based cpupri */
#include "sched_cpupri.h"
/* Convert between a 140 based task->prio, and our 102 based cpupri */
@@
-47,9
+48,7
@@
static int convert_prio(int prio)
}
#define for_each_cpupri_active(array, idx) \
}
#define for_each_cpupri_active(array, idx) \
- for (idx = find_first_bit(array, CPUPRI_NR_PRIORITIES); \
- idx < CPUPRI_NR_PRIORITIES; \
- idx = find_next_bit(array, CPUPRI_NR_PRIORITIES, idx+1))
+ for_each_set_bit(idx, array, CPUPRI_NR_PRIORITIES)
/**
* cpupri_find - find the best (lowest-pri) CPU in the system
/**
* cpupri_find - find the best (lowest-pri) CPU in the system
@@
-58,7
+57,7
@@
static int convert_prio(int prio)
* @lowest_mask: A mask to fill in with selected CPUs (or NULL)
*
* Note: This function returns the recommended CPUs as calculated during the
* @lowest_mask: A mask to fill in with selected CPUs (or NULL)
*
* Note: This function returns the recommended CPUs as calculated during the
- * current invo
k
ation. By the time the call returns, the CPUs may have in
+ * current invo
c
ation. By the time the call returns, the CPUs may have in
* fact changed priorities any number of times. While not ideal, it is not
* an issue of correctness since the normal rebalancer logic will correct
* any discrepancies created by racing against the uncertainty of the current
* fact changed priorities any number of times. While not ideal, it is not
* an issue of correctness since the normal rebalancer logic will correct
* any discrepancies created by racing against the uncertainty of the current
@@
-135,26
+134,26
@@
void cpupri_set(struct cpupri *cp, int cpu, int newpri)
if (likely(newpri != CPUPRI_INVALID)) {
struct cpupri_vec *vec = &cp->pri_to_cpu[newpri];
if (likely(newpri != CPUPRI_INVALID)) {
struct cpupri_vec *vec = &cp->pri_to_cpu[newpri];
- spin_lock_irqsave(&vec->lock, flags);
+
raw_
spin_lock_irqsave(&vec->lock, flags);
cpumask_set_cpu(cpu, vec->mask);
vec->count++;
if (vec->count == 1)
set_bit(newpri, cp->pri_active);
cpumask_set_cpu(cpu, vec->mask);
vec->count++;
if (vec->count == 1)
set_bit(newpri, cp->pri_active);
- spin_unlock_irqrestore(&vec->lock, flags);
+
raw_
spin_unlock_irqrestore(&vec->lock, flags);
}
if (likely(oldpri != CPUPRI_INVALID)) {
struct cpupri_vec *vec = &cp->pri_to_cpu[oldpri];
}
if (likely(oldpri != CPUPRI_INVALID)) {
struct cpupri_vec *vec = &cp->pri_to_cpu[oldpri];
- spin_lock_irqsave(&vec->lock, flags);
+
raw_
spin_lock_irqsave(&vec->lock, flags);
vec->count--;
if (!vec->count)
clear_bit(oldpri, cp->pri_active);
cpumask_clear_cpu(cpu, vec->mask);
vec->count--;
if (!vec->count)
clear_bit(oldpri, cp->pri_active);
cpumask_clear_cpu(cpu, vec->mask);
- spin_unlock_irqrestore(&vec->lock, flags);
+
raw_
spin_unlock_irqrestore(&vec->lock, flags);
}
*currpri = newpri;
}
*currpri = newpri;
@@
-180,7
+179,7
@@
int cpupri_init(struct cpupri *cp, bool bootmem)
for (i = 0; i < CPUPRI_NR_PRIORITIES; i++) {
struct cpupri_vec *vec = &cp->pri_to_cpu[i];
for (i = 0; i < CPUPRI_NR_PRIORITIES; i++) {
struct cpupri_vec *vec = &cp->pri_to_cpu[i];
- spin_lock_init(&vec->lock);
+
raw_
spin_lock_init(&vec->lock);
vec->count = 0;
if (!zalloc_cpumask_var(&vec->mask, gfp))
goto cleanup;
vec->count = 0;
if (!zalloc_cpumask_var(&vec->mask, gfp))
goto cleanup;