Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2000 12:20:01 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Warner Losh <imp@village.org>, The Hermit Hacker <scrappy@hub.org>, Bruce Evans <bde@zeta.org.au>, freebsd-smp@FreeBSD.ORG
Subject:   Re: 'interrupt-level buffer overflows' for sio device?
Message-ID:  <20000924122000.P9141@fw.wintelcom.net>
In-Reply-To: <20000924121359.O9141@fw.wintelcom.net>; from bright@wintelcom.net on Sun, Sep 24, 2000 at 12:14:00PM -0700
References:  <Pine.BSF.4.21.0009080008090.527-100000@thelab.hub.org> <200009080314.VAA50701@harmony.village.org> <xzp7l817ij1.fsf@flood.ping.uio.no> <20000924113008.N9141@fw.wintelcom.net> <xzpn1gxd48d.fsf@flood.ping.uio.no> <20000924121359.O9141@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
* Alfred Perlstein <bright@wintelcom.net> [000924 12:14] wrote:
> * Dag-Erling Smorgrav <des@ofug.org> [000924 11:39] wrote:
> > Alfred Perlstein <bright@wintelcom.net> writes:
> > > This is basically a result of the entire kernel running at the
> > > equivelant of splhigh, all interrupts are blocked until a context
> > > switch in kernel land.
> > > 
> > > There's work in progress to mpsafe the drivers (at least for
> > > ethernet, more will arrive later).
> > 
> > OK. Assuming I wanted to try and help with this work, where would be a
> > good place to start finding out what needs to be done?
> 

Er, let me follow up in order to clarify a few things...

> Have a look at what was recently done to the fxp driver, basically
> protect the instance of the driver from itself, ie, if you see
> splfoo() in the driver, identify what it's trying to protect against
> and figure where the mutex needs to be.

This basically means that any time you see spl, you'll want to see
what exactly the spl is protecting and use a mutex in that structure
or subsystem.

Also, all the instances of locking using mutual exclusion need to
be replaced with msleep interlocking against a conditional variable.

For a detailed explanation of such things you might want to have a
look at:

http://people.freebsd.org/~jasone/smp/
http://people.freebsd.org/~alfred/mpsafe/
http://www.technokratis.com/code/mbuf/mtx_journal

I'm hoping you're going to be at BSDcon.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




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