All of lore.kernel.org
 help / color / mirror / Atom feed
* unit-at-a-time...
@ 2004-10-31 14:57 Paweł Sikora
  0 siblings, 0 replies; 8+ messages in thread
From: Paweł Sikora @ 2004-10-31 14:57 UTC (permalink / raw)
  To: linux-kernel

Hi,

/i386/Makefile:# Disable unit-at-a-time mode, it makes gcc use a lot morestack
/i386/Makefile:CFLAGS += $(call cc-option,-fno-unit-at-a-time)

/x86_64/Makefile:# -funit-at-a-time shrinks the kernel .text considerably
/x86_64/Makefile:CFLAGS += $(call cc-option,-funit-at-a-time)

Which solution is correct?

-- 
/* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property. */

                           #define say(x) lie(x)

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: unit-at-a-time...
@ 2004-10-31 15:41 Mikael Pettersson
  2004-10-31 16:18 ` unit-at-a-time Jan Engelhardt
  2004-10-31 19:05 ` unit-at-a-time Roland Dreier
  0 siblings, 2 replies; 8+ messages in thread
From: Mikael Pettersson @ 2004-10-31 15:41 UTC (permalink / raw)
  To: linux-kernel, pluto

On Sun, 31 Oct 2004 15:57:00 +0100, pluto@pld-linux.org wrote:
>/i386/Makefile:# Disable unit-at-a-time mode, it makes gcc use a lot morestack
>/i386/Makefile:CFLAGS += $(call cc-option,-fno-unit-at-a-time)
>
>/x86_64/Makefile:# -funit-at-a-time shrinks the kernel .text considerably
>/x86_64/Makefile:CFLAGS += $(call cc-option,-funit-at-a-time)
>
>Which solution is correct?

Disabling unit-at-a-time for i386 is definitely correct.
I've personally observed horrible runtime corruption bugs
in early 2.6 kernels when they were compiled with gcc-3.4
without the -fno-unit-at-a-time fix.

x86-64 is a different architecture. It's possible its larger
number of registers reduces spills enough that gcc's failure
to merge stack slots doesn't matter.

/Mikael

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <200410311541.i9VFf0ah023857@harpo.it.uu.se.suse.lists.linux.kernel>]
* Re: unit-at-a-time...
@ 2004-11-01 11:02 Mikael Pettersson
  2004-11-01 11:10 ` unit-at-a-time Andi Kleen
  0 siblings, 1 reply; 8+ messages in thread
From: Mikael Pettersson @ 2004-11-01 11:02 UTC (permalink / raw)
  To: ak; +Cc: linux-kernel, pluto

On 01 Nov 2004 02:39:41 +0100, Andi Kleen wrote:
>> Disabling unit-at-a-time for i386 is definitely correct.
>> I've personally observed horrible runtime corruption bugs
>> in early 2.6 kernels when they were compiled with gcc-3.4
>> without the -fno-unit-at-a-time fix.
>
>Maybe you got a buggy gcc version. The 2.6.5 based SLES9/i386
>kernel is shipping with -funit-at-a-time compiled with a 3.3-hammer
>compiler and I am not aware of any reports of stack overflow
>(and that kernel is extremly well tested) 

It happened when I added perfctr to a 2.6.5-based SuSE kernel,
and compiled the whole thing with gcc-3.4.0 (or 3.4.1, don't
remember). Perfctr normally adds a little stack usage to the
context-switch path, but gcc-3.4 made it much worse.
Disabling unit-at-a-time solved the problem.

/Mikael

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-11-01 11:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-31 14:57 unit-at-a-time Paweł Sikora
  -- strict thread matches above, loose matches on Subject: below --
2004-10-31 15:41 unit-at-a-time Mikael Pettersson
2004-10-31 16:18 ` unit-at-a-time Jan Engelhardt
2004-10-31 19:05 ` unit-at-a-time Roland Dreier
2004-10-31 21:33   ` unit-at-a-time Arjan van de Ven
     [not found] <200410311541.i9VFf0ah023857@harpo.it.uu.se.suse.lists.linux.kernel>
2004-11-01  1:39 ` unit-at-a-time Andi Kleen
2004-11-01 11:02 unit-at-a-time Mikael Pettersson
2004-11-01 11:10 ` unit-at-a-time Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.