From d875e19498ce6cc94374f0bc50d49ca43638c4b0 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Wed, 23 Apr 2008 21:12:47 +0000 Subject: [PATCH 1/1] Bypass for the infinite loop in teh scheduler with interrupts off. --- linux-2.6-630-sched-fix.patch | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 linux-2.6-630-sched-fix.patch diff --git a/linux-2.6-630-sched-fix.patch b/linux-2.6-630-sched-fix.patch new file mode 100644 index 000000000..150a12ccd --- /dev/null +++ b/linux-2.6-630-sched-fix.patch @@ -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) { -- 2.43.0