Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: fine-tune SD_SIBLING_INIT sched: fine-tune SD_MC_INIT sched: fix memory leak in a failure path sched: fix a bug in sched domain degenerate
This commit is contained in:
@@ -99,7 +99,7 @@ void arch_update_cpu_topology(void);
|
|||||||
| SD_BALANCE_FORK \
|
| SD_BALANCE_FORK \
|
||||||
| SD_BALANCE_EXEC \
|
| SD_BALANCE_EXEC \
|
||||||
| SD_WAKE_AFFINE \
|
| SD_WAKE_AFFINE \
|
||||||
| SD_WAKE_IDLE \
|
| SD_WAKE_BALANCE \
|
||||||
| SD_SHARE_CPUPOWER, \
|
| SD_SHARE_CPUPOWER, \
|
||||||
.last_balance = jiffies, \
|
.last_balance = jiffies, \
|
||||||
.balance_interval = 1, \
|
.balance_interval = 1, \
|
||||||
@@ -120,10 +120,10 @@ void arch_update_cpu_topology(void);
|
|||||||
.wake_idx = 1, \
|
.wake_idx = 1, \
|
||||||
.forkexec_idx = 1, \
|
.forkexec_idx = 1, \
|
||||||
.flags = SD_LOAD_BALANCE \
|
.flags = SD_LOAD_BALANCE \
|
||||||
| SD_BALANCE_NEWIDLE \
|
|
||||||
| SD_BALANCE_FORK \
|
| SD_BALANCE_FORK \
|
||||||
| SD_BALANCE_EXEC \
|
| SD_BALANCE_EXEC \
|
||||||
| SD_WAKE_AFFINE \
|
| SD_WAKE_AFFINE \
|
||||||
|
| SD_WAKE_BALANCE \
|
||||||
| SD_SHARE_PKG_RESOURCES\
|
| SD_SHARE_PKG_RESOURCES\
|
||||||
| BALANCE_FOR_MC_POWER, \
|
| BALANCE_FOR_MC_POWER, \
|
||||||
.last_balance = jiffies, \
|
.last_balance = jiffies, \
|
||||||
|
@@ -6877,15 +6877,17 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
|
|||||||
struct sched_domain *tmp;
|
struct sched_domain *tmp;
|
||||||
|
|
||||||
/* Remove the sched domains which do not contribute to scheduling. */
|
/* Remove the sched domains which do not contribute to scheduling. */
|
||||||
for (tmp = sd; tmp; tmp = tmp->parent) {
|
for (tmp = sd; tmp; ) {
|
||||||
struct sched_domain *parent = tmp->parent;
|
struct sched_domain *parent = tmp->parent;
|
||||||
if (!parent)
|
if (!parent)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (sd_parent_degenerate(tmp, parent)) {
|
if (sd_parent_degenerate(tmp, parent)) {
|
||||||
tmp->parent = parent->parent;
|
tmp->parent = parent->parent;
|
||||||
if (parent->parent)
|
if (parent->parent)
|
||||||
parent->parent->child = tmp;
|
parent->parent->child = tmp;
|
||||||
}
|
} else
|
||||||
|
tmp = tmp->parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sd && sd_degenerate(sd)) {
|
if (sd && sd_degenerate(sd)) {
|
||||||
@@ -7674,6 +7676,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map,
|
|||||||
error:
|
error:
|
||||||
free_sched_groups(cpu_map, tmpmask);
|
free_sched_groups(cpu_map, tmpmask);
|
||||||
SCHED_CPUMASK_FREE((void *)allmasks);
|
SCHED_CPUMASK_FREE((void *)allmasks);
|
||||||
|
kfree(rd);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user