public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: compiling linux kernels with GCC 3.0
@ 2001-10-10 11:23 Reichelt
  0 siblings, 0 replies; 19+ messages in thread
From: Reichelt @ 2001-10-10 11:23 UTC (permalink / raw)
  To: gcc

In article < http://gcc.gnu.org/ml/gcc/2001-10/msg00666.html > Linus
Torvalds writes:

> gcc-3.0.x is supposed to work fine. It's not the recommended compiler
> for "regular users", but that's not due to known problems, but simply
> due to lack of history with it. I know several developers who are
using
> current gcc snapshots for kernel compiles, and they have yet to report
> compiler trouble. (Well, I've actually gotten one report of kernel
> trouble, but that was from rth with his personal gcc sandbox, and he
> seemed to fix that ;)

gcc is having problems with the ISDN subsystem of recent kernels:
The file capi.c won't compile with 3.0.x, see PR 4298 :-(
However, you can compile it, if you use "-O1" instead of "-O2" :-)

Greetings,
Volker Reichelt


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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 17:09             ` Paolo Carlini
  2001-10-10 17:12               ` Richard Henderson
@ 2001-10-10 19:03               ` Tim Prince
  1 sibling, 0 replies; 19+ messages in thread
From: Tim Prince @ 2001-10-10 19:03 UTC (permalink / raw)
  To: pcarlini; +Cc: gcc

The partial register stalls, blocked store forwarding, et al,
penalize the P4 much more severely than the AMD processors.
Honza has corrected several of these problems in gcc-3.1, so,
although 3.0.x perform much worse than 2.95.x, performance is
more than recovered in 3.1.  I've found a few popular public
benchmarks where gcc-3.1/g77 beats all of the commercial
compilers on p4, when appropriate compiler options are chosen; of
course there are more where that is not so.  AMD may be paying
more than their share of the bill for the improvements in gcc,
but the developers have not failed to make improvements which
have more benefit for Intel processors than for AMD.
----- Original Message -----
From: "Paolo Carlini" <pcarlini@unitus.it>
To: "Richard Henderson" <rth@redhat.com>
Cc: <gcc@gcc.gnu.org>
Sent: Wednesday, October 10, 2001 5:09 PM
Subject: Re: compiling linux kernels with GCC 3.0


> Richard Henderson wrote:
>
> > >     http://gcc.gnu.org/ml/gcc/2001-09/msg00217.html
> >
> > This is actually a new bug.  It very much post-dates the
> > back end rewrite.
>
> Sure, between 3.0 and 3.0.1.
>
> However, I'm still wondering if perhaps such kind of specific
problems my
> slightly penalize Intel processors with respect to AMD ones in
both absolute and
> relative terms (Joe Buck argued for a progress from 2.95.3 to
3.0 to 3.0.1 on
> AMD). What do you believe?
>
> Thanks for introducing me to partial register stall issues!!
> Paolo Carlini.
>

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 17:09             ` Paolo Carlini
@ 2001-10-10 17:12               ` Richard Henderson
  2001-10-10 19:03               ` Tim Prince
  1 sibling, 0 replies; 19+ messages in thread
From: Richard Henderson @ 2001-10-10 17:12 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: gcc

On Thu, Oct 11, 2001 at 02:09:23AM +0200, Paolo Carlini wrote:
> What do you believe?

At the time the new backend was written, virtually all partial register
stalls were eliminated.  Obviously some have crept back in, but I doubt
the number is very high.  It would be a good thing if folks audited the
generated code for this sort of thing though.


r~

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 16:58           ` Richard Henderson
@ 2001-10-10 17:09             ` Paolo Carlini
  2001-10-10 17:12               ` Richard Henderson
  2001-10-10 19:03               ` Tim Prince
  0 siblings, 2 replies; 19+ messages in thread
From: Paolo Carlini @ 2001-10-10 17:09 UTC (permalink / raw)
  To: Richard Henderson; +Cc: gcc

Richard Henderson wrote:

> >     http://gcc.gnu.org/ml/gcc/2001-09/msg00217.html
>
> This is actually a new bug.  It very much post-dates the
> back end rewrite.

Sure, between 3.0 and 3.0.1.

However, I'm still wondering if perhaps such kind of specific problems my
slightly penalize Intel processors with respect to AMD ones in both absolute and
relative terms (Joe Buck argued for a progress from 2.95.3 to 3.0 to 3.0.1 on
AMD). What do you believe?

