Re: Booting 2.1.33 [OFF-TOPIC]

Mark Hemment (markhe@nextd.demon.co.uk)
Mon, 14 Apr 1997 13:23:57 +0100 (BST)


Hi,

On Mon, 14 Apr 1997, David S. Miller wrote:
> SMP is on by default in the latest kernel source Makefile's, are you
> on a uniprocessor and forgot to turn SMP off?

A v. short story on a non-shipping product.

One UNIX vendor want their kernel image to be SMP, but for it not to have
the SMP overhead when run on a uni-processor box.
The solution? A self-modifiying kernel!
Spinlocks were, initially, calls to a function which would either
overwrite the calling code with the lock code, or fill the code with
'cheap' no-op instructions.
To avoid the (small) overhead of indirect function ptrs, core function
calls were implemented in a similar way (basically the calling address was
changed to an SMP or Uni optimised function).

What happned?
It worked well, but the company decided it was too dangerious to
sell to customers (there was alot of concern that future processors might
have problems with I-cache writes, particularly on SMP boxes).

NOTE: We all have the source to Linux, and can re-compile our kernel, so
this idea is _not_ for us!

Regards,

markhe

------------------------------------------------------------------
Mark Hemment, Unix/C Software Engineer (Contractor)
markhe@nextd.demon.co.uk http://www.nextd.demon.co.uk/
"Success has many fathers, failure is a B**TARD!" - anon
------------------------------------------------------------------