Commit 9aa55fbd authored by Ingo Molnar's avatar Ingo Molnar

Merge branches 'sched/domains' and 'sched/clock' into sched/core

Merge reason: both topics are ready now, and we want to merge dependent
              changes.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
...@@ -631,7 +631,6 @@ asmlinkage void __init start_kernel(void) ...@@ -631,7 +631,6 @@ asmlinkage void __init start_kernel(void)
softirq_init(); softirq_init();
timekeeping_init(); timekeeping_init();
time_init(); time_init();
sched_clock_init();
profile_init(); profile_init();
if (!irqs_disabled()) if (!irqs_disabled())
printk(KERN_CRIT "start_kernel(): bug: interrupts were " printk(KERN_CRIT "start_kernel(): bug: interrupts were "
...@@ -682,6 +681,7 @@ asmlinkage void __init start_kernel(void) ...@@ -682,6 +681,7 @@ asmlinkage void __init start_kernel(void)
numa_policy_init(); numa_policy_init();
if (late_time_init) if (late_time_init)
late_time_init(); late_time_init();
sched_clock_init();
calibrate_delay(); calibrate_delay();
pidmap_init(); pidmap_init();
anon_vma_init(); anon_vma_init();
......
...@@ -8191,6 +8191,39 @@ struct static_sched_domain { ...@@ -8191,6 +8191,39 @@ struct static_sched_domain {
DECLARE_BITMAP(span, CONFIG_NR_CPUS); DECLARE_BITMAP(span, CONFIG_NR_CPUS);
}; };
struct s_data {
#ifdef CONFIG_NUMA
int sd_allnodes;
cpumask_var_t domainspan;
cpumask_var_t covered;
cpumask_var_t notcovered;
#endif
cpumask_var_t nodemask;
cpumask_var_t this_sibling_map;
cpumask_var_t this_core_map;
cpumask_var_t send_covered;
cpumask_var_t tmpmask;
struct sched_group **sched_group_nodes;
struct root_domain *rd;
};
enum s_alloc {
sa_sched_groups = 0,
sa_rootdomain,
sa_tmpmask,
sa_send_covered,
sa_this_core_map,
sa_this_sibling_map,
sa_nodemask,
sa_sched_group_nodes,
#ifdef CONFIG_NUMA
sa_notcovered,
sa_covered,
sa_domainspan,
#endif
sa_none,
};
/* /*
* SMT sched-domains: * SMT sched-domains:
*/ */
...@@ -8313,6 +8346,71 @@ static void init_numa_sched_groups_power(struct sched_group *group_head) ...@@ -8313,6 +8346,71 @@ static void init_numa_sched_groups_power(struct sched_group *group_head)
sg = sg->next; sg = sg->next;
} while (sg != group_head); } while (sg != group_head);
} }
static int build_numa_sched_groups(struct s_data *d,
const struct cpumask *cpu_map, int num)
{
struct sched_domain *sd;
struct sched_group *sg, *prev;
int n, j;
cpumask_clear(d->covered);
cpumask_and(d->nodemask, cpumask_of_node(num), cpu_map);
if (cpumask_empty(d->nodemask)) {
d->sched_group_nodes[num] = NULL;
goto out;
}
sched_domain_node_span(num, d->domainspan);
cpumask_and(d->domainspan, d->domainspan, cpu_map);
sg = kmalloc_node(sizeof(struct sched_group) + cpumask_size(),
GFP_KERNEL, num);
if (!sg) {
printk(KERN_WARNING "Can not alloc domain group for node %d\n",
num);
return -ENOMEM;
}
d->sched_group_nodes[num] = sg;
for_each_cpu(j, d->nodemask) {
sd = &per_cpu(node_domains, j).sd;
sd->groups = sg;
}
sg->__cpu_power = 0;
cpumask_copy(sched_group_cpus(sg), d->nodemask);
sg->next = sg;
cpumask_or(d->covered, d->covered, d->nodemask);
prev = sg;
for (j = 0; j < nr_node_ids; j++) {
n = (num + j) % nr_node_ids;
cpumask_complement(d->notcovered, d->covered);
cpumask_and(d->tmpmask, d->notcovered, cpu_map);
cpumask_and(d->tmpmask, d->tmpmask, d->domainspan);
if (cpumask_empty(d->tmpmask))
break;
cpumask_and(d->tmpmask, d->tmpmask, cpumask_of_node(n));
if (cpumask_empty(d->tmpmask))
continue;
sg = kmalloc_node(sizeof(struct sched_group) + cpumask_size(),
GFP_KERNEL, num);
if (!sg) {
printk(KERN_WARNING
"Can not alloc domain group for node %d\n", j);
return -ENOMEM;
}
sg->__cpu_power = 0;
cpumask_copy(sched_group_cpus(sg), d->tmpmask);
sg->next = prev->next;
cpumask_or(d->covered, d->covered, d->tmpmask);
prev->next = sg;
prev = sg;
}
out:
return 0;
}
#endif /* CONFIG_NUMA */ #endif /* CONFIG_NUMA */
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
...@@ -8478,280 +8576,285 @@ static void set_domain_attribute(struct sched_domain *sd, ...@@ -8478,280 +8576,285 @@ static void set_domain_attribute(struct sched_domain *sd,
} }
} }
/* static void __free_domain_allocs(struct s_data *d, enum s_alloc what,
* Build sched domains for a given set of cpus and attach the sched domains const struct cpumask *cpu_map)
* to the individual cpus {
*/ switch (what) {
static int __build_sched_domains(const struct cpumask *cpu_map, case sa_sched_groups:
struct sched_domain_attr *attr) free_sched_groups(cpu_map, d->tmpmask); /* fall through */
{ d->sched_group_nodes = NULL;
int i, err = -ENOMEM; case sa_rootdomain:
struct root_domain *rd; free_rootdomain(d->rd); /* fall through */
cpumask_var_t nodemask, this_sibling_map, this_core_map, send_covered, case sa_tmpmask:
tmpmask; free_cpumask_var(d->tmpmask); /* fall through */
case sa_send_covered:
free_cpumask_var(d->send_covered); /* fall through */
case sa_this_core_map:
free_cpumask_var(d->this_core_map); /* fall through */
case sa_this_sibling_map:
free_cpumask_var(d->this_sibling_map); /* fall through */
case sa_nodemask:
free_cpumask_var(d->nodemask); /* fall through */
case sa_sched_group_nodes:
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
cpumask_var_t domainspan, covered, notcovered; kfree(d->sched_group_nodes); /* fall through */
struct sched_group **sched_group_nodes = NULL; case sa_notcovered:
int sd_allnodes = 0; free_cpumask_var(d->notcovered); /* fall through */
case sa_covered:
if (!alloc_cpumask_var(&domainspan, GFP_KERNEL)) free_cpumask_var(d->covered); /* fall through */
goto out; case sa_domainspan:
if (!alloc_cpumask_var(&covered, GFP_KERNEL)) free_cpumask_var(d->domainspan); /* fall through */
goto free_domainspan; #endif
if (!alloc_cpumask_var(&notcovered, GFP_KERNEL)) case sa_none:
goto free_covered; break;
#endif }
}
if (!alloc_cpumask_var(&nodemask, GFP_KERNEL))
goto free_notcovered;
if (!alloc_cpumask_var(&this_sibling_map, GFP_KERNEL))
goto free_nodemask;
if (!alloc_cpumask_var(&this_core_map, GFP_KERNEL))
goto free_this_sibling_map;
if (!alloc_cpumask_var(&send_covered, GFP_KERNEL))
goto free_this_core_map;
if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL))
goto free_send_covered;
static enum s_alloc __visit_domain_allocation_hell(struct s_data *d,
const struct cpumask *cpu_map)
{
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
/* if (!alloc_cpumask_var(&d->domainspan, GFP_KERNEL))
* Allocate the per-node list of sched groups return sa_none;
*/ if (!alloc_cpumask_var(&d->covered, GFP_KERNEL))
sched_group_nodes = kcalloc(nr_node_ids, sizeof(struct sched_group *), return sa_domainspan;
GFP_KERNEL); if (!alloc_cpumask_var(&d->notcovered, GFP_KERNEL))
if (!sched_group_nodes) { return sa_covered;
/* Allocate the per-node list of sched groups */
d->sched_group_nodes = kcalloc(nr_node_ids,
sizeof(struct sched_group *), GFP_KERNEL);
if (!d->sched_group_nodes) {
printk(KERN_WARNING "Can not alloc sched group node list\n"); printk(KERN_WARNING "Can not alloc sched group node list\n");
goto free_tmpmask; return sa_notcovered;
} }
#endif sched_group_nodes_bycpu[cpumask_first(cpu_map)] = d->sched_group_nodes;
#endif
rd = alloc_rootdomain(); if (!alloc_cpumask_var(&d->nodemask, GFP_KERNEL))
if (!rd) { return sa_sched_group_nodes;
if (!alloc_cpumask_var(&d->this_sibling_map, GFP_KERNEL))
return sa_nodemask;
if (!alloc_cpumask_var(&d->this_core_map, GFP_KERNEL))
return sa_this_sibling_map;
if (!alloc_cpumask_var(&d->send_covered, GFP_KERNEL))
return sa_this_core_map;
if (!alloc_cpumask_var(&d->tmpmask, GFP_KERNEL))
return sa_send_covered;
d->rd = alloc_rootdomain();
if (!d->rd) {
printk(KERN_WARNING "Cannot alloc root domain\n"); printk(KERN_WARNING "Cannot alloc root domain\n");
goto free_sched_groups; return sa_tmpmask;
} }
return sa_rootdomain;
}
static struct sched_domain *__build_numa_sched_domains(struct s_data *d,
const struct cpumask *cpu_map, struct sched_domain_attr *attr, int i)
{
struct sched_domain *sd = NULL;
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
sched_group_nodes_bycpu[cpumask_first(cpu_map)] = sched_group_nodes; struct sched_domain *parent;
#endif
/*
* Set up domains for cpus specified by the cpu_map.
*/
for_each_cpu(i, cpu_map) {
struct sched_domain *sd = NULL, *p;
cpumask_and(nodemask, cpumask_of_node(cpu_to_node(i)), cpu_map); d->sd_allnodes = 0;
#ifdef CONFIG_NUMA
if (cpumask_weight(cpu_map) > if (cpumask_weight(cpu_map) >
SD_NODES_PER_DOMAIN*cpumask_weight(nodemask)) { SD_NODES_PER_DOMAIN * cpumask_weight(d->nodemask)) {
sd = &per_cpu(allnodes_domains, i).sd; sd = &per_cpu(allnodes_domains, i).sd;
SD_INIT(sd, ALLNODES); SD_INIT(sd, ALLNODES);
set_domain_attribute(sd, attr); set_domain_attribute(sd, attr);
cpumask_copy(sched_domain_span(sd), cpu_map); cpumask_copy(sched_domain_span(sd), cpu_map);
cpu_to_allnodes_group(i, cpu_map, &sd->groups, tmpmask); cpu_to_allnodes_group(i, cpu_map, &sd->groups, d->tmpmask);
p = sd; d->sd_allnodes = 1;
sd_allnodes = 1; }
} else parent = sd;
p = NULL;
sd = &per_cpu(node_domains, i).sd; sd = &per_cpu(node_domains, i).sd;
SD_INIT(sd, NODE); SD_INIT(sd, NODE);
set_domain_attribute(sd, attr); set_domain_attribute(sd, attr);
sched_domain_node_span(cpu_to_node(i), sched_domain_span(sd)); sched_domain_node_span(cpu_to_node(i), sched_domain_span(sd));
sd->parent = p; sd->parent = parent;
if (p) if (parent)
p->child = sd; parent->child = sd;
cpumask_and(sched_domain_span(sd), cpumask_and(sched_domain_span(sd), sched_domain_span(sd), cpu_map);
sched_domain_span(sd), cpu_map);
#endif #endif
return sd;
}
p = sd; static struct sched_domain *__build_cpu_sched_domain(struct s_data *d,
const struct cpumask *cpu_map, struct sched_domain_attr *attr,
struct sched_domain *parent, int i)
{
struct sched_domain *sd;
sd = &per_cpu(phys_domains, i).sd; sd = &per_cpu(phys_domains, i).sd;
SD_INIT(sd, CPU); SD_INIT(sd, CPU);
set_domain_attribute(sd, attr); set_domain_attribute(sd, attr);
cpumask_copy(sched_domain_span(sd), nodemask); cpumask_copy(sched_domain_span(sd), d->nodemask);
sd->parent = p; sd->parent = parent;
if (p) if (parent)
p->child = sd; parent->child = sd;
cpu_to_phys_group(i, cpu_map, &sd->groups, tmpmask); cpu_to_phys_group(i, cpu_map, &sd->groups, d->tmpmask);
return sd;
}
static struct sched_domain *__build_mc_sched_domain(struct s_data *d,
const struct cpumask *cpu_map, struct sched_domain_attr *attr,
struct sched_domain *parent, int i)
{
struct sched_domain *sd = parent;
#ifdef CONFIG_SCHED_MC #ifdef CONFIG_SCHED_MC
p = sd;
sd = &per_cpu(core_domains, i).sd; sd = &per_cpu(core_domains, i).sd;
SD_INIT(sd, MC); SD_INIT(sd, MC);
set_domain_attribute(sd, attr); set_domain_attribute(sd, attr);
cpumask_and(sched_domain_span(sd), cpu_map, cpumask_and(sched_domain_span(sd), cpu_map, cpu_coregroup_mask(i));
cpu_coregroup_mask(i)); sd->parent = parent;
sd->parent = p; parent->child = sd;
p->child = sd; cpu_to_core_group(i, cpu_map, &sd->groups, d->tmpmask);
cpu_to_core_group(i, cpu_map, &sd->groups, tmpmask);
#endif #endif
return sd;
}
static struct sched_domain *__build_smt_sched_domain(struct s_data *d,
const struct cpumask *cpu_map, struct sched_domain_attr *attr,
struct sched_domain *parent, int i)
{
struct sched_domain *sd = parent;
#ifdef CONFIG_SCHED_SMT #ifdef CONFIG_SCHED_SMT
p = sd;
sd = &per_cpu(cpu_domains, i).sd; sd = &per_cpu(cpu_domains, i).sd;
SD_INIT(sd, SIBLING); SD_INIT(sd, SIBLING);
set_domain_attribute(sd, attr); set_domain_attribute(sd, attr);
cpumask_and(sched_domain_span(sd), cpumask_and(sched_domain_span(sd), cpu_map, topology_thread_cpumask(i));
topology_thread_cpumask(i), cpu_map); sd->parent = parent;
sd->parent = p; parent->child = sd;
p->child = sd; cpu_to_cpu_group(i, cpu_map, &sd->groups, d->tmpmask);
cpu_to_cpu_group(i, cpu_map, &sd->groups, tmpmask);
#endif #endif
} return sd;
}
static void build_sched_groups(struct s_data *d, enum sched_domain_level l,
const struct cpumask *cpu_map, int cpu)
{
switch (l) {
#ifdef CONFIG_SCHED_SMT #ifdef CONFIG_SCHED_SMT
/* Set up CPU (sibling) groups */ case SD_LV_SIBLING: /* set up CPU (sibling) groups */
for_each_cpu(i, cpu_map) { cpumask_and(d->this_sibling_map, cpu_map,
cpumask_and(this_sibling_map, topology_thread_cpumask(cpu));
topology_thread_cpumask(i), cpu_map); if (cpu == cpumask_first(d->this_sibling_map))
if (i != cpumask_first(this_sibling_map)) init_sched_build_groups(d->this_sibling_map, cpu_map,
continue;
init_sched_build_groups(this_sibling_map, cpu_map,
&cpu_to_cpu_group, &cpu_to_cpu_group,
send_covered, tmpmask); d->send_covered, d->tmpmask);
} break;
#endif #endif
#ifdef CONFIG_SCHED_MC #ifdef CONFIG_SCHED_MC
/* Set up multi-core groups */ case SD_LV_MC: /* set up multi-core groups */
for_each_cpu(i, cpu_map) { cpumask_and(d->this_core_map, cpu_map, cpu_coregroup_mask(cpu));
cpumask_and(this_core_map, cpu_coregroup_mask(i), cpu_map); if (cpu == cpumask_first(d->this_core_map))
if (i != cpumask_first(this_core_map)) init_sched_build_groups(d->this_core_map, cpu_map,
continue;
init_sched_build_groups(this_core_map, cpu_map,
&cpu_to_core_group, &cpu_to_core_group,
send_covered, tmpmask); d->send_covered, d->tmpmask);
} break;
#endif #endif
case SD_LV_CPU: /* set up physical groups */
/* Set up physical groups */ cpumask_and(d->nodemask, cpumask_of_node(cpu), cpu_map);
for (i = 0; i < nr_node_ids; i++) { if (!cpumask_empty(d->nodemask))
cpumask_and(nodemask, cpumask_of_node(i), cpu_map); init_sched_build_groups(d->nodemask, cpu_map,
if (cpumask_empty(nodemask))
continue;
init_sched_build_groups(nodemask, cpu_map,
&cpu_to_phys_group, &cpu_to_phys_group,
send_covered, tmpmask); d->send_covered, d->tmpmask);
} break;
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
/* Set up node groups */ case SD_LV_ALLNODES:
if (sd_allnodes) { init_sched_build_groups(cpu_map, cpu_map, &cpu_to_allnodes_group,
init_sched_build_groups(cpu_map, cpu_map, d->send_covered, d->tmpmask);
&cpu_to_allnodes_group, break;
send_covered, tmpmask); #endif
default:
break;
} }
}
for (i = 0; i < nr_node_ids; i++) { /*
/* Set up node groups */ * Build sched domains for a given set of cpus and attach the sched domains
struct sched_group *sg, *prev; * to the individual cpus
int j; */
static int __build_sched_domains(const struct cpumask *cpu_map,
struct sched_domain_attr *attr)
{
enum s_alloc alloc_state = sa_none;
struct s_data d;
struct sched_domain *sd;
int i;
#ifdef CONFIG_NUMA
d.sd_allnodes = 0;
#endif
cpumask_clear(covered); alloc_state = __visit_domain_allocation_hell(&d, cpu_map);
cpumask_and(nodemask, cpumask_of_node(i), cpu_map); if (alloc_state != sa_rootdomain)
if (cpumask_empty(nodemask)) { goto error;
sched_group_nodes[i] = NULL; alloc_state = sa_sched_groups;
continue;
}
sched_domain_node_span(i, domainspan); /*
cpumask_and(domainspan, domainspan, cpu_map); * Set up domains for cpus specified by the cpu_map.
*/
for_each_cpu(i, cpu_map) {
cpumask_and(d.nodemask, cpumask_of_node(cpu_to_node(i)),
cpu_map);
sg = kmalloc_node(sizeof(struct sched_group) + cpumask_size(), sd = __build_numa_sched_domains(&d, cpu_map, attr, i);
GFP_KERNEL, i); sd = __build_cpu_sched_domain(&d, cpu_map, attr, sd, i);
if (!sg) { sd = __build_mc_sched_domain(&d, cpu_map, attr, sd, i);
printk(KERN_WARNING "Can not alloc domain group for " sd = __build_smt_sched_domain(&d, cpu_map, attr, sd, i);
"node %d\n", i);
goto error;
} }
sched_group_nodes[i] = sg;
for_each_cpu(j, nodemask) {
struct sched_domain *sd;
sd = &per_cpu(node_domains, j).sd; for_each_cpu(i, cpu_map) {
sd->groups = sg; build_sched_groups(&d, SD_LV_SIBLING, cpu_map, i);
build_sched_groups(&d, SD_LV_MC, cpu_map, i);
} }
sg->__cpu_power = 0;
cpumask_copy(sched_group_cpus(sg), nodemask);
sg->next = sg;
cpumask_or(covered, covered, nodemask);
prev = sg;
for (j = 0; j < nr_node_ids; j++) {
int n = (i + j) % nr_node_ids;
cpumask_complement(notcovered, covered); /* Set up physical groups */
cpumask_and(tmpmask, notcovered, cpu_map); for (i = 0; i < nr_node_ids; i++)
cpumask_and(tmpmask, tmpmask, domainspan); build_sched_groups(&d, SD_LV_CPU, cpu_map, i);
if (cpumask_empty(tmpmask))
break;
cpumask_and(tmpmask, tmpmask, cpumask_of_node(n)); #ifdef CONFIG_NUMA
if (cpumask_empty(tmpmask)) /* Set up node groups */
continue; if (d.sd_allnodes)
build_sched_groups(&d, SD_LV_ALLNODES, cpu_map, 0);
sg = kmalloc_node(sizeof(struct sched_group) + for (i = 0; i < nr_node_ids; i++)
cpumask_size(), if (build_numa_sched_groups(&d, cpu_map, i))
GFP_KERNEL, i);
if (!sg) {
printk(KERN_WARNING
"Can not alloc domain group for node %d\n", j);
goto error; goto error;
}
sg->__cpu_power = 0;
cpumask_copy(sched_group_cpus(sg), tmpmask);
sg->next = prev->next;
cpumask_or(covered, covered, tmpmask);
prev->next = sg;
prev = sg;
}
}
#endif #endif
/* Calculate CPU power for physical packages and nodes */ /* Calculate CPU power for physical packages and nodes */
#ifdef CONFIG_SCHED_SMT #ifdef CONFIG_SCHED_SMT
for_each_cpu(i, cpu_map) { for_each_cpu(i, cpu_map) {
struct sched_domain *sd = &per_cpu(cpu_domains, i).sd; sd = &per_cpu(cpu_domains, i).sd;
init_sched_groups_power(i, sd); init_sched_groups_power(i, sd);
} }
#endif #endif
#ifdef CONFIG_SCHED_MC #ifdef CONFIG_SCHED_MC
for_each_cpu(i, cpu_map) { for_each_cpu(i, cpu_map) {
struct sched_domain *sd = &per_cpu(core_domains, i).sd; sd = &per_cpu(core_domains, i).sd;
init_sched_groups_power(i, sd); init_sched_groups_power(i, sd);
} }
#endif #endif
for_each_cpu(i, cpu_map) { for_each_cpu(i, cpu_map) {
struct sched_domain *sd = &per_cpu(phys_domains, i).sd; sd = &per_cpu(phys_domains, i).sd;
init_sched_groups_power(i, sd); init_sched_groups_power(i, sd);
} }
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
for (i = 0; i < nr_node_ids; i++) for (i = 0; i < nr_node_ids; i++)
init_numa_sched_groups_power(sched_group_nodes[i]); init_numa_sched_groups_power(d.sched_group_nodes[i]);
if (sd_allnodes) { if (d.sd_allnodes) {
struct sched_group *sg; struct sched_group *sg;
cpu_to_allnodes_group(cpumask_first(cpu_map), cpu_map, &sg, cpu_to_allnodes_group(cpumask_first(cpu_map), cpu_map, &sg,
tmpmask); d.tmpmask);
init_numa_sched_groups_power(sg); init_numa_sched_groups_power(sg);
} }
#endif #endif
/* Attach the domains */ /* Attach the domains */
for_each_cpu(i, cpu_map) { for_each_cpu(i, cpu_map) {
struct sched_domain *sd;
#ifdef CONFIG_SCHED_SMT #ifdef CONFIG_SCHED_SMT
sd = &per_cpu(cpu_domains, i).sd; sd = &per_cpu(cpu_domains, i).sd;
#elif defined(CONFIG_SCHED_MC) #elif defined(CONFIG_SCHED_MC)
...@@ -8759,44 +8862,16 @@ static int __build_sched_domains(const struct cpumask *cpu_map, ...@@ -8759,44 +8862,16 @@ static int __build_sched_domains(const struct cpumask *cpu_map,
#else #else
sd = &per_cpu(phys_domains, i).sd; sd = &per_cpu(phys_domains, i).sd;
#endif #endif
cpu_attach_domain(sd, rd, i); cpu_attach_domain(sd, d.rd, i);
} }
err = 0; d.sched_group_nodes = NULL; /* don't free this we still need it */
__free_domain_allocs(&d, sa_tmpmask, cpu_map);
free_tmpmask: return 0;
free_cpumask_var(tmpmask);
free_send_covered:
free_cpumask_var(send_covered);
free_this_core_map:
free_cpumask_var(this_core_map);
free_this_sibling_map:
free_cpumask_var(this_sibling_map);
free_nodemask:
free_cpumask_var(nodemask);
free_notcovered:
#ifdef CONFIG_NUMA
free_cpumask_var(notcovered);
free_covered:
free_cpumask_var(covered);
free_domainspan:
free_cpumask_var(domainspan);
out:
#endif
return err;
free_sched_groups:
#ifdef CONFIG_NUMA
kfree(sched_group_nodes);
#endif
goto free_tmpmask;
#ifdef CONFIG_NUMA
error: error:
free_sched_groups(cpu_map, tmpmask); __free_domain_allocs(&d, alloc_state, cpu_map);
free_rootdomain(rd); return -ENOMEM;
goto free_tmpmask;
#endif
} }
static int build_sched_domains(const struct cpumask *cpu_map) static int build_sched_domains(const struct cpumask *cpu_map)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment