OK, I found the problem:
util-vserver 0.30.195 includes headers in the kernel subdirectory, including sched.h which were probably from 1.9.2. I copied a new sched.h from the vs kernel, and now it works as expected.
Looks like ./configure --disable-internal-headers would have fixed it too.
The culprit was probably this:
#define VCMD_set_sched VC_CMD(SCHED, 1, 2)
which should have been:
#define VCMD_set_sched VC_CMD(SCHED, 1, 3)
Cheers,
Grisha
On Sat, 16 Oct 2004, Gregory (Grisha) Trubetskoy wrote:
This is vs 1.9.3-rc2.1, utils 0.30.195.
# vcontext --create -- \
vsched --fill-rate 1001 \
--interval 1002 \
--tokens 1003 \
--tokens_min 1004 \
--tokens_max 1005 \
--cpu_mask 0 -- sleep 1000
New security context is 49153
vsched: WARNING: the '--cpu_mask' parameter is deprecated and will not have any effect
... now in another shell:
# cat /proc/virtual/49153/sched Token: 1001 FillRate: 115 Interval: 1001 TokensMin: 1003 TokensMax: 1004 PrioBias: 0 cpu 0: 0 0 0 cpu 1: 0 0 0 cpu 2: 1 0 0 cpu 3: 0 0 0
Somehow these numbers don't match.
I see in include/linux/vserver/sched.h
struct vcmd_set_sched_v2 { int32_t fill_rate; int32_t interval; int32_t tokens; int32_t tokens_min; int32_t tokens_max; uint64_t cpu_mask; };
struct vcmd_set_sched_v3 { uint32_t set_mask; int32_t fill_rate; int32_t interval; int32_t tokens; int32_t tokens_min; int32_t tokens_max; int32_t priority_bias; };
And it looks like utils pass v3 while the kernel treats it as v2 and so my fill_rate becomes set_mask, but I can't figure out where the actual problem is...
HTH a little bit,
Grisha
_______________________________________________ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver
