Why does C3 CPU downgrade in kernel 2.4.20?

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Josep » Wed, 11 Dec 2002 06:10:07



Hi all,
  I rebuilt the 2.4.20 kernel with C3 CPU and found it been downgraded to
i486.
  And I check the file, linux/arch/i386/Makefile, in both of 2.4.19 and
2.4.20 kernels.
  In 2.4.19, the CFLAGS adds "-march=i586".
  But in 2.4.20, the CFLAGS adds
"-march=i486 -malign-functions=0 -malign-jumps=0 -malign-loops=0".
  Why do this? Could anybody explain this to me?
  BTW, if I substitute"i586" for "i486" and remove other parameters in that
file under 2.4.20, is there any affection during/after rebuilding kernel?
  Any help is appreciated.
Best Regards,
             Joseph

-----------------------------------------------------------------
< Yahoo! >  www.yahoo.com.tw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Dave Jone » Wed, 11 Dec 2002 08:00:10


 > Hi all,
 >   I rebuilt the 2.4.20 kernel with C3 CPU and found it been downgraded to
 > i486.
 >   And I check the file, linux/arch/i386/Makefile, in both of 2.4.19 and
 > 2.4.20 kernels.
 >   In 2.4.19, the CFLAGS adds "-march=i586".
 >   But in 2.4.20, the CFLAGS adds
 > "-march=i486 -malign-functions=0 -malign-jumps=0 -malign-loops=0".
 >   Why do this? Could anybody explain this to me?

I believe someone (Jeff Garzik?) benchmarked gcc code generation,
and the C3 executed code scheduled for a 486 faster than it did for
-m586
I'm not sure about the alignment flags. I've been meaning to look
into that myself...

        Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Daniel Egge » Wed, 11 Dec 2002 09:30:10


Am Die, 2002-12-10 um 06.52 schrieb Dave Jones:

Quote:> I believe someone (Jeff Garzik?) benchmarked gcc code generation,
> and the C3 executed code scheduled for a 486 faster than it did for
> -m586
> I'm not sure about the alignment flags. I've been meaning to look
> into that myself...

Interesting. I have no clue about which C3 you're talking about here but
a VIA Ezra has all 686 instructions including cmov and thus optimising
for PPro works best for me.

Prolly I would have to do more benchmarking to find out about aligment
advantages.

--
Servus,
       Daniel

  signature.asc
< 1K Download
 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Dave Jone » Wed, 11 Dec 2002 09:30:12


 > Interesting. I have no clue about which C3 you're talking about here but
 > a VIA Ezra has all 686 instructions including cmov and thus optimising
 > for PPro works best for me.

Mine disagrees.


processor   : 0
vendor_id   : CentaurHauls
cpu family  : 6
model       : 8
model name  : VIA C3 Ezra
stepping    : 9
cpu MHz     : 433.362
cache size  : 64 KB
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 1
wp      : yes
flags       : fpu de tsc msr cx8 mtrr pge mmx 3dnow
bogomips    : 865.07

        Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Juan Quintel » Wed, 11 Dec 2002 14:40:14


daniel> Am Die, 2002-12-10 um 06.52 schrieb Dave Jones:

Quote:>> I believe someone (Jeff Garzik?) benchmarked gcc code generation,
>> and the C3 executed code scheduled for a 486 faster than it did for
>> -m586
>> I'm not sure about the alignment flags. I've been meaning to look
>> into that myself...

daniel> Interesting. I have no clue about which C3 you're talking about here but
daniel> a VIA Ezra has all 686 instructions including cmov and thus optimising
daniel> for PPro works best for me.

Have you tested it?

Here, we got cmov to work if the two operands are registers, if any of
the operands is in memory, it don't work.

Been there, been burned :p

Later, Juan.

--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Daniel Egge » Wed, 11 Dec 2002 17:30:11


Am Die, 2002-12-10 um 08.24 schrieb Dave Jones:

Quote:> Mine disagrees.

