[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [BUG] Linux process vruntime accounting in Xen



On 17/05/16 11:33, George Dunlap wrote:
> On Mon, May 16, 2016 at 11:33 PM, Boris Ostrovsky
> <boris.ostrovsky@xxxxxxxxxx> wrote:
>> On 05/16/2016 05:38 PM, Tony S wrote:
>>> The issue behind it is that the process execution calculation(e.g.,
>>> delta_exec) in virtualized environment should not be calculated as it
>>> did in physical enviroment.
>>>
>>> Here are two solutions to fix it:
>>>
>>> 1) Based on the vcpu->runstate.time(running/runnable/block/offline)
>>> changes, to determine how much time the process on this VCPU is
>>> running, instead of just "delta_exec = now - exec_start";
>>>
>>> 2) Build another clock inside the guest OS which records the exect
>>> time that the VCPU runs. All vruntime calculation is based on this
>>> clock, instead of hyperivosr clock/time(real clock).
>>
>> Looks like CONFIG_PARAVIRT_TIME_ACCOUNTING is used for adjusting process
>> times. KVM uses it but Xen doesn't.
> 
> Is someone on the Linux side going to put this on their to-do list then? :-)

Patch sent.

Support was already existing for arm. What is missing is support for
paravirt_steal_rq_enabled which requires to be able to read the stolen
time of another cpu. This can't work today as accessing another cpu's
vcpu_runstate_info isn't possible without risking inconsistent data.
I plan to add support for this, too, but this will require adding
another hypercall to map a modified vcpu_runstate_info containing an
indicator for an ongoing update of the data.

Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.