Commit 05d2b90d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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.
parent 68978ee7
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment