Subject: re: improving ssh performance on sun4m systems
To: matthew green <mrg@eterna.com.au>
From: Todd Vierling <tv@wasabisystems.com>
List: port-sparc
Date: 03/09/2002 22:02:27
On Sun, 10 Mar 2002, matthew green wrote:

:    [note: -mcpu=v8 means the resulting code will not run on sparc v7 and
:    older systems.]
:
: this isn't true; we emulate these instructions in the kernel.

However, it's ungodly slow, since the emulation makes the already slow
sun4's and sun4c's have to do even more work.

: /etc/ld.so.conf work needs to be done for sparc.

Yes.  I've already said precisely what needs to be done in the past to make
this less grotty, and it's pretty simple, but I simply don't have the
machinery in easy reach to test it on the varying architectures:

* A flag indicating presence of v8 instructions needs to be in the machdep
  sysctl tree.  I don't know if there is one there already capable of being
  used in ld.so.conf.

* Given the above, a small `libc_v8.so', in the vein of `libm387.so' for
  i386, can be created that simply contains the v8 instruction replacements
  for the libcalls:

  .mul    .umul    .div    .udiv    .rem    .urem

* ld.so.conf can be shipped by default with a libc override, such as:

  libc.so.12       machdep.v8_present       1:libc_v8.so.0,libc.so.12

With all of the above, you gain *nearly* all the speed all around for v8
instructions on sun4m and sun4u-32 architectures (modulo the overhead of
layering libc_v8 on libc), without hosing speed for the same binaries on v7
systems.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/