Subject: Re: splusb()
To: Garrett D'Amore <>
From: SODA Noriyuki <>
List: tech-kern
Date: 05/05/2006 16:28:30
>>>>> On Thu, 04 May 2006 10:27:04 -0700,
      "Garrett D'Amore" <> said:

> The splxxx stuff is single processor legacy from the idea that you could 
> just set the processor mask and that this was sufficient.

> If we want to support true kernel SMP ever, then we need to go to 
> mutexes or something like them. 

That depends on what "proper" means. :)
spl + spinclock can be used to support fine grained SMP system too,
just like what is written in Curt Schimmel's "UNIX Systems for Modern
Architectures: Symmetric Multiprocessing and Caching for Kernel

> As far as performance goes, mutexes are not likely to be very different 
> if design so that on uni processor platforms acquiring a mutex that has 
> an "interrupt cookie" set for it (i.e. a mutex that protects data 
> accessed in an ISR) degenerates into just doing the splxxx thing 
> internally.

Yes. The problem is that FreeBSD and Solaris treat interrupt handlers
as threads, thus the handling is more expensive.
The threading model itself is beautiful, though.