From owner-freebsd-current@FreeBSD.ORG Fri May 4 21:57:34 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC48216A402; Fri, 4 May 2007 21:57:34 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 515AD13C44B; Fri, 4 May 2007 21:57:34 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l44LvTdO074534; Fri, 4 May 2007 15:57:30 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <463BAC46.9030200@samsco.org> Date: Fri, 04 May 2007 15:57:26 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Julian Elischer References: <463B7A1D.6020602@omnisec.de> <463BF1A7.1050504@FreeBSD.org> <200705041546.50690.jhb@freebsd.org> <463BA850.8000804@elischer.org> In-Reply-To: <463BA850.8000804@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Fri, 04 May 2007 15:57:30 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: attilio@freebsd.org, freebsd-current@freebsd.org, Harald Schmalzbauer Subject: Re: PANIC: blockable slep lock (sx) msi @ ....msi.c:374 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2007 21:57:34 -0000 Julian Elischer wrote: > John Baldwin wrote: > >> >> This is wrong because once you do critical_enter(), you are free to >> assume that you won't do a context switch until you critical_exit(), >> and sx_xlock() would violate that if it blocked on the lock. > > wellllll critical enter doesn't block interupts so it's true if you > don't call > an interrupt as a context switch. > (it doesn't SWITCH contexts but it does step into a different context.) > Yes, interrupts are serviced when a critical section is entered, but ithreads are not run on the same CPU until the critical section is exited. This has been debated quite a bit over the last few years, but I it's a good compromise. This implications just don't seem to be documented well, especially for those who need a protected, uninterruptable context for doing time-critical operations. Scott