Date: Thu, 10 Nov 2005 19:14:39 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Scott Long <scottl@samsco.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh <imp@FreeBSD.org>, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_power.c Message-ID: <20051110185704.A71304@delplex.bde.org> In-Reply-To: <4371FFF1.7020902@samsco.org> References: <200511090732.jA97W2ir099375@repoman.freebsd.org> <20051109204951.K68350@delplex.bde.org> <4371FFF1.7020902@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051110185704.A71304>