From owner-cvs-all@FreeBSD.ORG Thu Nov 10 08:14:44 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D24B116A445; Thu, 10 Nov 2005 08:14:44 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3545743D49; Thu, 10 Nov 2005 08:14:44 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id jAA8EgLK030921; Thu, 10 Nov 2005 19:14:42 +1100 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id jAA8Ed8Y017605; Thu, 10 Nov 2005 19:14:40 +1100 Date: Thu, 10 Nov 2005 19:14:39 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Scott Long In-Reply-To: <4371FFF1.7020902@samsco.org> Message-ID: <20051110185704.A71304@delplex.bde.org> References: <200511090732.jA97W2ir099375@repoman.freebsd.org> <20051109204951.K68350@delplex.bde.org> <4371FFF1.7020902@samsco.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_power.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2005 08:14:45 -0000 On Wed, 9 Nov 2005, Scott Long wrote: > ... > Bruce Evans wrote: >> >> >> Er, SWIs are interrupts too. Trying to sleep in a SWI handler should >> cause the same message. This commit uses the general taskqueue SWI >> handler. taskqueue(9) implicitly says that only the taskqueue thread >> handler can sleep (it gives malloc(M_WAITOK) as an example of something >> that can only be done in thread context). >> >> Bruce Please trim quotes when replying. > You're right, but sleeping in SWI's has never been enforced. CAM relies on > it, for better or worse, and until that's fixed it's pointless to > start enforcing it. CAM at least shoots only itself in the foot if its SWIs block. The taskqueue SWIs are shared, so sleeping in them is like sleeping in a timeout ISR (not quite as bad, since SWI_TQ* > SWI_CLOCK). Blocking on Giant to enter a taskqueue SWISR would be like blocking on Giant to enter a timeout ISR except it is handled better by having a separate ISR for cases that need Giant. Bruce