Thanks for introducing me to partial register stall issues!!
Paolo Carlini.

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 16:19         ` Paolo Carlini
@ 2001-10-10 16:58           ` Richard Henderson
  2001-10-10 17:09             ` Paolo Carlini
  0 siblings, 1 reply; 19+ messages in thread
From: Richard Henderson @ 2001-10-10 16:58 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Joe Buck, gcc

On Thu, Oct 11, 2001 at 01:18:33AM +0200, Paolo Carlini wrote:
> I'm asking this because recently I noticed some disappointing performance
> regressions due to partial register stalls. For instance:
> 
>     http://gcc.gnu.org/ml/gcc/2001-09/msg00217.html

This is actually a new bug.  It very much post-dates the
back end rewrite.


r~

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 15:23       ` Joe Buck
@ 2001-10-10 16:19         ` Paolo Carlini
  2001-10-10 16:58           ` Richard Henderson
  0 siblings, 1 reply; 19+ messages in thread
From: Paolo Carlini @ 2001-10-10 16:19 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

Joe Buck wrote:

> for a discussion, test conditions, caveats, etc.  To jump straight to
> the significant results:
>
> http://www.suse.de/~aj/SPEC/reference/gcc-2.95.3.SuSE/CINT2000.048.html
> http://www.suse.de/~aj/SPEC/reference/gcc-3.0/CINT2000.186.html
> http://www.suse.de/~aj/SPEC/reference/gcc-3.0.1/CINT2000.185.html
>
> The trend is right, 2.95.3 < 3.0 < 3.0.1.
>
> The test platform is an AMD Athlon 1.133Ghz box.

First, thanks for the interesting summary.
One question: do you have reasons to believe that the same (nice!) trends holds
true also for Intel cpu's?
I'm asking this because recently I noticed some disappointing performance
regressions due to partial register stalls. For instance:

    http://gcc.gnu.org/ml/gcc/2001-09/msg00217.html

Privately, Jan Hubicka explained that partial register issues are some times
very difficult to sort out on the current x86 backend.

Thanks,
Paolo.


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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 14:01     ` Paolo Carlini
  2001-10-10 14:15       ` Mark Mitchell
@ 2001-10-10 15:57       ` Joe Buck
  1 sibling, 0 replies; 19+ messages in thread
From: Joe Buck @ 2001-10-10 15:57 UTC (permalink / raw)
  To: pcarlini; +Cc: Mark Mitchell, gcc

Paolo writes:

> Is it true that there is no real evidence of performance improvements on
> x86?

No.  There is real evidence of small performance improvements for C.

> If so, *why* in your (authoritative) opinion?

Rather, why isn't there evidence of more improvement?  Because 3.0 was
a feature release for the most part; other goals took precedence.
However, 3.1 is intended to be a performance improvement; if the release
candidate is not a performance improvement over 3.0.x I will not give my
vote authorizing a release (and 3/4 of the SC have to give the goahead
for a release).  We'd be better off in that case telling people to keep
using the older releases for longer.

(That doesn't guarantee that all codes will run better or compile faster,
just that on average 3.1 needs to be better).

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 11:23     ` Linus Torvalds
  2001-10-10 15:23       ` Joe Buck
@ 2001-10-10 15:39       ` Matthew Woodcraft
  1 sibling, 0 replies; 19+ messages in thread
From: Matthew Woodcraft @ 2001-10-10 15:39 UTC (permalink / raw)
  To: gcc

On Wed, Oct 10, 2001 at 11:22:22AM -0700, Linus Torvalds wrote:

> On Wed, 10 Oct 2001, Joe Buck wrote:
> >
> > Since we've had some issues with performance regressions, but also have
> > some performance improvements especially for x86
> 
> Has this actually been verified by _anybody_?
> 
> I'm sorry to say that I have not heard of a single performance improvement
> on x86. I know, I know, it's been one of the touted features of 3.0.x, but
> I've not actually seen code that actually _runs_ faster, only code that is
> larger and slower.

I have. GNU Go runs faster. And as it's the only program I ever have to
sit around and wait for, this is a significant gain.

Compiling with -O2 -march=i686:

% ./gnugo-3.0.0-gcc2.95-march=i686 --quiet --seed 1 --benchmark 12 
Result: W+14.0           13 moves played in 95.778 seconds
     7.368 seconds/move

% ./gnugo-3.0.0-gcc3.0-march=i686 --quiet --seed 1 --benchmark 12
Result: W+14.0           13 moves played in 90.160 seconds
     6.935 seconds/move

