Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-19 Thread Paolo Bonzini
On 19/02/2016 15:12, Marcelo Tosatti wrote: > >> > I need to check how often the timekeeper updates the parameters. > I'd assume once every tick, the function is called (the notifier). > > But you can optimize that away by only updating the TSC frequency > when mult/shift are updated, which

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-19 Thread Paolo Bonzini
On 19/02/2016 15:12, Marcelo Tosatti wrote: > >> > I need to check how often the timekeeper updates the parameters. > I'd assume once every tick, the function is called (the notifier). > > But you can optimize that away by only updating the TSC frequency > when mult/shift are updated, which

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-19 Thread Marcelo Tosatti
On Tue, Feb 16, 2016 at 05:59:57PM +0100, Paolo Bonzini wrote: > > > On 16/02/2016 15:25, Marcelo Tosatti wrote: > > On Tue, Feb 16, 2016 at 02:48:16PM +0100, Marcelo Tosatti wrote: > >> On Mon, Feb 08, 2016 at 04:18:31PM +0100, Paolo Bonzini wrote: > >>> When an NTP server is running, it may

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-19 Thread Marcelo Tosatti
On Tue, Feb 16, 2016 at 05:59:57PM +0100, Paolo Bonzini wrote: > > > On 16/02/2016 15:25, Marcelo Tosatti wrote: > > On Tue, Feb 16, 2016 at 02:48:16PM +0100, Marcelo Tosatti wrote: > >> On Mon, Feb 08, 2016 at 04:18:31PM +0100, Paolo Bonzini wrote: > >>> When an NTP server is running, it may

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-16 Thread Paolo Bonzini
On 16/02/2016 15:25, Marcelo Tosatti wrote: > On Tue, Feb 16, 2016 at 02:48:16PM +0100, Marcelo Tosatti wrote: >> On Mon, Feb 08, 2016 at 04:18:31PM +0100, Paolo Bonzini wrote: >>> When an NTP server is running, it may adjust the time substantially >>> compared to the "official" frequency of the

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-16 Thread Paolo Bonzini
On 16/02/2016 15:25, Marcelo Tosatti wrote: > On Tue, Feb 16, 2016 at 02:48:16PM +0100, Marcelo Tosatti wrote: >> On Mon, Feb 08, 2016 at 04:18:31PM +0100, Paolo Bonzini wrote: >>> When an NTP server is running, it may adjust the time substantially >>> compared to the "official" frequency of the

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-16 Thread Marcelo Tosatti
On Tue, Feb 16, 2016 at 02:48:16PM +0100, Marcelo Tosatti wrote: > On Mon, Feb 08, 2016 at 04:18:31PM +0100, Paolo Bonzini wrote: > > When an NTP server is running, it may adjust the time substantially > > compared to the "official" frequency of the TSC. A 12 ppm change > > sums up to one second

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-16 Thread Marcelo Tosatti
On Tue, Feb 16, 2016 at 02:48:16PM +0100, Marcelo Tosatti wrote: > On Mon, Feb 08, 2016 at 04:18:31PM +0100, Paolo Bonzini wrote: > > When an NTP server is running, it may adjust the time substantially > > compared to the "official" frequency of the TSC. A 12 ppm change > > sums up to one second

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-16 Thread Marcelo Tosatti
On Mon, Feb 08, 2016 at 04:18:31PM +0100, Paolo Bonzini wrote: > When an NTP server is running, it may adjust the time substantially > compared to the "official" frequency of the TSC. A 12 ppm change > sums up to one second per day. > > This already shows up if the guest compares kvmclock with

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-16 Thread Marcelo Tosatti
On Mon, Feb 08, 2016 at 04:18:31PM +0100, Paolo Bonzini wrote: > When an NTP server is running, it may adjust the time substantially > compared to the "official" frequency of the TSC. A 12 ppm change > sums up to one second per day. > > This already shows up if the guest compares kvmclock with

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-10 Thread Paolo Bonzini
On 09/02/2016 19:41, Owen Hofmann wrote: > Hi, > Should this patch change the condition in pvclock_gtod_notify? > Currently it looks like we'll only request a masterclock update when > tsc is no longer a good clocksource. Yes, you're right. Paolo

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-10 Thread Paolo Bonzini
On 09/02/2016 19:41, Owen Hofmann wrote: > Hi, > Should this patch change the condition in pvclock_gtod_notify? > Currently it looks like we'll only request a masterclock update when > tsc is no longer a good clocksource. Yes, you're right. Paolo

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-09 Thread Owen Hofmann
Hi, Should this patch change the condition in pvclock_gtod_notify? Currently it looks like we'll only request a masterclock update when tsc is no longer a good clocksource. On Mon, Feb 8, 2016 at 7:18 AM, Paolo Bonzini wrote: > When an NTP server is running, it may adjust the time substantially

Re: [PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-09 Thread Owen Hofmann
Hi, Should this patch change the condition in pvclock_gtod_notify? Currently it looks like we'll only request a masterclock update when tsc is no longer a good clocksource. On Mon, Feb 8, 2016 at 7:18 AM, Paolo Bonzini wrote: > When an NTP server is running, it may adjust

[PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-08 Thread Paolo Bonzini
When an NTP server is running, it may adjust the time substantially compared to the "official" frequency of the TSC. A 12 ppm change sums up to one second per day. This already shows up if the guest compares kvmclock with e.g. the PM timer. It shows up even more once we add support for the

[PATCH 4/4] KVM: x86: track actual TSC frequency from the timekeeper struct

2016-02-08 Thread Paolo Bonzini
When an NTP server is running, it may adjust the time substantially compared to the "official" frequency of the TSC. A 12 ppm change sums up to one second per day. This already shows up if the guest compares kvmclock with e.g. the PM timer. It shows up even more once we add support for the