Bypass for the infinite loop in teh scheduler with interrupts off.
authorSapan Bhatia <sapanb@cs.princeton.edu>
Wed, 23 Apr 2008 21:12:47 +0000 (21:12 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Wed, 23 Apr 2008 21:12:47 +0000 (21:12 +0000)
linux-2.6-630-sched-fix.patch [new file with mode: 0644]

diff --git a/linux-2.6-630-sched-fix.patch b/linux-2.6-630-sched-fix.patch
new file mode 100644 (file)
index 0000000..150a12c
--- /dev/null
@@ -0,0 +1,37 @@
+--- linux-2.6.22-630/kernel/sched.c.orig       2008-04-23 17:09:21.000000000 -0400
++++ linux-2.6.22-630/kernel/sched.c    2008-04-23 17:10:23.000000000 -0400
+@@ -3656,6 +3656,10 @@
+ /* CHOPSTIX */
+ #endif
++/* Bypass the vx_unhold infinite loop */
++unsigned int merry;
++EXPORT_SYMBOL(merry);
++
+ asmlinkage void __sched schedule(void)
+ {
+       struct task_struct *prev, *next;
+@@ -3740,14 +3744,22 @@
+       cpu = smp_processor_id();
+       vx_set_rq_time(rq, jiffies);
++
++      merry=0;
+ try_unhold:
+       vx_try_unhold(rq, cpu);
+ pick_next:
+       if (unlikely(!rq->nr_running)) {
+               /* can we skip idle time? */
+-              if (vx_try_skip(rq, cpu))
++              if (vx_try_skip(rq, cpu) && merry<10) {
++                      merry++;
+                       goto try_unhold;
++              }
++              else if (merry==10) {
++                      BUG();
++              }
++
+               idle_balance(cpu, rq);
+               if (!rq->nr_running) {