Date: Thu, 01 May 2003 11:31:32 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Paul Richards <paul@freebsd-services.com> Cc: freebsd-arch@freebsd.org Subject: Re: lots of malloc(M_WAITOK)'s in interrupt context from camisr Message-ID: <XFMail.20030501113132.jhb@FreeBSD.org> In-Reply-To: <20030501151409.GD1869@survey.codeburst.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01-May-2003 Paul Richards wrote: > On Thu, May 01, 2003 at 04:31:08PM +1000, Bruce Evans wrote: >> On Wed, 30 Apr 2003, Andrew Gallatin wrote: >> >> > John Baldwin writes: >> > >> > > If you need to do more work in your interrupt routine than just wakeups >> > > and dinking with registers, you can always wake up a software interrupt >> > > handler or some other random kthread to do things that take a long amount >> >> (This is about normal interrupt handlers, not INTR_FAST ones.) >> >> > Dumb question: Exactly what is one allowed to do in an INTR_FAST >> > interrupt context? Obviously, you can't sleep. But can you call >> > wakeup()? > > What exactly defines a INTR_FAST interrupt context in the first > place. Do we have any rules for when it should be used, it just > seems to me that all interrupt handlers should be INTR_FAST and > that we'd then just have interrupt handlers. Since INTR_FAST handlers can't lock a normal mutex, this would require all device drivers to use spin locks (which either disable or defer interrupts) thus greatly increasing latency. INTR_FAST are only suitable for things such as sio(4) which need very low latency between interrupt assertion and handler execution and cannot deal with that latency for normal interrupt handlers. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030501113132.jhb>