linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: GCC speed (was [PATCH] Isapnp warning)
@ 2003-06-22 20:07 John Bradford
  2003-06-22 20:27 ` Michael Buesch
  0 siblings, 1 reply; 19+ messages in thread
From: John Bradford @ 2003-06-22 20:07 UTC (permalink / raw)
  To: akpm, hps; +Cc: linux-kernel

> No, the build system is OK.  And ccache nicely fixes up any mistakes which
> the build system makes, and distcc speeds things up by 2x to 3x.
>
> None of that gets around the fact that code needs to be tested with various
> combinations of CONFIG_SMP, CONFIG_PREEMPT, different subarchitectures,
> spinlock debugging, etc, etc.  If the compiler is slow people don't bother
> doing this and the code breaks.
>
> Cause and effect.

Are the benchmarks that show gcc 3.3 to be much slower at compile time
being done with a natively compiled gcc 3.3?  I.E. gcc 3.3 compiled
with itself?

When I upgraded a few machines from 2.95.3 to 3.2.3, I noticed that
the last of the three compiles, (I.E. a gcc-3.2.3 compiled gcc-3.2.3
compiling the gcc-3.2.3 source), was noticably quicker than the first
two, to the extent that it was easily mesaurable by a wall clock.

I am just wondering whether there gcc-3.X binaries in use that were
compiled with gcc-2.95.3, that are swaying benchmarks in favour of
2.95.3 compiled with itself.

I haven't benchmarked gcc-2.95.3 compiled with gcc-3.2.3, though.

John.

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: GCC speed (was [PATCH] Isapnp warning)
@ 2003-06-23  7:40 John Bradford
  2003-06-23 13:17 ` Larry McVoy
  0 siblings, 1 reply; 19+ messages in thread
From: John Bradford @ 2003-06-23  7:40 UTC (permalink / raw)
  To: akpm, lm; +Cc: acme, alan, cw, geert, linux-kernel, perex, phillips, torvalds

> If you think 3.[23] are slow, go back and compile with 2.7.2 - it's much
> faster than the later versions.  I used to yank newer versions of gcc
> off systems and put 2.7.2 on, I think it was close to 2x faster at
> compilation and made no difference on BK performance.

Out of interest, have you tried compiling BK with tcc?

John.

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: GCC speed (was [PATCH] Isapnp warning)
@ 2003-06-22 19:03 John Bradford
  0 siblings, 0 replies; 19+ messages in thread
From: John Bradford @ 2003-06-22 19:03 UTC (permalink / raw)
  To: akpm, phillips; +Cc: acme, alan, cw, geert, linux-kernel, perex, torvalds

> No.  Compilation inefficiency directly harms programmer efficiency and the
> quality and volume of code the programmer produces.  These are surely the
> most important things by which a toolchain's usefulness should be judged.
>
> I compile with -O1 all the time and couldn't care the teeniest little bit
> about the performance of the generated code - it just doesn't matter.
>
> I'm happy allowing those thousands of people who do not compile kernels all
> the time to shake out any 3.2/3.3 compilation problems.
>
>
> Compilation inefficiency is the most serious thing wrong with gcc.

Code for hardware that almost nobody has anymore isn't easily tested
for subtle compilation errors.

The math emulation code didn't even compile for a while, and that went
unnoticed.  IFF there are substantial benefits to dropping 2.95.3
should we risk drivers for things like obscure SCSI cards being
mis-compiled and randomly corrupting data.

There _must_ be hardware that nobody has tested a gcc 3 compiled
kernel on.

All 2.5.X trees, and most 2.4.x trees have had a _lot_ of testing with
GCC 2.95.3, in a lot of different environments.  Especially in the
case of 2.4.X, a lot of that code hasn't seen significant changes in
the last year or so, and those code paths have been shown to be very
stable with gcc 2.95.3.

Eliminating gcc 2.95.3 support when a lot of people are still using
it, and having a large number of users migrate to gcc 3.3 could
uncover subtle compiler bugs a month or two later, and we'd end up
having to either live with that, or add support for gcc 2.95.3 back
in.

John.

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [PATCH] Isapnp warning
@ 2003-06-21 19:51 Andrew Morton
  2003-06-22  1:43 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew Morton @ 2003-06-21 19:51 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: alan, torvalds, perex, linux-kernel

Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> > >  int pnp_add_irq_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data)
>  > >  {
>  > > +#ifdef CONFIG_PCI
>  > >  	int i;
>  > > +#endif
>  > 
>  > This is far uglier than te warning
> 
>  It depends on your goals. These warnings distract us from the real harmful
>  warnings. Will we ever have a kernel that compiles with -Werror?

It would be nice.  But as soon as we do that, some gcc guy will have a
brainfart and we'll get a whole new batch of warnings which we cannot turn
off.  Again.  I've been involved in projects where it was unacceptable to
upgrade the gcc version for this sole reason.


Meanwhile, let's do this:

diff -puN drivers/pnp/resource.c~misc6 drivers/pnp/resource.c
--- 25/drivers/pnp/resource.c~misc6	2003-06-21 12:47:23.000000000 -0700
+++ 25-akpm/drivers/pnp/resource.c	2003-06-21 12:47:44.000000000 -0700
@@ -97,7 +97,6 @@ int pnp_get_max_depnum(struct pnp_dev *d
 
 int pnp_add_irq_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data)
 {
-	int i;
 	struct pnp_resources *res;
 	struct pnp_irq *ptr;
 	res = pnp_find_resources(dev,depnum);
@@ -113,9 +112,13 @@ int pnp_add_irq_resource(struct pnp_dev 
 	else
 		res->irq = data;
 #ifdef CONFIG_PCI
-	for (i=0; i<16; i++)
-		if (data->map & (1<<i))
-			pcibios_penalize_isa_irq(i);
+	{
+		int i;
+
+		for (i=0; i<16; i++)
+			if (data->map & (1<<i))
+				pcibios_penalize_isa_irq(i);
+	}
 #endif
 	return 0;
 }

_


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

end of thread, other threads:[~2003-07-17 10:13 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-22 20:07 GCC speed (was [PATCH] Isapnp warning) John Bradford
2003-06-22 20:27 ` Michael Buesch
  -- strict thread matches above, loose matches on Subject: below --
2003-06-23  7:40 John Bradford
2003-06-23 13:17 ` Larry McVoy
2003-06-22 19:03 John Bradford
2003-06-21 19:51 [PATCH] Isapnp warning Andrew Morton
2003-06-22  1:43 ` Arnaldo Carvalho de Melo
2003-06-22  2:17   ` Andrew Morton
2003-06-22 13:22     ` GCC speed (was [PATCH] Isapnp warning) Daniel Phillips
2003-06-22 17:32       ` Andrew Morton
2003-06-22 17:56         ` Linus Torvalds
2003-06-22 18:58         ` Henning P. Schmiedehausen
2003-06-22 19:12           ` Sam Ravnborg
2003-06-22 19:13           ` Andrew Morton
2003-06-22 19:32             ` Henning Schmiedehausen
2003-06-22 19:51           ` Adrian Bunk
2003-06-22 19:12         ` Daniel Phillips
2003-06-23  1:05         ` Larry McVoy
2002-01-04 11:32           ` Pavel Machek
2003-07-17 10:18             ` Christoph Hellwig
2003-07-17 10:23               ` Jakub Jelinek
2003-07-17 10:27                 ` Christoph Hellwig

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 NNTP newsgroup(s).