cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h

John Baldwin jhb at FreeBSD.org
Wed Apr 30 10:18:13 PDT 2003


On 29-Apr-2003 Nate Williams wrote:
>> A mutex is far more expensive than an spl.
> 
> Huh?  If so, then something is *really* screwed up, since SPL's block
> out lots of things, while mutex's can/should block little things.
> 
> That's how we get greater parrallelism.

A mutex involves an atomic op.  On i386 this translates to
'lock cmpxhcg'.  On i386 spl was implemented as a simple 'or'
instruction, no lock or anything.  Quite fast.  Also, spl's
didn't have to manage contention.  You don't block on an spl,
you just raise the level.  spl's only have to protect against
bottom-half code, they do not have to protect against top-half
code on other processors.

-- 

John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


More information about the cvs-all mailing list