From owner-cvs-all Tue Jan 12 10:47:37 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA23986 for cvs-all-outgoing; Tue, 12 Jan 1999 10:47:37 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA23975; Tue, 12 Jan 1999 10:47:18 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (peter@localhost [127.0.0.1]) by spinner.netplex.com.au (8.9.1/8.9.1/Netplex) with ESMTP id CAA67261; Wed, 13 Jan 1999 02:46:15 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199901121846.CAA67261@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: "Justin T. Gibbs" cc: Garrett Wollman , Eivind Eklund , Nicolas Souchu , Bruce Evans , mike@smith.net.au, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Subject: Re: cvs commit: src/sys/dev/ppbus if_plip.c In-reply-to: Your message of "Tue, 12 Jan 1999 09:18:01 MST." <199901121626.JAA07694@pluto.plutotech.com> Date: Wed, 13 Jan 1999 02:46:13 +0800 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk "Justin T. Gibbs" wrote: > >< sai d: > > > >> I don't know how the new bus framework will like this kind of > >> behaviour, though. > > > >Easy -- you just declare your device as being of type `TTY|NET' and > >the magic just comes naturally. (Except, of course, that this part > >isn't implemented yet, but it should be fairly trivial to do once the > >interrupt code is debogotified.) > > Can't we have a more dynamic mechanism than that? You don't want > potentially shared interrupts in extra masks unless its absolutely > necessary (e.g. PPP is compiled into the kernel, but the net mask > is only modified when that line discipline is (de)activated and > only for the device interrupts that are engaged in PPP activity). IMHO, the real problem is the blurring and crossing of domains.. eg: the tty interrupt executes into the line discipline code and that executes through into code that's in the network domain, etc. I don't remember the specifics, but it's something like that. In cases where we run from software interrupt context, things can be a little easier to deal with since there's a natural priority and sequencing, at least on the i386. In the PPP case, thinking about it again, part of the reason behind the problem is that code called from the tty interrupt can call MGETHDR() which is meant to be splimp protected. Another user of MGETHDR() will only have network hardware interrupts masked, but that won't stop tty interrupts happening and calling these routines, possibly while the kernel is alread half way through a previous MGETHDR(). For PPP, perhaps the "solution" is to use a preallocated cluster pool or some sort of mutex so it can abort an allocation attempt (and drop characters) if another has been preempted. Protecting the mbuf allocator higher than splimp would also help, but perhaps is a little on the extreme side. Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message