Re: [PATCH v2] x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-10-12 Thread Thomas Gleixner
On Tue, 11 Oct 2016, Bin Gao wrote: > On Fri, Aug 26, 2016 at 12:14:58PM +0200, Thomas Gleixner wrote: > > The Linux kernel does think a reliable calibration implies the reliability > (i.e. > no watchdog required). I'm posting some code pieces to explain. I know that and I know exactly how all t

Re: [PATCH v2] x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-10-11 Thread Bin Gao
On Fri, Aug 26, 2016 at 12:14:58PM +0200, Thomas Gleixner wrote: > On Fri, 26 Aug 2016, Thomas Gleixner wrote: > > On Thu, 25 Aug 2016, Bin Gao wrote: > > > On Wed, Aug 24, 2016 at 10:51:20AM +0200, Thomas Gleixner wrote: > > > > On Tue, 16 Aug 2016, Bin Gao wrote: > > > > > On some newer Intel x86

Re: [PATCH v2] x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-08-26 Thread Thomas Gleixner
On Fri, 26 Aug 2016, Thomas Gleixner wrote: > On Thu, 25 Aug 2016, Bin Gao wrote: > > On Wed, Aug 24, 2016 at 10:51:20AM +0200, Thomas Gleixner wrote: > > > On Tue, 16 Aug 2016, Bin Gao wrote: > > > > On some newer Intel x86 processors/SoCs the TSC frequency can be > > > > directly > > > > calcula

Re: [PATCH v2] x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-08-26 Thread Thomas Gleixner
On Thu, 25 Aug 2016, Bin Gao wrote: > On Wed, Aug 24, 2016 at 10:51:20AM +0200, Thomas Gleixner wrote: > > On Tue, 16 Aug 2016, Bin Gao wrote: > > > On some newer Intel x86 processors/SoCs the TSC frequency can be directly > > > calculated by factors read from specific MSR registers or from a cpuid

Re: [PATCH v2] x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-08-25 Thread Bin Gao
On Wed, Aug 24, 2016 at 10:51:20AM +0200, Thomas Gleixner wrote: > On Tue, 16 Aug 2016, Bin Gao wrote: > > On some newer Intel x86 processors/SoCs the TSC frequency can be directly > > calculated by factors read from specific MSR registers or from a cpuid > > leaf (0x15). TSC frequency calculated b

Re: [PATCH v2] x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-08-24 Thread Thomas Gleixner
On Tue, 16 Aug 2016, Bin Gao wrote: > On some newer Intel x86 processors/SoCs the TSC frequency can be directly > calculated by factors read from specific MSR registers or from a cpuid > leaf (0x15). TSC frequency calculated by native msr/cpuid is absolutely > accurate so we should always skip cali

[PATCH v2] x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-08-16 Thread Bin Gao
On some newer Intel x86 processors/SoCs the TSC frequency can be directly calculated by factors read from specific MSR registers or from a cpuid leaf (0x15). TSC frequency calculated by native msr/cpuid is absolutely accurate so we should always skip calibrating TSC aginst another clock, e.g. PIT,

Re: x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-06-20 Thread Bin Gao
On Mon, Jun 20, 2016 at 04:20:26PM -0700, John Stultz wrote: > On Fri, Jun 17, 2016 at 12:48 AM, Thomas Gleixner wrote: > > On Thu, 16 Jun 2016, Bin Gao wrote: > > > >> Unlike PIT based calibration which counts TSC cycles against another timer, > >> MSR or CPUID method has no calibration - it simp

Re: x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-06-20 Thread John Stultz
On Fri, Jun 17, 2016 at 12:48 AM, Thomas Gleixner wrote: > On Thu, 16 Jun 2016, Bin Gao wrote: > >> Unlike PIT based calibration which counts TSC cycles against another timer, >> MSR or CPUID method has no calibration - it simply multiplies the known >> frequency of a timer by a ratio. So TSC freq

Re: x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-06-17 Thread Thomas Gleixner
On Thu, 16 Jun 2016, Bin Gao wrote: > Unlike PIT based calibration which counts TSC cycles against another timer, > MSR or CPUID method has no calibration - it simply multiplies the known > frequency of a timer by a ratio. So TSC frequency computed by MSR or CPUID > is the final frequency and does

x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-06-16 Thread Bin Gao
Unlike PIT based calibration which counts TSC cycles against another timer, MSR or CPUID method has no calibration - it simply multiplies the known frequency of a timer by a ratio. So TSC frequency computed by MSR or CPUID is the final frequency and doesn't need the refined calibration process. We