|
From: | 解壁伟 |
Subject: | [Qemu-devel] Round robin of multi-vcpu in qemu |
Date: | Mon, 15 Apr 2013 22:43:41 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 |
Hi there: I'm studying the execution details of multi-vcpu in TCG mode. The vcpus in TCG mode are executed one by one in a sequencial way. I read the function [tcg_exec_all] in Qemu 1.3.0 as bellow, but the implementation is not as I expected. [tcg_exec_all] will finally call [cpu_exec] to excute a loop to excute the TBs in code cache So,how does these functions control the running time of each VCPU? That is,when will the execution of one VCPU return, in order to execute the next_cpu in the loop of [tcg_exec_all]. I've examined the alarm timmer, this timer is used to interrupt the execution of VCPUs to handle interruptions. Does Qemu use a similar way (timer) to control the round robin of these VCPUs? Or, does Qemu use the iCount to prevent a VCPU from running too long? Yours Biwei |
[Prev in Thread] | Current Thread | [Next in Thread] |