diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-07 12:17:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-07 12:17:46 -0500 |
commit | 55477eb49d1e56927358f90762a8a19b61c6cb53 (patch) | |
tree | ca455c90a880d7a5a25e2b6b5aece52531423556 | |
parent | 0477406961c185ef9a6d9c908b5c70ffe206833e (diff) | |
parent | 52c642f33b14bfa1b00ef2b68296effb34a573f3 (diff) |
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
-rw-r--r-- | include/linux/topology.h | 4 | ||||
-rw-r--r-- | kernel/sched.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/topology.h b/include/linux/topology.h index 34a7ee0ebed2..117f1b7405cf 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -99,7 +99,7 @@ void arch_update_cpu_topology(void); | |||
99 | | SD_BALANCE_FORK \ | 99 | | SD_BALANCE_FORK \ |
100 | | SD_BALANCE_EXEC \ | 100 | | SD_BALANCE_EXEC \ |
101 | | SD_WAKE_AFFINE \ | 101 | | SD_WAKE_AFFINE \ |
102 | | SD_WAKE_IDLE \ | 102 | | SD_WAKE_BALANCE \ |
103 | | SD_SHARE_CPUPOWER, \ | 103 | | SD_SHARE_CPUPOWER, \ |
104 | .last_balance = jiffies, \ | 104 | .last_balance = jiffies, \ |
105 | .balance_interval = 1, \ | 105 | .balance_interval = 1, \ |
@@ -120,10 +120,10 @@ void arch_update_cpu_topology(void); | |||
120 | .wake_idx = 1, \ | 120 | .wake_idx = 1, \ |
121 | .forkexec_idx = 1, \ | 121 | .forkexec_idx = 1, \ |
122 | .flags = SD_LOAD_BALANCE \ | 122 | .flags = SD_LOAD_BALANCE \ |
123 | | SD_BALANCE_NEWIDLE \ | ||
124 | | SD_BALANCE_FORK \ | 123 | | SD_BALANCE_FORK \ |
125 | | SD_BALANCE_EXEC \ | 124 | | SD_BALANCE_EXEC \ |
126 | | SD_WAKE_AFFINE \ | 125 | | SD_WAKE_AFFINE \ |
126 | | SD_WAKE_BALANCE \ | ||
127 | | SD_SHARE_PKG_RESOURCES\ | 127 | | SD_SHARE_PKG_RESOURCES\ |
128 | | BALANCE_FOR_MC_POWER, \ | 128 | | BALANCE_FOR_MC_POWER, \ |
129 | .last_balance = jiffies, \ | 129 | .last_balance = jiffies, \ |
diff --git a/kernel/sched.c b/kernel/sched.c index 82cc839c9210..57c933ffbee1 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6877,15 +6877,17 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) | |||
6877 | struct sched_domain *tmp; | 6877 | struct sched_domain *tmp; |
6878 | 6878 | ||
6879 | /* Remove the sched domains which do not contribute to scheduling. */ | 6879 | /* Remove the sched domains which do not contribute to scheduling. */ |
6880 | for (tmp = sd; tmp; tmp = tmp->parent) { | 6880 | for (tmp = sd; tmp; ) { |
6881 | struct sched_domain *parent = tmp->parent; | 6881 | struct sched_domain *parent = tmp->parent; |
6882 | if (!parent) | 6882 | if (!parent) |
6883 | break; | 6883 | break; |
6884 | |||
6884 | if (sd_parent_degenerate(tmp, parent)) { | 6885 | if (sd_parent_degenerate(tmp, parent)) { |
6885 | tmp->parent = parent->parent; | 6886 | tmp->parent = parent->parent; |
6886 | if (parent->parent) | 6887 | if (parent->parent) |
6887 | parent->parent->child = tmp; | 6888 | parent->parent->child = tmp; |
6888 | } | 6889 | } else |
6890 | tmp = tmp->parent; | ||
6889 | } | 6891 | } |
6890 | 6892 | ||
6891 | if (sd && sd_degenerate(sd)) { | 6893 | if (sd && sd_degenerate(sd)) { |
@@ -7674,6 +7676,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7674 | error: | 7676 | error: |
7675 | free_sched_groups(cpu_map, tmpmask); | 7677 | free_sched_groups(cpu_map, tmpmask); |
7676 | SCHED_CPUMASK_FREE((void *)allmasks); | 7678 | SCHED_CPUMASK_FREE((void *)allmasks); |
7679 | kfree(rd); | ||
7677 | return -ENOMEM; | 7680 | return -ENOMEM; |
7678 | #endif | 7681 | #endif |
7679 | } | 7682 | } |