#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 ],
* 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);