lkml.org 
[lkml]   [2015]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 2/2] x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader


On 05/01/2015 23:48, Marcelo Tosatti wrote:
>>> > > But there is no guarantee that vCPU-N has updated its pvti when
>>> > > vCPU-M resumes guest instruction execution.
>> >
>> > Still confused. So we can freeze all vCPUs in the host, then update
>> > pvti 1, then resume vCPU 1, then update pvti 0? In that case, we have
>> > a problem, because vCPU 1 can observe pvti 0 mid-update, and KVM
>> > doesn't increment the version pre-update, and we can return completely
>> > bogus results.
> Yes.

But then the getcpu test would fail (1->0). Even if you have an ABA
situation (1->0->1), it's okay because the pvti that is fetched is the
one returned by the first getcpu.

Paolo


\
 
 \ /
  Last update: 2015-01-06 10:01    [W:1.764 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site