Subject: re: improving ssh performance on sun4m systems
To: None <>
From: Brian A. Seklecki <>
List: netbsd-users
Date: 03/09/2002 22:45:55
On Sat, 9 Mar 2002, Todd Vierling wrote:

> 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/ 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

In the mean time are these details sufficient enough to compose a chapter
for "The NetBSD Guide" on optimizing for different ports (at least i386,
sparc, etc. where there are CPUs of different steppings) ?


> 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
> * Given the above, a small `', in the vein of `' for
>   i386, can be created that simply contains the v8 instruction replacements
>   for the libcalls:
>   .mul    .umul    .div    .udiv    .rem    .urem
> * can be shipped by default with a libc override, such as:
>       machdep.v8_present,
> 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 <>  *  Wasabi & NetBSD:  Run with it.
> -- CDs, Integration, Embedding, Support --

                                                    /~\ The ASCII Ribbon
later -                                             \ / Campaign Against
Brian                                                X  Exchange, Outlook
                                                    / \ & HTML Email.

"There are only two things infinite:  The universe, and human stupidity.  And I'm not to sure about the first one."  -Albert Einstein