Re: Stolen and degraded time and schedulers

From: Dan Hecht
Date: Thu Mar 15 2007 - 16:08:23 EST


On 03/15/2007 12:53 PM, Jeremy Fitzhardinge wrote:
Dan Hecht wrote:
Available time is defined to be (real_time - stolen_time). i.e. time
in which the vcpu is either running or not ready to run [because it is
halted, and nothing is pending]).

Hm, the Xen definition of stolen time is "time VCPU spent in runnable
(vs running) or offline state". If the VCPU was blocked anyway, then
its never considered to be stolen. Offline means the VCPU was paused by
the administrator, or during suspend/resume.



Yes, the part in the "i.e." above is describing available time. So, it is essentially is the same definition of stolen time VMI uses:

stolen time == ready to run but not running
available time == running or not ready to run

Basically, a vcpu starts off running (and this time is counted as available time). Eventually, it will either be preempted by the hypervisor and descheduled (then this time becomes stolen since the vcpu is still ready), or it will decide to halt (then the time remains accounted towards available time). Once the vcpu is halted, then eventually something happens and we should deliver a virtual interrupt to the vcpu. The time between that something happening (e.g. host I/O completing, an alarm expiring) and the vcpu actually starting to run again is accounted as stolen.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/