-M-

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 11:23     ` Linus Torvalds
@ 2001-10-10 15:23       ` Joe Buck
  2001-10-10 16:19         ` Paolo Carlini
  2001-10-10 15:39       ` Matthew Woodcraft
  1 sibling, 1 reply; 19+ messages in thread
From: Joe Buck @ 2001-10-10 15:23 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Joe Buck, apl, gcc

I wrote:
> > Since we've had some issues with performance regressions, but also have
> > some performance improvements especially for x86

Linus writes:
> Has this actually been verified by _anybody_?

Yes, but the net performance improvements seem to be slight.  See
Andreas Jaeger's SPECint 2000 runs.  See

http:/www.suse.de/~aj/SPEC/

for a discussion, test conditions, caveats, etc.  To jump straight to
the significant results:

http://www.suse.de/~aj/SPEC/reference/gcc-2.95.3.SuSE/CINT2000.048.html
http://www.suse.de/~aj/SPEC/reference/gcc-3.0/CINT2000.186.html
http://www.suse.de/~aj/SPEC/reference/gcc-3.0.1/CINT2000.185.html

The trend is right, 2.95.3 < 3.0 < 3.0.1.

The test platform is an AMD Athlon 1.133Ghz box.

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 14:15       ` Mark Mitchell
@ 2001-10-10 14:54         ` Paolo Carlini
  0 siblings, 0 replies; 19+ messages in thread
From: Paolo Carlini @ 2001-10-10 14:54 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: gcc

Mark Mitchell wrote:

> > Is it true that there is no real evidence of performance improvements on
> > x86? If so, *why* in your (authoritative) opinion?
>
> I am not an expert on these issues.  I am the Release Manager, not the
> all-knowing mastermind of GCC. :-)

:-)

> I have heard reports of improvements, I have heard reports of
> pessimizations.  I do not have authoritative information one way or
> the other.

So, *who* has it?

The GCC project is proud of his regression testsuite. On the other hand I see
that there is an increasing attention to the reference benchmarks (e.g., Diego
Novillo and Andreas Jaeger running SPEC95 and SPEC2000).

Do you believe that a form of regression *performance* testing could be viable?

> We have to make tradeoffs between features and optimizations.
>
> GCC 3.0 was primarily a feature release; I hope that 3.1 will focus
> more on optimizations.

Of course. But perhaps that was not so clear reading the 3.0 highlights?

  - Support for Java, including the GNU implementation of the Java
    run-time library.

  - A new x86 back-end, which generates faster code.

  - A more efficient, more standards-compliant C++ compiler,
    using an industry standard C++ ABI.

  - A new, standards-conformant, implementation of the C++ standard
    library.

  - Improved optimizations.

  - Improved documentation.


Anyway, thanks for your attention and for your work, of course,
Paolo Carlini.


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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 14:01     ` Paolo Carlini
@ 2001-10-10 14:15       ` Mark Mitchell
  2001-10-10 14:54         ` Paolo Carlini
  2001-10-10 15:57       ` Joe Buck
  1 sibling, 1 reply; 19+ messages in thread
From: Mark Mitchell @ 2001-10-10 14:15 UTC (permalink / raw)
  To: pcarlini; +Cc: gcc

> Is it true that there is no real evidence of performance improvements on
> x86? If so, *why* in your (authoritative) opinion?

I am not an expert on these issues.  I am the Release Manager, not the
all-knowing mastermind of GCC. :-)

I have heard reports of improvements, I have heard reports of
pessimizations.  I do not have authoritative information one way or
the other.

We have to make tradeoffs between features and optimizations.

GCC 3.0 was primarily a feature release; I hope that 3.1 will focus
more on optimizations.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 11:40   ` Mark Mitchell
@ 2001-10-10 14:01     ` Paolo Carlini
  2001-10-10 14:15       ` Mark Mitchell
  2001-10-10 15:57       ` Joe Buck
  0 siblings, 2 replies; 19+ messages in thread
From: Paolo Carlini @ 2001-10-10 14:01 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: gcc

Mark Mitchell wrote:

> -I'm definitely pleased to know that the 3.0 series works with the
> Linux kernel.

C'mon Mark, reply something also to the next message from Linus!

Is it true that there is no real evidence of performance improvements on x86? If
so, *why* in your (authoritative) opinion?

