vserver 1.9.5.x5
[linux-2.6.git] / kernel / vserver / sched.c
index fab4514..86849ca 100644 (file)
@@ -3,7 +3,7 @@
  *
  *  Virtual Server: Scheduler Support
  *
- *  Copyright (C) 2004  Herbert Pötzl
+ *  Copyright (C) 2004-2005  Herbert Pötzl
  *
  *  V0.01  adapted Sam Vilains version to 2.6.3
  *  V0.02  removed legacy interface
 
 #include <linux/config.h>
 #include <linux/sched.h>
-#include <linux/vs_base.h>
 #include <linux/vs_context.h>
-#include <linux/vserver/context.h>
-#include <linux/vserver/sched.h>
+#include <linux/vs_sched.h>
+#include <linux/vserver/sched_cmd.h>
 
 #include <asm/errno.h>
 #include <asm/uaccess.h>
@@ -103,9 +102,8 @@ int vx_tokens_recalc(struct vx_info *vxi)
  *
  * Both properties are important to certain workloads.
  */
-int effective_vavavoom(task_t *p, int max_prio)
+int vx_effective_vavavoom(struct vx_info *vxi, int max_prio)
 {
-       struct vx_info *vxi = p->vx_info;
        int vavavoom, max;
 
        /* lots of tokens = lots of vavavoom
@@ -125,6 +123,7 @@ int effective_vavavoom(task_t *p, int max_prio)
        /* vavavoom = ( MAX_USER_PRIO*VAVAVOOM_RATIO/100*tokens_left(p) -
                MAX_USER_PRIO*VAVAVOOM_RATIO/100/2); */
 
+       vxi->sched.vavavoom = vavavoom;
        return vavavoom;
 }