Re: [2.6 patch] offer CC_OPTIMIZE_FOR_SIZE only if EXPERIMENTAL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Linus Torvalds <[email protected]>
Date: Wed, 14 Dec 2005 15:32:28 -0800 (PST)

> Of course, the really right thing would be to chase down what goes
> wrong with -Os.

It turns out to be a sparc64 bug, technically, in my case.

What happens is that with -Os gcc _INLINES_ schedule() into
wait_for_completion().  No that's not a typo, when optimizing
for space it inlines a huge function like schedule() whereas
without -Os it does not. :-/

Anyways, switch_to() in sparc64 (and sparc) does not work properly
when this happens.  schedule() needs to execute in it's own stack
frame for the stack switching in switch_to() to work.

Would anyone be against adding "noinline" to kernel/sched.c:schedule()?
I'm about to test that, but I'm extremely positive that it makes the
problem go away.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux