Date: Tue, 25 Jul 2000 12:43:25 +0930 From: Greg Lehey <grog@lemis.com> To: Chuck Paterson <cp@bsdi.com> Cc: freebsd-smp@freebsd.org Subject: Re: com interrupts and heavy weight threads Message-ID: <20000725124325.G98476@wantadilla.lemis.com> In-Reply-To: <200007250255.UAA02299@berserker.bsdi.com>; from cp@bsdi.com on Mon, Jul 24, 2000 at 08:55:33PM -0600 References: <200007250255.UAA02299@berserker.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 24 July 2000 at 20:55:33 -0600, Chuck Paterson wrote: > Greg, > Concerning the discussion a while ago on the benefits of > having com and other such interrupts always run in a borrowed > context. > > I do agree that you will want to end up running these > interrupts always in a borrowed context. But, you may want to > actually run these as heavy weight interrupts when you first start. > Here's the deal. I don't think this was explicitly mentioned but if > you use a borrowed context you have to get the low level com driver > locked up (mutices installed and working) in order to boot at all. > There isn't a half way step of running this code under the Giant > lock. You wouldn't want/need to change the driver structure at all > during this phase, just get the stuff to run. > > If I were doing this I think I would go ahead and lock up the > com driver, but until I looked at it some I'm not sure. This is > more to make sure you are aware of the issue than to influence the > decision you arrive at. Thanks for the information, Chuck. I originally intended to register only certain interrupts as threads, then it appeared too complicated and I changed my mind, but now I'm coming back to that view. I'm currently fairly well through the startup sequence, and I'm finding that my blocked interrupt mask (yes, you were all right, of course I needed one) is getting set incorrectly. The trouble is, with 100 clock interrupts a second, it's rather difficult to test it in the kernel debugger. So I'll go back and incorporate both kinds of interrupts. Based on this, I'd say I'll leave the clock and serial I/O interrupts in the old style. Everybody: I've been asked to provide the source files for perusal. I think it's a bit early for that, but I can understand the interest. As a result, I've put the entire work tree up on the web at http://www.lemis.com/SMPng/. Please don't download everything; this is a 56 kB modem link, and it would set fire to the line. If you do want to do more than browse at the moment, please contact me and we'll arrange something. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000725124325.G98476>