Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2002 14:52:35 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Rolf Neugebauer <neugebar@dcs.gla.ac.uk>
Cc:        freebsd-alpha@freebsd.org
Subject:   Re: cvs commit: src/sys/alpha/include cpufunc.h
Message-ID:  <15472.2563.368794.540600@grasshopper.cs.duke.edu>
In-Reply-To: <ysqr8nkj6is.fsf@therese.dcs.gla.ac.uk>
References:  <200202120120.g1C1Ko136446@freefall.freebsd.org> <20020211204721.A49383@grasshopper.cs.duke.edu> <ysqr8nkj6is.fsf@therese.dcs.gla.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

Rolf Neugebauer writes:
 > I wonder if these are related (disabling device polling "solved" the
 > problem).

Actually, I do have a clue.. Was the machine under load?  I never
implemented the hooks to poll from trap() -- this means that the only
time the polling code will get called is if the context switch code
does not find a process ready to run.  If the machine is under load,
it will never get called.

If I'm reading the x86 trap() code correctly, I don't much care for
where Luigi put the hook on x86. I think it belongs in userret().

Would you like to try this totally untested patch?


Cheers,

Drew

Index: trap.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/alpha/trap.c,v
retrieving revision 1.26.2.4
diff -u -r1.26.2.4 trap.c
--- trap.c	5 Mar 2001 21:24:15 -0000	1.26.2.4
+++ trap.c	17 Feb 2002 19:49:14 -0000
@@ -91,6 +91,12 @@
 
 static void printtrap __P((const unsigned long, const unsigned long,
       const unsigned long, const unsigned long, struct trapframe *, int, int));
+
+#ifdef DEVICE_POLLING
+extern u_int32_t poll_in_trap;
+extern int ether_poll __P((int count));
+#endif /* DEVICE_POLLING */
+
 /*
  * Define the code needed before returning to user mode, for
  * trap and syscall.
@@ -102,6 +108,11 @@
 	u_quad_t oticks;
 {
 	int sig, s;
+
+#ifdef DEVICE_POLLING
+        if (poll_in_trap)
+                ether_poll(poll_in_trap);
+#endif /* DEVICE_POLLING */
 
 	/* take pending signals */
 	while ((sig = CURSIG(p)) != 0)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15472.2563.368794.540600>