Re: i386 kernel not included?

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

 



On Tue, 2002-11-05 at 19:21, Thomas Dodd wrote:
> 
> 
> Jean Francois Martinez wrote:
> > On Tue, 2002-11-05 at 17:38, Thomas Dodd wrote:
> > www.linuxgazette.com february 1999
> 
> I'll read it later.
> 
> >>What compiler? gcc-3 is supposed to have better optimization.
> >>Perhaps the numbers would be different now?
> > It was gcc 2.7.  But while gcc has changed so have the distributions: at
> > that time distros shipped only one kernel since gcc 2.7 performed very
> > little processor-specific optimizations and there was very little code
> > in the kernel directly related to processor type (the memcpy code, page
> > protection and selective invalidation of TLB entries).  Today this is no
> > longer valid but RedHat ships processor-specific kernels 
> 
> Whuch started this. They no longer ship an i386 kernel.
> Anything that won't boot/run an i586 kernel is not installable
> now.
> 

K6 runs i586 kernel without problem.  The problematic processor is the
VIA 686.  It is faster than most Pentiums but it will not run if RedHat
selected Pentium when configuring processor.  It will run fine if RedHat
selected 586.  You should look in the .config file used when rpm is
built with --target 586

> > You _could_ gain a benefit if you are still using a Pentium MMX or a K6:
> > both will get a Pentium kernel and code optimized for Pentium will suck
> > on anything else MMX included.   For the K6 I recommend hacking the
> > compiler flags and using -mcpu=i686 (NOT -march=i686) instead of
> > -march=k6 .  Gcc generates some slow code when told to optimize for the
> > K6 specially on bit operations who are frequently used in kernel. 
> 
> Is that still the case with gcc-3 and the 2.4 kernels?

The above is for gcc 3.2 and is not kernel specific: from benchmarks I
noticed that on a K6 it is generates much slower bit operations when
compiled for k6 than with -mcpu=i686.   From memory, if speed is 100
with -mcpu=i686 then you get speed 70 with -march=k6 on benchmark for
bit operations.  My guess is that the 686 optimizer has had _far_ more
work than the K6 one.

> Is that documented somwhere? I've been running custom

Nope.  This was my own research.


> built kernel, and selecting K6 in the config since it
> was added to the kernel.
> 

The right thing to do is select K6 in the config since you will get the
K6 specific ifdefs and 	assembler parts.  Then edit the
arch/i386/Makefile and replace -march=k6 by -mcpu=i686

> Why would code "optimized" for the K6 run slow on the K6?
> Why even have the -march=k6 code path if it's slow?
> 

If code optimized for 686 is faster on K6 then we can tell there is a
bug in the K6 optimizer.

> > But MMX and K6 are now quite rare.
> 
> More rare that the pre MMX Pentium?
> I have 4 machines that run linux. A 486, a K6, a K6-III,
> and a Athlon (SlotA T-bird). I have some old 68000 stuff
> too, but no linux on them.

When telling they were rare I referred to machines used for something
where performance matters: at one time I had a K6/233 whose main
activity was as a firewall on an ADSL line.  It obviously spent most of
the day boring to death so why bother to optimize?.  In fact I ended
downgrading for a P120 because it had passive cooling and thus was less
noisy.

It is rare nowadays to use K6s or MMX for power-intensive tasks (where
you need optimization): your Athlon is probably more powerful than the
other three combined. 

> 
> I would expect more K6(including 2 and 3), MMX Pentiums,
> Cyrix, and pre i586 CPUs (in that order) still running, than
> nonMMX Pentiums. The fastest kernel for those would be i386

I am not so sure commercial life of the MMX was relatively short.
> not i586, due to the weird optimization for the Pentium.
> So the best averall, for most pre i686 system would be
> i386 right?
> 

For general code this is right: I have found that both PIIs/PIIIs and
K6s are quite faster (5 to 10%) on code optimized for 386 than on code
optimized for Pentium (even when using Pentium-specific instructions).
Notice that K6s are still happier on code compiled with cpu=i686 than on
code targeted at the 386

On kernel I am not so sure since assembler parts and architecture tricks
(eg selective invalidation of TLB entries ) are a factor and they would
tend to favor Pentium.  However even in assembler parts is not so clear
cut: for copying blocks of memory what is optimal on Pentium and 486 is
bad on everything else (from distant memories it is bad on MMX too) 

> How much slower is an i586 kernel on a MMX Pentium than
> the i386 version?

Didn't measure.  

			JFM



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux