Re: CONUNDRUM.

Systemkennung Linux (linux@mailhost.uni-koblenz.de)
Thu, 13 Feb 1997 21:19:41 +0100 (MET)


Hi,

> > Because its incredibly non obvious. Some of the folk doing big number
> > crunches noticed that the size of your environment changed the
> > performance. [...]
>
> hm, maybe time to add 'misalignment fault' counting support to the kernel?
> Has anyone tried this? Does it work for the FPU too? Is it reliable? ;)
>
> i remember Dave has made this for the Sparc, and there is something like
> this for x86 too.

For most (all?) RISCs this alignment problem is a non issue because the
hardware does not handle it in a completly transparant way. On Linux
where quite a lot of lowlevel system code (fdisk etc.) is written very
dirty this is a problem. Therefore the RISC ports of Linux have
kernel emulation software that executes the misaligned accesses in
software.

This software emulation is many dozen times slower than the real thing and
so no hardware counters need to exist. During my normal daily use of
Linux/MIPS it's usually a real bug in a piece of user software when
something triggers the emulation. In the kernel only the stuff dealing
with PC-style partition tables, the fat filesystem and the IDE stuff
trigger alignment exceptions and some of these haven been fixed for 2.0.
Probably this is only a topic at all for 386 and to a lesser degree for
68k.

Ralf