My bad, sorry. This conclusion came from a quick disassemble of a small
program I run on those boxes which indeed contain cmovs and I believed
that the boxes execercise the complete program but obviously not.

A quick check with a just written testprogram calculating some primes
revealed that -march=i686 -mcpu=i686 does *not* work...

--
Servus,
       Daniel

  signature.asc
< 1K Download
 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Daniel Egge » Wed, 11 Dec 2002 18:00:09


Am Die, 2002-12-10 um 13.40 schrieb Juan Quintela:

Quote:> Have you tested it?

Sort of.... :/

Quote:> Here, we got cmov to work if the two operands are registers, if any of
> the operands is in memory, it don't work.

Now *this* is really informative because it explains why my
testapplication which uses
 80488c7:       0f 43 d0                cmovae %eax,%edx
doesn't SEGILL.

Quote:> Been there, been burned :p

Me too, just this morning.

--
Servus,
       Daniel

  signature.asc
< 1K Download
 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Alan Co » Wed, 11 Dec 2002 18:30:13


Quote:> Interesting. I have no clue about which C3 you're talking about here but
> a VIA Ezra has all 686 instructions including cmov and thus optimising
> for PPro works best for me.

Well if you optimise for ppro it won't actually always work. Also the
scheduling seems to be best with 486. Remember the C3 is a single issue
risc processor.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Daniel Egge » Wed, 11 Dec 2002 22:10:11


Am Die, 2002-12-10 um 17.51 schrieb Alan Cox:

Quote:> Well if you optimise for ppro it won't actually always work.

Yeah, I had to learn earlier that it seems to support certain
kind of cmovs but certainly not all of them and some other
instructions seem also to be missing.

Quote:> Also thescheduling seems to be best with 486.
> Remember the C3 is a single issue risc processor.

Do you have pointers to some optimisation manual or whatever?
gcc currently defines the c3 as 486+mmx+3dnow however I doubt
that this model is entirely correct and as such leaves some
space for improvements.
Quote:> --
> Servus,
>        Daniel

  signature.asc
< 1K Download
 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Jeff Garzi » Wed, 11 Dec 2002 22:20:06



> Am Die, 2002-12-10 um 17.51 schrieb Alan Cox:

> > Well if you optimise for ppro it won't actually always work.

> Yeah, I had to learn earlier that it seems to support certain
> kind of cmovs but certainly not all of them and some other
> instructions seem also to be missing.

Yes.

Quote:> > Also thescheduling seems to be best with 486.
> > Remember the C3 is a single issue risc processor.

> Do you have pointers to some optimisation manual or whatever?
> gcc currently defines the c3 as 486+mmx+3dnow however I doubt
> that this model is entirely correct and as such leaves some
> space for improvements.

Definitely.  Read my email message that went along with that commit for
more details ;-)  (finding it isn't hard, it's probably one of the few
gcc-patches mails I have ever sent)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Alan Co » Wed, 11 Dec 2002 23:00:21



> Do you have pointers to some optimisation manual or whatever?
> gcc currently defines the c3 as 486+mmx+3dnow however I doubt
> that this model is entirely correct and as such leaves some
> space for improvements.

VIA are a little odd at times. A vendor that doesn't publish CPU manuals
and push optimisation data at app writers is -odd- by my standards
anyway. I've been discussing a few things with VIA recently and we'll
see what happens over time.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Denis Vlasenk » Thu, 12 Dec 2002 10:50:10



Quote:> Am Die, 2002-12-10 um 06.52 schrieb Dave Jones:
> > I believe someone (Jeff Garzik?) benchmarked gcc code generation,
> > and the C3 executed code scheduled for a 486 faster than it did for
> > -m586
> > I'm not sure about the alignment flags. I've been meaning to look
> > into that myself...

> Interesting. I have no clue about which C3 you're talking about here
> but a VIA Ezra has all 686 instructions including cmov and thus
> optimising for PPro works best for me.

