Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147123
b: refs/heads/master
c: 0fb5302
h: refs/heads/master
i:
  147121: 586c836
  147119: 7c290f6
v: v3
  • Loading branch information
Pekka Enberg committed Jun 11, 2009
1 parent 5977209 commit b7fe563
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 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: 4bdddf8ff9bbb8aa7b4d7847586202bd25842c90
refs/heads/master: 0fb530291621c8b8a1b16abeeab05d9262489f71
2 changes: 1 addition & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -7795,7 +7795,7 @@ static int __init_refok init_rootdomain(struct root_domain *rd, bool bootmem)
if (!alloc_cpumask_var(&rd->rto_mask, gfp))
goto free_online;

if (cpupri_init(&rd->cpupri, false) != 0)
if (cpupri_init(&rd->cpupri, bootmem) != 0)
goto free_rto_mask;
return 0;

Expand Down
8 changes: 5 additions & 3 deletions trunk/kernel/sched_cpupri.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,20 @@ void cpupri_set(struct cpupri *cp, int cpu, int newpri)
*/
int __init_refok cpupri_init(struct cpupri *cp, bool bootmem)
{
gfp_t gfp = GFP_KERNEL;
int i;

if (bootmem)
gfp = GFP_NOWAIT;

memset(cp, 0, sizeof(*cp));

for (i = 0; i < CPUPRI_NR_PRIORITIES; i++) {
struct cpupri_vec *vec = &cp->pri_to_cpu[i];

spin_lock_init(&vec->lock);
vec->count = 0;
if (bootmem)
alloc_bootmem_cpumask_var(&vec->mask);
else if (!zalloc_cpumask_var(&vec->mask, GFP_KERNEL))
if (!zalloc_cpumask_var(&vec->mask, gfp))
goto cleanup;
}

Expand Down

0 comments on commit b7fe563

Please sign in to comment.