Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2003 13:18:13 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Nate Williams <nate@yogotech.com>
Cc:        Andrew Gallatin <gallatin@cs.duke.edu>
Subject:   Re: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h
Message-ID:  <XFMail.20030430131813.jhb@FreeBSD.org>
In-Reply-To: <16046.64504.186129.388342@emerger.yogotech.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030430131813.jhb>