]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-rx-avoid-unnecessary-wakeups-20020120
authorNickolai Zeldovich <kolya@mit.edu>
Sun, 20 Jan 2002 08:40:16 +0000 (08:40 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 20 Jan 2002 08:40:16 +0000 (08:40 +0000)
"This fixes a livelock condition introduced in my earlier
  resource starvation patch; apparently I had erred too far
  on the side of "wake up just in case".  The livelock bug
  is exhibited when running 10 fsstress processes at once;
  if many processes are waiting for a new Rx call, they get
  stuck in an uninterruptible kernel loop waking each other
  up."

src/rx/rx.c

index ea98ff2a1c7343e03a4cad91735935e2f5435541..998b63adff8d70b235cef7203223c429f826db77 100644 (file)
@@ -1053,17 +1053,16 @@ struct rx_call *rx_NewCall(conn)
        osi_rxSleep(conn);
 #endif
        conn->makeCallWaiters--;
-
-       /*
-        * Wake up anyone else who might be giving us a chance to
-        * run (see code above that avoids resource starvation).
-        */
+    }
+    /*
+     * Wake up anyone else who might be giving us a chance to
+     * run (see code above that avoids resource starvation).
+     */
 #ifdef RX_ENABLE_LOCKS
-       CV_BROADCAST(&conn->conn_call_cv);
+    CV_BROADCAST(&conn->conn_call_cv);
 #else
-       osi_rxWakeup(conn);
+    osi_rxWakeup(conn);
 #endif
-    }
 
     CALL_HOLD(call, RX_CALL_REFCOUNT_BEGIN);