> Prolly I would have to do more benchmarking to find out about
> aligment advantages.

I heard cmovs are microcoded in Centaurs.

s...l...o...w...
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Dave Jone » Thu, 12 Dec 2002 13:00:12


 > > Prolly I would have to do more benchmarking to find out about
 > > aligment advantages.
 > I heard cmovs are microcoded in Centaurs.
 > s...l...o...w...

Hardly surprising given that the chip isn't targetted at the performance
market.

        Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Denis Vlasenk » Thu, 12 Dec 2002 16:40:09




>  > > Prolly I would have to do more benchmarking to find out about
>  > > aligment advantages.

>  > I heard cmovs are microcoded in Centaurs.
>  > s...l...o...w...

> Hardly surprising given that the chip isn't targetted at the
> performance market.

*We Support 686 Instruction Set* plastered everywhere? ;)
Who cares that a single cmov take some tens of cycles...
(btw, can someone measure that? I have no C3...)


Quote:> because GCC's output is really ugly. In fact, it is
> also ugly when it generates cmov. I disassembled my
> libc and found that it subobtimizes the code at the
> point that it's far worse with cmov than without !
> (more instructions, more memory accesses, more
> registers used).

Do not try to optimize "pedal to the metal" without
actually looking at the results.
With "-march=i686" on C3 one will get:

* Non-optimal GCC code generation
* Really Slow (tm) cmovs
* Buggy code (cmov with mem operands)
  if one don't think above two are not enough ;)


Quote:> Am Die, 2002-12-10 um 06.52 schrieb Dave Jones:
> > I believe someone (Jeff Garzik?) benchmarked gcc code generation,
> > and the C3 executed code scheduled for a 486 faster than it did for
> > -m586
> > I'm not sure about the alignment flags. I've been meaning to look
> > into that myself...

> Interesting. I have no clue about which C3 you're talking about here
> but a VIA Ezra has all 686 instructions including cmov and thus
> optimising for PPro works best for me.

Such things need testing. A kernel compile would suffice I guess.
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
 
 
 

Why does C3 CPU downgrade in kernel 2.4.20?

Post by Dave Jone » Thu, 12 Dec 2002 17:00:16


 > >  > I heard cmovs are microcoded in Centaurs.
 > >  > s...l...o...w...
 > > Hardly surprising given that the chip isn't targetted at the
 > > performance market.
 > *We Support 686 Instruction Set* plastered everywhere? ;)

It's an *optional* extension to the 686 as stated in
the Intel documentation.

                Dave

--
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. Kernel 2.4.20 crashes on Nehemiah with C3 optimization

Hi, group,

for a couple of days now, I'm the proud owner of
a VIA C3 Nehemiah CPU, sitting in a Siemens D1170-
mobo, which does not recognize the C3 as such
(maybe that's an important bit of information?).
My problem now is, that a C3-opimized kernel
seems to crash on this system and reboots, a
i686-kernel runs just fine. /proc/cpuinfo correctly
identifies the chip as a Nehemiah.
Does anyone have some advice on where the problem
might be?
Oh, BTW, chipset is the i810 by intel.

TIA and regards,

Marc

2. problems with boca network card, wangtek QIC tape

3. nfs lockups with via c3 machine, 2.4.20 kernel, slackware 8.0

4. diskless root mounted nfs permission problems

5. Why cann't I find ac97_codec.o module in the 2.4.20 kernel?

6. server crashes

7. IBM x440 problems on 2.4.20 to 2.4.20-rc1-ac3

8. Mail slows waaay down

9. 2.4.20 + XFS patches + rmap15a + Ingo's 2.4.20-rc3 O(1) sched

10. NFS/UDP/IP performance - 2.4.19 v/s 2.4.20, 2.4.20-pre3

11. SCSI under 2.4.20-8 but not 2.4.20-18.9 (RH9)

12. Kernel configuration in kernel, kernel 2.4.20

13. "kernel BUG at page_alloc.c:102!" (kernel 2.4.20)