Thanks,
Paolo.


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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10  9:26 ` Linus Torvalds
  2001-10-10 11:09   ` Joe Buck
@ 2001-10-10 11:40   ` Mark Mitchell
  2001-10-10 14:01     ` Paolo Carlini
  1 sibling, 1 reply; 19+ messages in thread
From: Mark Mitchell @ 2001-10-10 11:40 UTC (permalink / raw)
  To: Linus Torvalds, apl, gcc

--On Wednesday, October 10, 2001 09:25:18 AM -0700 Linus Torvalds 
<torvalds@transmeta.com> wrote:

> In article < p04330101b7e9f054094c@[192.168.1.254] > you write:
>> Like one of our former presidents, I've been "out of the loop" on this.
>>
>> Is it still the case that standard 3.0.x compilers are unable to compile
>> current linux kernels due to mismatched expectations on optimizations?
>
> gcc-3.0.x is supposed to work fine. It's not the recommended compiler
> for "regular users", but that's not due to known problems, but simply
> due to lack of history with it.

By the way, I support this mode of thinking.  Ideally, our releases of
GCC would be perfect, but we know they are not -- a "go slow" approach
of updating to new compilers is nothing more than prudent.  (I do the
same with the new kernel versions. :-))

I'm definitely pleased to know that the 3.0 series works with the
Linux kernel.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10 11:09   ` Joe Buck
@ 2001-10-10 11:23     ` Linus Torvalds
  2001-10-10 15:23       ` Joe Buck
  2001-10-10 15:39       ` Matthew Woodcraft
  0 siblings, 2 replies; 19+ messages in thread
From: Linus Torvalds @ 2001-10-10 11:23 UTC (permalink / raw)
  To: Joe Buck; +Cc: apl, gcc

On Wed, 10 Oct 2001, Joe Buck wrote:
>
> Since we've had some issues with performance regressions, but also have
> some performance improvements especially for x86

Has this actually been verified by _anybody_?

I'm sorry to say that I have not heard of a single performance improvement
on x86. I know, I know, it's been one of the touted features of 3.0.x, but
I've not actually seen code that actually _runs_ faster, only code that is
larger and slower.

Last I saw, spec numbers were lower too. Where are these much-told-about
improvements exactly?

		Linus

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10  9:26 ` Linus Torvalds
@ 2001-10-10 11:09   ` Joe Buck
  2001-10-10 11:23     ` Linus Torvalds
  2001-10-10 11:40   ` Mark Mitchell
  1 sibling, 1 reply; 19+ messages in thread
From: Joe Buck @ 2001-10-10 11:09 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: apl, gcc

Someone asked:
> Is it still the case that standard 3.0.x compilers are unable to compile current linux
> kernels due to mismatched expectations on optimizations?

Linus Torvalds writes:
> gcc-3.0.x is supposed to work fine. It's not the recommended compiler
> for "regular users", but that's not due to known problems, but simply
> due to lack of history with it. I know several developers who are using
> current gcc snapshots for kernel compiles, and they have yet to report
> compiler trouble.

There have been some AMD processor-specific issues.  I'm not sure if they
are all behind us now or not.

Since we've had some issues with performance regressions, but also have
some performance improvements especially for x86, it would be interesting
to see any applicable kernel performance benchmarks, to see whether
Linux compiled with gcc 3.0.x is better or worse than with gcc-2.95.x.

Has anyone done any experiments?

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10  5:37 Alan Lehotsky
  2001-10-10  7:22 ` Florian Weimer
@ 2001-10-10  9:26 ` Linus Torvalds
  2001-10-10 11:09   ` Joe Buck
  2001-10-10 11:40   ` Mark Mitchell
  1 sibling, 2 replies; 19+ messages in thread
From: Linus Torvalds @ 2001-10-10  9:26 UTC (permalink / raw)
  To: apl, gcc

In article < p04330101b7e9f054094c@[192.168.1.254] > you write:
>Like one of our former presidents, I've been "out of the loop" on this.
>
>Is it still the case that standard 3.0.x compilers are unable to compile current linux
>kernels due to mismatched expectations on optimizations?

gcc-3.0.x is supposed to work fine. It's not the recommended compiler
for "regular users", but that's not due to known problems, but simply
due to lack of history with it. I know several developers who are using
current gcc snapshots for kernel compiles, and they have yet to report
compiler trouble. (Well, I've actually gotten one report of kernel
trouble, but that was from rth with his personal gcc sandbox, and he
seemed to fix that ;)

