Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245560
b: refs/heads/master
c: 4cb9883
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 11, 2011
1 parent 7549588 commit 5363211
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 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: f96225fd51893b6650cffd5427f13f6b1b356488
refs/heads/master: 4cb988395da6e16627a8be69729e50cd72ebb23e
17 changes: 5 additions & 12 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6395,6 +6395,8 @@ early_initcall(migration_init);

#ifdef CONFIG_SMP

static cpumask_var_t sched_domains_tmpmask; /* sched_domains_mutex */

#ifdef CONFIG_SCHED_DEBUG

static __read_mostly int sched_domain_debug_enabled;
Expand Down Expand Up @@ -6490,7 +6492,6 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,

static void sched_domain_debug(struct sched_domain *sd, int cpu)
{
cpumask_var_t groupmask;
int level = 0;

if (!sched_domain_debug_enabled)
Expand All @@ -6503,20 +6504,14 @@ static void sched_domain_debug(struct sched_domain *sd, int cpu)

printk(KERN_DEBUG "CPU%d attaching sched-domain:\n", cpu);

if (!alloc_cpumask_var(&groupmask, GFP_KERNEL)) {
printk(KERN_DEBUG "Cannot load-balance (out of memory)\n");
return;
}

for (;;) {
if (sched_domain_debug_one(sd, cpu, level, groupmask))
if (sched_domain_debug_one(sd, cpu, level, sched_domains_tmpmask))
break;
level++;
sd = sd->parent;
if (!sd)
break;
}
free_cpumask_var(groupmask);
}
#else /* !CONFIG_SCHED_DEBUG */
# define sched_domain_debug(sd, cpu) do { } while (0)
Expand Down Expand Up @@ -6721,7 +6716,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
sd->child = NULL;
}

/* sched_domain_debug(sd, cpu); */
sched_domain_debug(sd, cpu);

rq_attach_root(rq, rd);
tmp = rq->sd;
Expand Down Expand Up @@ -6851,8 +6846,6 @@ static int get_group(int cpu, struct sd_data *sdd, struct sched_group **sg)
return cpu;
}

static cpumask_var_t sched_domains_tmpmask; /* sched_domains_mutex */

/*
* build_sched_groups takes the cpumask we wish to span, and a pointer
* to a function which identifies what group(along with sched group) a CPU
Expand Down Expand Up @@ -7896,8 +7889,8 @@ void __init sched_init(void)

/* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
zalloc_cpumask_var(&nohz_cpu_mask, GFP_NOWAIT);
zalloc_cpumask_var(&sched_domains_tmpmask, GFP_NOWAIT);
#ifdef CONFIG_SMP
zalloc_cpumask_var(&sched_domains_tmpmask, GFP_NOWAIT);
#ifdef CONFIG_NO_HZ
zalloc_cpumask_var(&nohz.idle_cpus_mask, GFP_NOWAIT);
alloc_cpumask_var(&nohz.grp_idle_mask, GFP_NOWAIT);
Expand Down

0 comments on commit 5363211

Please sign in to comment.