From owner-freebsd-bugs Wed Oct 30 17:40:20 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79BEC37B401 for ; Wed, 30 Oct 2002 17:40:19 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE8CD43E42 for ; Wed, 30 Oct 2002 17:40:18 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.3/8.12.5) with ESMTP id g9V1eIgQ062292 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 30 Oct 2002 20:40:18 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.3/8.12.5/Submit) id g9V1eIK7062289; Wed, 30 Oct 2002 20:40:18 -0500 (EST) (envelope-from wollman) Date: Wed, 30 Oct 2002 20:40:18 -0500 (EST) From: Garrett Wollman Message-Id: <200210310140.g9V1eIK7062289@khavrinen.lcs.mit.edu> To: Gregory Bond Cc: Andriy Gapon , freebsd-bugs@FreeBSD.ORG Subject: Re: kern/44417: ipfw layer2 rules are not checked for ether_output_frame() on bridged interface In-Reply-To: <200210310046.LAA06800@lightning.itga.com.au> References: <200210310046.LAA06800@lightning.itga.com.au> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org < said: > In the old days, on the early PDP-11 Unix versions, this was done with > hardware interrupt masks, and the various splXXX() levels had a strict > hierarchy, so spltty() meant "don't enable tty interrupts, but let net and > bio interrupts happen", but splbio() meant "Don't enable any interrupts at > all." Actually, in the old days (lasting right through the VAX era), they were numbers. IIRC, what was more recently called splbio() was previously spl6(). SPL ::= ``Set (Interrupt) Priority Level''. > Note that there are no actual semaphores/spinlocks here, it's all done either > with hardware interrupt masks or simple queues. Actually, there are no queues involved. An interrupt which arrives while masked sets a pending bit (in the variable `ipending') which splx() will call once it is unmasked. > Of course, in an SMP system, this all gets much harder. I dunno how the > FreeBSD 5 kernel handles SPLs. It doesn't. The spl*() functions are still there, but no-ops, to remind developers working on adding fine-grained locking to the system where the critical sections used to be. Since most of the kernel still runs under a single lock (called ``Giant''), there is effectively less concurrency than there was under 4.x, where at least a bio handler could still run when network hardware was masked (splimp()). This situation will improve over time, as more of the critical subsystems are updated to use the new locking primitives. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message