From owner-freebsd-hackers Fri May 22 14:09:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA17401 for freebsd-hackers-outgoing; Fri, 22 May 1998 14:09:49 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA17296; Fri, 22 May 1998 14:09:16 -0700 (PDT) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.8/8.8.8) id QAA02498; Fri, 22 May 1998 16:09:07 -0500 (EST) (envelope-from toor) Message-Id: <199805222109.QAA02498@dyson.iquest.net> Subject: Re: SMP resource locking In-Reply-To: <19980522225323.00501@follo.net> from Eivind Eklund at "May 22, 98 10:53:23 pm" To: eivind@yes.no (Eivind Eklund) Date: Fri, 22 May 1998 16:09:07 -0500 (EST) Cc: dyson@FreeBSD.ORG, grog@lemis.com, hackers@FreeBSD.ORG, current@FreeBSD.ORG From: "John S. Dyson" Reply-To: dyson@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Eivind Eklund said: > On Fri, May 22, 1998 at 12:01:18AM -0500, John S. Dyson wrote: > > Greg Lehey said: > > > I haven't paid much attention to SMP problems yet, but I need to now. > > > Can somebody point me to functions to ensure single-thread passing of > > > critical sections? In a UP environment I'd use splhigh (), but that's > > > obviously not enough for SMP. > > > > > For now, splhigh in a normal driver context will work. That is > > of course broken, but it will work fine. In the future, it won't. > > What's the right way to write this now? Add locks 'as one feel like', > or just ignore the lock-issues beyond spl(), or ? > For now, just do the spl thing. There is finer grained control available, but deadlocks are easy to cause. I am working aggressively on swtch.s right now and some of the other mp type issues, trying to improve things, schedule the code, get the smp TLB shootdown correct, and other things. mp_lock can be used to advantage, but deadlocks will happen without great care... So, to people working on the code, please stay away from swtch.s and to a lesser extent apic_vector and mp_machdep :-). At least let me know what you are doing, and we can work together :-). -- John | Never try to teach a pig to sing, dyson@freebsd.org | it just makes you look stupid, jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message