From owner-freebsd-current Sun Mar 26 12:48:49 2000 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id D63CB37B7B4 for ; Sun, 26 Mar 2000 12:48:46 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id MAA33563; Sun, 26 Mar 2000 12:48:42 -0800 (PST) (envelope-from dillon) Date: Sun, 26 Mar 2000 12:48:42 -0800 (PST) From: Matthew Dillon Message-Id: <200003262048.MAA33563@apollo.backplane.com> To: Nikolai Saoukh Cc: freebsd-current@FreeBSD.ORG Subject: Re: Is there spinlocks/semaphores available for drivers? References: <20000326223650.A17200@Draculina.otdel-1.org> <200003261920.LAA32887@apollo.backplane.com> <20000327003157.A17420@Draculina.otdel-1.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :I do not expect implementation right now. :I can put some stubs in pertinent places. :What I am looking for is some kind of :guidelines/hints/... The answer is.... nobody knows yet :-). Interrupts will probably wind up running each in its own thread, and we will probably adopt the BSDI hybridized model (which runs an interrupt synchronously if possible and spools it to a thread otherwise) to increase efficiency. I outlined a way to keep the current spl/cpl mechanisms intact while at the same time moving interrupts to a threading model in my SMP document: http://www.backplane.com/FreeBSD4/ http://www.backplane.com/FreeBSD4/smp-api.html The mechanism I outline will allow interrupt execution concurrent with supervisor execution, and allow interrupt execution concurrent with other interrupts. For example, two different ethernet interrupts could be taken concurrently with only minor spinlock controls on the IF queue, and both could run concurrent with the TCP stack (outside of the spl*() protected areas of the TCP stack). The cool thing is that we can make the above work without gutting the current spl*() mechanisms. Frankly, the moment we can take an ethernet interrupt concurrent with the network stack, we win. The moment we can take multiple concurrent ethernet interrupts, we win even more. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message