So the only caveat is that the kind of developer who has a gcc CVS tree
tends to know what to expect, and can make something out of failures if
they happen. 

I'd love for as many people as possible to compile Linux with gcc-3.0.x,
but I also want to know about it in any potential bug-reports, in case
there is a compiler pattern.

In short: go for it.  And make a backup first, if you're one of the
careful people ;)

		Linus

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10  7:22 ` Florian Weimer
@ 2001-10-10  9:04   ` Josh McKinney
  0 siblings, 0 replies; 19+ messages in thread
From: Josh McKinney @ 2001-10-10  9:04 UTC (permalink / raw)
  To: gcc

 Alan Lehotsky <apl@alum.mit.edu> writes:
 
> > Is it still the case that standard 3.0.x compilers are unable to
> > compile current linux kernels due to mismatched expectations on
> > optimizations?

The most recent snapshot compiles great for me.  I had some problems in that
past with k6 optimizations and alignment, but now it has been working great.

Josh
-- 
Linux, the choice                | It's always darkest just before it gets
of a GNU generation       -o)    | pitch black. 
Kernel 2.4.10-ac10         /\    | 
on a i586                 _\_v   | 
                                 | 

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

* Re: compiling linux kernels with GCC 3.0
  2001-10-10  5:37 Alan Lehotsky
@ 2001-10-10  7:22 ` Florian Weimer
  2001-10-10  9:04   ` Josh McKinney
  2001-10-10  9:26 ` Linus Torvalds
  1 sibling, 1 reply; 19+ messages in thread
From: Florian Weimer @ 2001-10-10  7:22 UTC (permalink / raw)
  To: Alan Lehotsky; +Cc: gcc

Alan Lehotsky <apl@alum.mit.edu> writes:

> Is it still the case that standard 3.0.x compilers are unable to
> compile current linux kernels due to mismatched expectations on
> optimizations?

Ask the Linux kernel folks.  Their documentation tells you to use egcs
1.1.2 because GCC 2.95.x has critical bugs, and to use GCC 2.95.{2,3}
because egcs 1.1.2 has critical bugs. ;-)

However, Alan Cox has just recommended to use GCC 2.95.{3,4}.  GCC 3.x
is still not likely to work reliably reliably, but for details, you
should really ask on the Linux kernel mailing list.

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

* compiling linux kernels with GCC 3.0
@ 2001-10-10  5:37 Alan Lehotsky
  2001-10-10  7:22 ` Florian Weimer
  2001-10-10  9:26 ` Linus Torvalds
  0 siblings, 2 replies; 19+ messages in thread
From: Alan Lehotsky @ 2001-10-10  5:37 UTC (permalink / raw)
  To: gcc

Like one of our former presidents, I've been "out of the loop" on this.

Is it still the case that standard 3.0.x compilers are unable to compile current linux
kernels due to mismatched expectations on optimizations?

[Was that worded carefully enough to avoid political repercussions :-)]

-- Al Lehotsky
-- 
------------------------------------------------------------------------

		    Quality Software Management
		http://home.earthlink.net/~qsmgmt
			apl@alum.mit.edu
			(978)287-0435 Voice
			(978)808-6836 Cell
			(978)287-0436 Fax

	Software Process Improvement and Management Consulting
	     Language Design and Compiler Implementation

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

end of thread, other threads:[~2001-10-10 19:03 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-10 11:23 compiling linux kernels with GCC 3.0 Reichelt
  -- strict thread matches above, loose matches on Subject: below --
2001-10-10  5:37 Alan Lehotsky
2001-10-10  7:22 ` Florian Weimer
2001-10-10  9:04   ` Josh McKinney
2001-10-10  9:26 ` Linus Torvalds
2001-10-10 11:09   ` Joe Buck
2001-10-10 11:23     ` Linus Torvalds
2001-10-10 15:23       ` Joe Buck
2001-10-10 16:19         ` Paolo Carlini
2001-10-10 16:58           ` Richard Henderson
2001-10-10 17:09             ` Paolo Carlini
2001-10-10 17:12               ` Richard Henderson
2001-10-10 19:03               ` Tim Prince
2001-10-10 15:39       ` Matthew Woodcraft
2001-10-10 11:40   ` Mark Mitchell
2001-10-10 14:01     ` Paolo Carlini
2001-10-10 14:15       ` Mark Mitchell
2001-10-10 14:54         ` Paolo Carlini
2001-10-10 15:57       ` Joe Buck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).