Livelock limit engaged?

Dave Hayes dave at jetcafe.org
Thu Aug 9 13:02:32 PDT 2007


Matthew Dillon <dillon at apollo.backplane.com> writes:
> It's not an issue for USB, but it is an actual
> error... well, more like a warning.  
. ..
> USB is generating an interrupt which is not being handled
> by the interrupt service routine, or which is being
> generated before USB is able to install its service
> routine,

Since the livelock spam happens continually, I'd presume
that the latter case isn't the issue. (The presumption comes
from thinking that interrupt service routines are only
installed on a system boot.) We're seeing these messages
once every 6-7 seconds after booting.

At any rate, the attached naive hack stops the printing
issue for those who need it. 

What is needed to track this down, besides some clue about
how interrupts are handled in DFly? 
------
Dave Hayes - Consultant - Altadena CA, USA - dave at jetcafe.org 
>>> The opinions expressed above are entirely my own <<<

"Necessity is the plea of every infringement of human
freedom.  It is the argument of tyrants; it is the creed of
slaves."                                     -- William Pitt


===================================================================
RCS file: /home/DragonFly/cvs-mirror/src/sys/kern/kern_intr.c,v
retrieving revision 1.46
diff -u -r1.46 kern_intr.c
--- kern_intr.c 22 Jan 2007 19:37:04 -0000      1.46
+++ kern_intr.c 9 Aug 2007 19:37:17 -0000
@@ -99,10 +99,13 @@
 #endif
 static int livelock_limit = 50000;
 static int livelock_lowater = 20000;
+static int livelock_print = 10;
 SYSCTL_INT(_kern, OID_AUTO, livelock_limit,
         CTLFLAG_RW, &livelock_limit, 0, "Livelock interrupt rate limit");
 SYSCTL_INT(_kern, OID_AUTO, livelock_lowater,
         CTLFLAG_RW, &livelock_lowater, 0, "Livelock low-water mark restore");
+SYSCTL_INT(_kern, OID_AUTO, livelock_print,
+        CTLFLAG_RW, &livelock_print, 0, "Livelock messages printed before 
being quiet");
 
 static int emergency_intr_enable = 0;  /* emergency interrupt polling */
 TUNABLE_INT("kern.emergency_intr_enable", &emergency_intr_enable);
@@ -826,8 +829,11 @@
             * Otherwise we are livelocked.  Set up a periodic systimer
             * to wake the thread up at the limit frequency.
             */
-           kprintf("intr %d at %d > %d hz, livelocked limit engaged!\n",
+            if (livelock_print > 0) {  
+               kprintf("intr %d at %d > %d hz, livelocked limit engaged!\n",
                   intr, ill_count, livelock_limit);
+               livelock_print--;
+            }
            info->i_state = ISTATE_LIVELOCKED;
            if ((use_limit = livelock_limit) < 100)
                use_limit = 100;
@@ -857,8 +863,11 @@
                    if (++lcount >= hz) {
                        info->i_state = ISTATE_NORMAL;
                        systimer_del(&ill_timer);
-                       kprintf("intr %d at %d < %d hz, livelock removed\n",
-                              intr, ill_count, livelock_lowater);
+                       if (livelock_print > 0) {
+                               kprintf("intr %d at %d < %d hz, livelock 
removed\n",
+                                       intr, ill_count, livelock_lowater);
+                               livelock_print--; 
+                       }
                    }
                } else {
                    lcount = 0;











More information about the Kernel mailing list