From owner-freebsd-alpha Tue Jan 2 12: 6:53 2001 From owner-freebsd-alpha@FreeBSD.ORG Tue Jan 2 12:06:48 2001 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id D73F037B400 for ; Tue, 2 Jan 2001 12:06:47 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f02K6VG01715 for ; Tue, 2 Jan 2001 12:06:31 -0800 (PST) (envelope-from john@baldwin.cx) Resent-Message-Id: <200101022006.f02K6VG01715@meow.osd.bsdi.com> Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Resent-Date: Mon, 06 Nov 2000 14:46:28 -0800 (PST) Resent-From: John Baldwin Resent-To: Doug Rabson Date: Tue, 02 Jan 2001 12:06:55 -0800 (PST) From: John Baldwin To: alpha@FreeBSD.org Subject: Disabling ints via IPL Resent-Sender: john@baldwin.cx Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ok, here's the first installment. :) On 06-Nov-00 Doug Rabson wrote: > On Mon, 6 Nov 2000, Matthew Jacob wrote: > >> >> I now finally have *one* working -current machine at Feral (a borrowed for >> NetBSD XP1000). All of the week before when I tried to run -current on it it >> destroyed the root filesystem. This problem seems to have gone away. >> >> So- at least I have something I can consistently refer back to for A/B >> comparisons that works (i.e., activation energy is now less). I *still* >> don't >> have enough power in the office yet to fire up the 4100!! >> >> It's still my theory that the enable/disable interrupt design is asking a >> lot of a platform. I don't recall seeing a refutation of this from John or >> Doug- did I somehow miss that? > > I think you are right about the enable/disable scheme. The alternative > (which should be more efficient anyway) is to simply run the irq threads > at a higher IPL - I think you already suggested this. It means being > careful to switch to the ithread directly from the interrupt code > otherwise the irq will be re-fired when the low-level handler returns. Err, so basically no ithreads until we have light-weight ithreads? This will break if an ithread sleeps or blocks though. Basically, you would have to change the low-level code to not restore the IPL on exit, and wait until the ithread runs, all its handlers run and then lower the IPL when the thread finishes execution. If one device interrupt handler ever depends on another device interrupt handler it would be an instant deadlock. :-( We'd also end up running userland processes at the higher IPL while we were waiting to run an interrupt thread, e.g. if the thread blocks trying to obtain a mutex. Has anyone confirmed that the problems are due to not being able to disable an interrupt source? -- Actually, it's not as bad as it sounds here, but this is the basic idea. An ithread will only block if another kernel thread has the mutex, so you won't bounce back to userland with a raised IPL as there will be another runnable kernel thread. More on this in later messages.. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message