aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-19 02:36:00 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-19 02:36:00 -0700
commit05d2b90d5571c51ea2cbe9213164f95dce6b829d (patch)
tree232c6a8733b5ec64535b16edf17063edd0f64cd9 /kernel
parent68978ee77a87d0daa93a9089cf47cea1de0447c9 (diff)
downloadhistory-05d2b90d5571c51ea2cbe9213164f95dce6b829d.tar.gz
[PATCH] Work around gcc 3.3.3-hammer sched miscompilation on x86-64
From: Andi Kleen <ak@muc.de> The new domain scheduler got miscompiled on x86-64 with gcc 3.3.3-hammer, which is shipping with some distributions. The kernel deadlocks eventually under light stress on SMP systems with the right options. After some experiments it seems this simple change avoids the miscompilation. It also doesn't pessimize the code unduly for other architectures.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 58f87452217913..7e1f705970263f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1662,8 +1662,11 @@ static runqueue_t *find_busiest_queue(struct sched_group *group)
* tasks if there is an imbalance.
*
* Called with this_rq unlocked.
+ *
+ * This function is marked noinline to work around a compiler
+ * bug with gcc 3.3.3-hammer on x86-64.
*/
-static int load_balance(int this_cpu, runqueue_t *this_rq,
+static int noinline load_balance(int this_cpu, runqueue_t *this_rq,
struct sched_domain *sd, enum idle_type idle)
{
struct sched_group *group;