Subject: Re: Linux seeming to run faster?
To: Matthew Orgass <>
From: Andrew Brown <>
List: tech-kern
Date: 10/12/2000 01:42:10
>  Linux probably does run faster on every platform.  Just try to read the
>source to see why:  most of the OS is MD and must be rewritten for each
>port.  In many places, Linux directly uses MD instructions where NetBSD
>has several function calls.  In other places, Linux structures represent
>registers where NetBSD structures represent whatever the registers mean. 

this sort of struck me the last time i looked at some linux kernel
code.  i don't really remember the occasion, but me and another guy
had some time to kill and decided to look at the scheduler.  what
struck me was that they *seem* to have replaced spl*()/slpx() with
calls to cli()/sti() which are the names of the machine instructions
for the i386 (linux started there, and presumably the code originally
contained in-line assembly to do just that) that block all interrupts
and clear all interrupts.

supposedly cli() and sti() would be rewritten for whatever platorm
they were "porting" to, but that struck me as horribly inefficient.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."