Messages in this thread | | | From | Daniel Vacek <> | Date | Fri, 2 Nov 2018 07:40:10 +0100 | Subject | Re: [PATCH] tsc: make calibration refinement more robust |
| |
Hi Thomas,
thanks for checking.
On Thu, Nov 1, 2018 at 4:34 PM, Thomas Gleixner <tglx@linutronix.de> wrote: > Daniel, > > On Thu, 1 Nov 2018, Daniel Vacek wrote: > > Please use 'x86/tsc:' as prefix. git log path/to/file usually gives you a > reasonable hint about prefixes.
Oh, sure thing. The dmesg always prints 'tsc:' - I somehow sticked to it...
>> -#define MAX_RETRIES 5 >> -#define SMI_TRESHOLD 50000 >> +#define MAX_RETRIES 5 >> +#define TSC_THRESHOLD (tsc_khz >> 5) > > This breaks pit_hpet_ptimer_calibrate_cpu() because at that point tsc_hkz is 0.
That did not show up with my testing, sorry. I guess pit_calibrate_tsc() never failed for me. Hmm, actually it looks like quick_pit_calibrate() does the job for me so pit_hpet_ptimer_calibrate_cpu() is likely not even called. Would this:
#define TSC_THRESHOLD (tsc_khz? tsc_khz >> 5: 0x20000)
work for you instead? Or alternatively at some point when chasing this down I used:
#define TSC_THRESHOLD (0x10000 + (tsc_khz >> 6))
The first one seems better though. I can send v2 next week if you like it.
--nX
> Thanks, > > tglx
| |