blob: acc286a668c6fae190355001a5fab740571b4e7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
Index: vserver-sources-2.1.1_2.6.16/kernel/vserver/sched.c
===================================================================
--- vserver-sources-2.1.1_2.6.16.orig/kernel/vserver/sched.c
+++ vserver-sources-2.1.1_2.6.16/kernel/vserver/sched.c
@@ -159,7 +159,9 @@ on_hold:
#ifdef CONFIG_VSERVER_HARDCPU
/* next interval? */
- if (tokens > sched_pc->fill_rate[0])
+ if (!sched_pc->fill_rate[0])
+ delta_min[0] = HZ;
+ else if (tokens > sched_pc->fill_rate[0])
delta_min[0] += sched_pc->interval[0] *
tokens / sched_pc->fill_rate[0];
vxd_check_range(delta_min[0], 0, INT_MAX);
@@ -169,7 +171,9 @@ on_hold:
return -1;
/* next interval? */
- if (tokens > sched_pc->fill_rate[1])
+ if (!sched_pc->fill_rate[1])
+ delta_min[1] = HZ;
+ else if (tokens > sched_pc->fill_rate[1])
delta_min[1] += sched_pc->interval[1] *
tokens / sched_pc->fill_rate[1];
vxd_check_range(delta_min[1], 0, INT_MAX);
|