diff -NurpP --minimal linux-2.6.19.1-vs2.1.1.7.1/include/linux/vs_sched.h linux-2.6.19.1-vs2.1.1.7.2/include/linux/vs_sched.h --- linux-2.6.19.1-vs2.1.1.7.1/include/linux/vs_sched.h 2006-11-30 18:53:18 +0100 +++ linux-2.6.19.1-vs2.1.1.7.2/include/linux/vs_sched.h 2007-01-10 02:57:07 +0100 @@ -58,18 +58,19 @@ static inline int vx_adjust_prio(struct task_struct *p, int prio, int max_user) { struct vx_info *vxi = p->vx_info; + struct _vx_sched_pc *sched_pc; if (!vxi) return prio; + sched_pc = &vx_cpu(vxi, sched_pc); if (vx_info_flags(vxi, VXF_SCHED_PRIO, 0)) { - struct _vx_sched_pc *sched_pc = &vx_cpu(vxi, sched_pc); int vavavoom = vx_effective_vavavoom(sched_pc, max_user); - vxi->sched.vavavoom = vavavoom; + sched_pc->vavavoom = vavavoom; prio += vavavoom; } - prio += vxi->sched.prio_bias; + prio += sched_pc->prio_bias; return prio; } @@ -81,7 +82,7 @@ int vx_adjust_prio(struct task_struct *p struct vx_info *vxi = p->vx_info; if (vxi) - prio += vxi->sched.prio_bias; + prio += vx_cpu(vxi, sched_pc).prio_bias; return prio; } diff -NurpP --minimal linux-2.6.19.1-vs2.1.1.7.1/include/linux/vserver/sched_def.h linux-2.6.19.1-vs2.1.1.7.2/include/linux/vserver/sched_def.h --- linux-2.6.19.1-vs2.1.1.7.1/include/linux/vserver/sched_def.h 2006-11-08 04:57:49 +0100 +++ linux-2.6.19.1-vs2.1.1.7.2/include/linux/vserver/sched_def.h 2007-01-10 02:46:35 +0100 @@ -19,11 +19,10 @@ struct _vx_sched { int tokens_min; /* Limit: minimum for unhold */ int tokens_max; /* Limit: no more than N tokens */ + int prio_bias; /* bias offset for priority */ + unsigned update_mask; /* which features should be updated */ cpumask_t update; /* CPUs which should update */ - - int prio_bias; /* bias offset for priority */ - int vavavoom; /* last calculated vavavoom */ }; struct _vx_sched_pc { @@ -35,6 +34,9 @@ struct _vx_sched_pc { int tokens_min; /* Limit: minimum for unhold */ int tokens_max; /* Limit: no more than N tokens */ + int prio_bias; /* bias offset for priority */ + int vavavoom; /* last calculated vavavoom */ + unsigned long norm_time; /* last time accounted */ unsigned long idle_time; /* non linear time for fair sched */ unsigned long token_time; /* token time for accounting */ @@ -58,8 +60,7 @@ static inline void __dump_vx_sched(struc sched->fill_rate[0], sched->interval[0], sched->fill_rate[1], sched->interval[1], sched->tokens_min, sched->tokens_max); - printk("\t priority = %4d, %4d\n", - sched->prio_bias, sched->vavavoom); + printk("\t priority = %4d\n", sched->prio_bias); } #endif diff -NurpP --minimal linux-2.6.19.1-vs2.1.1.7.1/kernel/vserver/sched.c linux-2.6.19.1-vs2.1.1.7.2/kernel/vserver/sched.c --- linux-2.6.19.1-vs2.1.1.7.1/kernel/vserver/sched.c 2006-11-08 04:57:45 +0100 +++ linux-2.6.19.1-vs2.1.1.7.2/kernel/vserver/sched.c 2007-01-10 02:58:46 +0100 @@ -46,6 +46,8 @@ void vx_update_sched_param(struct _vx_sc sched_pc->tokens_min = sched->tokens_min; if (set_mask & VXSM_TOKENS_MAX) sched_pc->tokens_max = sched->tokens_max; + if (set_mask & VXSM_PRIO_BIAS) + sched_pc->prio_bias = sched->prio_bias; if (set_mask & VXSM_IDLE_TIME) sched_pc->flags |= VXSF_IDLE_TIME; diff -NurpP --minimal linux-2.6.19.1-vs2.1.1.7.1/kernel/vserver/sched_init.h linux-2.6.19.1-vs2.1.1.7.2/kernel/vserver/sched_init.h --- linux-2.6.19.1-vs2.1.1.7.1/kernel/vserver/sched_init.h 2006-11-08 04:57:49 +0100 +++ linux-2.6.19.1-vs2.1.1.7.2/kernel/vserver/sched_init.h 2007-01-10 02:59:24 +0100 @@ -13,7 +13,6 @@ static inline void vx_info_init_sched(st sched->tokens_max = HZ >> 1; sched->tokens_lock = SPIN_LOCK_UNLOCKED; sched->prio_bias = 0; - sched->vavavoom = 0; lockdep_set_class(&sched->tokens_lock, &tokens_lock_key); } @@ -28,6 +27,8 @@ void vx_info_init_sched_pc(struct _vx_sc sched_pc->tokens = HZ >> 2; sched_pc->tokens_min = HZ >> 4; sched_pc->tokens_max = HZ >> 1; + sched_pc->prio_bias = 0; + sched_pc->vavavoom = 0; sched_pc->token_time = 0; sched_pc->idle_time = 0; sched_pc->norm_time = jiffies; diff -NurpP --minimal linux-2.6.19.1-vs2.1.1.7.1/kernel/vserver/sched_proc.h linux-2.6.19.1-vs2.1.1.7.2/kernel/vserver/sched_proc.h --- linux-2.6.19.1-vs2.1.1.7.1/kernel/vserver/sched_proc.h 2006-11-08 04:57:49 +0100 +++ linux-2.6.19.1-vs2.1.1.7.2/kernel/vserver/sched_proc.h 2007-01-10 03:02:44 +0100 @@ -13,7 +13,6 @@ int vx_info_proc_sched(struct _vx_sched "TokensMin:\t%8d\n" "TokensMax:\t%8d\n" "PrioBias:\t%8d\n" - "VaVaVoom:\t%8d\n" ,sched->fill_rate[0] ,sched->fill_rate[1] ,sched->interval[0] @@ -21,7 +20,6 @@ int vx_info_proc_sched(struct _vx_sched ,sched->tokens_min ,sched->tokens_max ,sched->prio_bias - ,sched->vavavoom ); return length; } @@ -42,7 +40,7 @@ int vx_info_proc_sched_pc(struct _vx_sch ,sched_pc->idle_time ); length += sprintf(buffer + length, - " %c%c %d %d %d %d/%d %d/%d\n" + " %c%c %d %d %d %d/%d %d/%d" ,(sched_pc->flags & VXSF_ONHOLD) ? 'H' : 'R' ,(sched_pc->flags & VXSF_IDLE_TIME) ? 'I' : '-' ,sched_pc->tokens @@ -53,6 +51,11 @@ int vx_info_proc_sched_pc(struct _vx_sch ,sched_pc->fill_rate[1] ,sched_pc->interval[1] ); + length += sprintf(buffer + length, + " %d %d\n" + ,sched_pc->prio_bias + ,sched_pc->vavavoom + ); return length; }