[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] What's the state of vCPU scheduled out by hypervisor from the view of guest?
On Thu, 2014-02-13 at 13:31 -0500, xu cong wrote: > Hi All, > > > In a virtual SMP guest, when one vCPU is scheduled out, what's the > view of guest? Is it similar to removing one cpu via hotplug > temporally? No. The time is "stolen" from the guest, which can be seen in the runstate info. When it is running again it could look at the current time and observe that there must have been a gap. It's a bit like what a process under a regular OS sees when it is not running. CPU hotplug is a much more heavy weight operation. > How about the timer on the vCPU scheduled out? The timer firing will cause the vcpu to be woken up and become schedulable again. > For example, assume the guest OS is linux, its process scheduler > (e.g. CFS) need update the vruntime and other information for each > process. When one vCPU gets scheduled again after waiting in run > queue, how does the process scheduler update the information for the > processes running on it? I believe that the Linux scheduler has visibility into the "stolen" time and does the right thing -- which is to not account it against the process which appeared to be running but was actually preempted because the VCPU wasn't running. That would be a bit unfair to that process! Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |