Merge to Fedora kernel-2.6.18-1.2255_FC5-vs2.0.2.2-rc9 patched with stable patch...
[linux-2.6.git] / kernel / sched.c
index fa5360e..b711280 100644 (file)
 #include <linux/acct.h>
 #include <linux/kprobes.h>
 #include <linux/delayacct.h>
-#include <asm/tlb.h>
-
-#include <asm/unistd.h>
+#include <linux/vs_base.h>
+#include <linux/vs_memory.h>
 #include <linux/vs_context.h>
 #include <linux/vs_cvirt.h>
 #include <linux/vs_sched.h>
 
+#include <asm/tlb.h>
+#include <asm/unistd.h>
+
 /*
  * Convert user-nice values [ -20 ... 0 ... 19 ]
  * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
@@ -3155,7 +3157,7 @@ void scheduler_tick(void)
                 * RR tasks need a special form of timeslice management.
                 * FIFO tasks have no timeslices.
                 */
-               if ((p->policy == SCHED_RR) && !--p->time_slice) {
+               if ((p->policy == SCHED_RR) && vx_need_resched(p)) {
                        p->time_slice = task_timeslice(p);
                        p->first_time_slice = 0;
                        set_tsk_need_resched(p);