Date: Mon, 11 Sep 2000 02:09:22 +0100 From: Ben Smithurst <ben@FreeBSD.org> To: Greg Lehey <grog@lemis.com> Cc: Mike Meyer <mwm@mired.org>, current@FreeBSD.ORG Subject: Re: page fault in sched_ithd Message-ID: <20000911020922.R77593@strontium.scientia.demon.co.uk> In-Reply-To: <20000911015427.Q77593@strontium.scientia.demon.co.uk> References: <20000909195525.E77593@strontium.scientia.demon.co.uk> <20000909210619.F77593@strontium.scientia.demon.co.uk> <14779.6851.88867.359611@guru.mired.org> <20000911094245.A19199@wantadilla.lemis.com> <20000911015427.Q77593@strontium.scientia.demon.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
--IU5/I01NYhRvwH70
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Ben Smithurst wrote:
> Greg Lehey wrote:
>
>> Sorry, I missed the beginning of this. Could somebody send me the
>> patch? I'd assume that a relatively simple check would handle the
>> issue, based on what I've seen here.
>
> I've lost the actual patch, I basically just added
>
> if (ir == NULL)
> return;
>
> in sched_ithd() before it ever de-references ir. I've some up with a
> slightly bigger patch which adds stray IRQ logging too, but I haven't
> tested that yet.
Here's the slightly bigger patch, which seems to be working fine so far.
--
Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D
--IU5/I01NYhRvwH70
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ithread.diff"
Index: ithread.c
===================================================================
RCS file: /usr/cvs/src/sys/i386/isa/ithread.c,v
retrieving revision 1.1
diff -u -r1.1 ithread.c
--- ithread.c 2000/09/07 01:32:48 1.1
+++ ithread.c 2000/09/10 12:57:59
@@ -95,6 +95,8 @@
SYSINIT(start_softintr, SI_SUB_SOFTINTR, SI_ORDER_FIRST, start_softintr, NULL)
+#define MAX_STRAY_LOG 5
+
/*
* Schedule a heavyweight interrupt process. This function is called
* from the interrupt handlers Xintr<num>.
@@ -104,6 +106,7 @@
{
int irq = (int) cookie; /* IRQ we're handling */
ithd *ir = ithds[irq]; /* and the process that does it */
+ static int straycount[NHWI];
/* This used to be in icu_vector.s */
/*
@@ -144,6 +147,20 @@
}
#endif
+ if (ir == NULL) {
+ if (irq < NHWI) {
+ if (straycount[irq] < MAX_STRAY_LOG) {
+ printf("stray irq %d\n", irq);
+ if (++straycount[irq] == MAX_STRAY_LOG)
+ printf("got %d stray irq %d's: "
+ "not logging anymore\n",
+ MAX_STRAY_LOG, irq);
+ }
+ return;
+ }
+ panic("sched_ithd: ithds[%d] == NULL", irq);
+ }
+
/*
* Set it_need so that if the thread is already running but close
* to done, it will do another go-round. Then get the sched lock
--IU5/I01NYhRvwH70--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000911020922.R77593>
