Re: [PATCH v3 2/6] KVM: x86: switch to masterclock update using timekeeper functionality

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

 



A couple more observation now that we've agreed on the approach.

On 01/08/2017 12:03, Paolo Bonzini wrote:
> 
>>> Maybe what we want is some kind of "bool cycles_valid", and then
>>> read_clock_and_systime can return it:
>>>
>>>
>>>         if (clock->read_clock_and_systime) {
>>>             systime_snapshot->cycles_valid =
>>>              clock->read_clock_and_systime(
>>>                 &now, &systime_snapshot->cycles);

Please pass the clocksource to the new function.  However this:

> +		clock = tk->tkr_mono.clock;

should then be READ_ONCE for the same reason mentioned in
tk_clock_read's comments.  Then,

>>>         } else {
>>>             now = tk_clock_read(&tk->tkr_mono);

this can call clock->read(clock) directly, without going through
tk_clock_read.

Thanks,

Paolo

>>>             systime_snapshot->cycles_valid = true;
>>>             systime_snapshot->cycles = now;
>>>         }




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux