From owner-freebsd-smp Sun Sep 24 12:20:17 2000 Delivered-To: freebsd-smp@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 8A85037B422 for ; Sun, 24 Sep 2000 12:20:11 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e8OJK1500402; Sun, 24 Sep 2000 12:20:01 -0700 (PDT) Date: Sun, 24 Sep 2000 12:20:01 -0700 From: Alfred Perlstein To: Dag-Erling Smorgrav Cc: Warner Losh , The Hermit Hacker , Bruce Evans , freebsd-smp@FreeBSD.ORG Subject: Re: 'interrupt-level buffer overflows' for sio device? Message-ID: <20000924122000.P9141@fw.wintelcom.net> References: <200009080314.VAA50701@harmony.village.org> <20000924113008.N9141@fw.wintelcom.net> <20000924121359.O9141@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20000924121359.O9141@fw.wintelcom.net>; from bright@wintelcom.net on Sun, Sep 24, 2000 at 12:14:00PM -0700 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * Alfred Perlstein [000924 12:14] wrote: > * Dag-Erling Smorgrav [000924 11:39] wrote: > > Alfred Perlstein 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