[Xen-devel] The caculation of the credit in credit_scheduler
When reading the credit scheduler code and doing experiment, I notice one thing
interesting in current credit scheduler. For example, in following situation:
A powerful system with 64 CPUs.
Dom0 with 8 vCPU bound to CPU (0, 16~24)
3 HVM domain, all with 2 vCPUS, all bound as vcpu0->pcpu1, vcpu1->pcpu2. Among
them, 2 are CPU intensive while 1 is I/O intensive.
The result shows that the I/O intensive domain will occupy more than 100% cpu,
while the two cpu intensive domain each occupy 50%.
IMHO it should be 66% for all domain.
The reason is how the credit is caculated. Although the 3 HVM domains is pinned
to 2 PCPU and share the 2 CPUs, they will all get 2* 300 credit when credit
account. That means the I/O intensive HVM domain will never be under credit,
thus it will preempt the CPU intensive whenever it is boost (i.e. after I/O
access to QEMU), and it is set to be TS_UNDER only at the tick time, and then,
I'm not sure if this is meaningful usage model and need fix, but I think it is
helpful to show this to the list.
I didn't try credit2, so no idea if this will happen to credit2 also.
Xen-devel mailing list