Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125327
b: refs/heads/master
c: 4212823
h: refs/heads/master
i:
  125325: 139ffb5
  125323: 6ac775b
  125319: 89a0a79
  125311: 187885d
v: v3
  • Loading branch information
Rusty Russell authored and Ingo Molnar committed Nov 24, 2008
1 parent 4a427c6 commit a989a09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: dcc30a35f71bcf51f1e9b336dc5e41923071509a
refs/heads/master: 4212823fb459eacc8098dd420bb68ebb9917989d
14 changes: 8 additions & 6 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -7697,10 +7697,10 @@ static struct sched_domain_attr *dattr_cur;

/*
* Special case: If a kmalloc of a doms_cur partition (array of
* cpumask_t) fails, then fallback to a single sched domain,
* as determined by the single cpumask_t fallback_doms.
* cpumask) fails, then fallback to a single sched domain,
* as determined by the single cpumask fallback_doms.
*/
static cpumask_t fallback_doms;
static cpumask_var_t fallback_doms;

void __attribute__((weak)) arch_update_cpu_topology(void)
{
Expand All @@ -7719,7 +7719,7 @@ static int arch_init_sched_domains(const cpumask_t *cpu_map)
ndoms_cur = 1;
doms_cur = kmalloc(sizeof(cpumask_t), GFP_KERNEL);
if (!doms_cur)
doms_cur = &fallback_doms;
doms_cur = fallback_doms;
cpumask_andnot(doms_cur, cpu_map, cpu_isolated_map);
dattr_cur = NULL;
err = build_sched_domains(doms_cur);
Expand Down Expand Up @@ -7818,7 +7818,7 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,

if (doms_new == NULL) {
ndoms_cur = 0;
doms_new = &fallback_doms;
doms_new = fallback_doms;
cpumask_andnot(&doms_new[0], cpu_online_mask, cpu_isolated_map);
WARN_ON_ONCE(dattr_new);
}
Expand All @@ -7838,7 +7838,7 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
}

/* Remember the new sched domains */
if (doms_cur != &fallback_doms)
if (doms_cur != fallback_doms)
kfree(doms_cur);
kfree(dattr_cur); /* kfree(NULL) is safe */
doms_cur = doms_new;
Expand Down Expand Up @@ -8011,6 +8011,8 @@ void __init sched_init_smp(void)
BUG();
sched_init_granularity();
free_cpumask_var(non_isolated_cpus);

alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
}
#else
void __init sched_init_smp(void)
Expand Down

0 comments on commit a989a09

Please sign in to comment.