Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245556
b: refs/heads/master
c: 3bd65a8
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 11, 2011
1 parent 81b0534 commit 79b51b9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 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: 3859173d43658d51a749bc0201b943922577d39c
refs/heads/master: 3bd65a80affb9768b91f03c56dba46ee79525f9b
40 changes: 22 additions & 18 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6838,9 +6838,6 @@ struct sd_data {
};

struct s_data {
#ifdef CONFIG_NUMA
int sd_allnodes;
#endif
cpumask_var_t nodemask;
cpumask_var_t send_covered;
struct sched_domain ** __percpu sd;
Expand Down Expand Up @@ -7112,30 +7109,35 @@ static void claim_allocations(int cpu, struct sched_domain *sd)
}
}

static struct sched_domain *__build_numa_sched_domains(struct s_data *d,
const struct cpumask *cpu_map, struct sched_domain_attr *attr, int i)
static struct sched_domain *__build_allnodes_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 = NULL;
#ifdef CONFIG_NUMA
struct sched_domain *parent;

d->sd_allnodes = 0;
if (cpumask_weight(cpu_map) >
SD_NODES_PER_DOMAIN * cpumask_weight(d->nodemask)) {
sd = sd_init_ALLNODES(d, i);
set_domain_attribute(sd, attr);
cpumask_copy(sched_domain_span(sd), cpu_map);
d->sd_allnodes = 1;
}
parent = sd;
sd = sd_init_ALLNODES(d, i);
set_domain_attribute(sd, attr);
cpumask_copy(sched_domain_span(sd), cpu_map);
sd->parent = parent;
if (parent)
parent->child = sd;
#endif
return sd;
}

static struct sched_domain *__build_node_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 = NULL;
#ifdef CONFIG_NUMA
sd = sd_init_NODE(d, i);
set_domain_attribute(sd, attr);
sched_domain_node_span(cpu_to_node(i), sched_domain_span(sd));
cpumask_and(sched_domain_span(sd), sched_domain_span(sd), cpu_map);
sd->parent = parent;
if (parent)
parent->child = sd;
cpumask_and(sched_domain_span(sd), sched_domain_span(sd), cpu_map);
#endif
return sd;
}
Expand Down Expand Up @@ -7220,7 +7222,9 @@ static int build_sched_domains(const struct cpumask *cpu_map,
cpumask_and(d.nodemask, cpumask_of_node(cpu_to_node(i)),
cpu_map);

sd = __build_numa_sched_domains(&d, cpu_map, attr, i);
sd = NULL;
sd = __build_allnodes_sched_domain(&d, cpu_map, attr, sd, i);
sd = __build_node_sched_domain(&d, cpu_map, attr, sd, i);
sd = __build_cpu_sched_domain(&d, cpu_map, attr, sd, i);
sd = __build_book_sched_domain(&d, cpu_map, attr, sd, i);
sd = __build_mc_sched_domain(&d, cpu_map, attr, sd, i);
Expand Down

0 comments on commit 79b51b9

Please sign in to comment.