From bb161628b0e37fe01393b974da64af736530ad3f Mon Sep 17 00:00:00 2001 From: Andy Bavier Date: Wed, 30 Apr 2008 20:53:38 +0000 Subject: [PATCH] Rev 9170 from trunk: fix bug with looping in schedule() --- linux-2.6-210-vserver-cpu-sched.patch | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/linux-2.6-210-vserver-cpu-sched.patch b/linux-2.6-210-vserver-cpu-sched.patch index 5f2054bef..c2319da23 100644 --- a/linux-2.6-210-vserver-cpu-sched.patch +++ b/linux-2.6-210-vserver-cpu-sched.patch @@ -1,6 +1,20 @@ +diff -Nurp linux-2.6.22-200/kernel/sched_hard.h linux-2.6.22-210/kernel/sched_hard.h +--- linux-2.6.22-200/kernel/sched_hard.h 2008-04-24 09:48:57.000000000 -0400 ++++ linux-2.6.22-210/kernel/sched_hard.h 2008-04-24 09:59:21.000000000 -0400 +@@ -179,8 +179,8 @@ void vx_try_unhold(struct rq *rq, int cp + int minskip = 0; + + /* nothing to do? what about pause? */ +- if (list_empty(&rq->hold_queue)) +- return; ++ //if (list_empty(&rq->hold_queue)) ++ // return; + + list_for_each_safe(l, n, &rq->hold_queue) { + int ret, delta_min[2]; diff -Nurp linux-2.6.22-200/kernel/vserver/sched.c linux-2.6.22-210/kernel/vserver/sched.c ---- linux-2.6.22-200/kernel/vserver/sched.c 2008-04-02 14:03:20.000000000 -0400 -+++ linux-2.6.22-210/kernel/vserver/sched.c 2008-04-02 15:53:44.000000000 -0400 +--- linux-2.6.22-200/kernel/vserver/sched.c 2008-04-24 09:48:57.000000000 -0400 ++++ linux-2.6.22-210/kernel/vserver/sched.c 2008-04-24 09:49:00.000000000 -0400 @@ -18,7 +18,6 @@ #include @@ -21,7 +35,7 @@ diff -Nurp linux-2.6.22-200/kernel/vserver/sched.c linux-2.6.22-210/kernel/vserv if (delta >= sched_pc->interval[0]) { long tokens, integral; -@@ -91,7 +97,7 @@ int vx_tokens_recalc(struct _vx_sched_pc +@@ -91,7 +95,7 @@ int vx_tokens_recalc(struct _vx_sched_pc vxd_check_range(delta_min[0], 0, sched_pc->interval[0]); #endif /* advance time */ @@ -30,7 +44,7 @@ diff -Nurp linux-2.6.22-200/kernel/vserver/sched.c linux-2.6.22-210/kernel/vserv /* add tokens */ sched_pc->tokens += tokens; -@@ -106,7 +112,12 @@ int vx_tokens_recalc(struct _vx_sched_pc +@@ -106,7 +110,12 @@ int vx_tokens_recalc(struct _vx_sched_pc /* how much was the idle skip? */ delta = *idle_time - sched_pc->idle_time; vxd_check_range(delta, 0, INT_MAX); @@ -44,7 +58,7 @@ diff -Nurp linux-2.6.22-200/kernel/vserver/sched.c linux-2.6.22-210/kernel/vserv if (delta >= sched_pc->interval[1]) { long tokens, integral; -@@ -161,10 +173,12 @@ on_hold: +@@ -161,10 +170,12 @@ on_hold: /* next interval? */ if (!sched_pc->fill_rate[0]) delta_min[0] = HZ; @@ -61,7 +75,7 @@ diff -Nurp linux-2.6.22-200/kernel/vserver/sched.c linux-2.6.22-210/kernel/vserv delta_min[0] = sched_pc->interval[0] - delta_min[0]; vxd_check_range(delta_min[0], 0, INT_MAX); -@@ -175,10 +189,12 @@ on_hold: +@@ -175,10 +186,12 @@ on_hold: /* next interval? */ if (!sched_pc->fill_rate[1]) delta_min[1] = HZ; -- 2.43.0