[time-nuts] Linux TSC clocksource on multi-core systems

Wojciech Owczarek wojciech at owczarek.co.uk
Thu May 1 13:15:08 UTC 2014


What sometimes helps is additional kernel command line parameters, namely
acpi=off (maybe you wouldn't have to disable the PM settings in the BIOS if
you had this) and noapic, also there is the clocksource=tsc parameter which
should make TSC the preferred clock source (that's if it's operational).
This all depends on your kernel version as well.

My experience is that the TSC sync issues were mostly an AMD thing and some
CPU / chipset generations ago, and anything modern should behave correctly
- but clearly the Atom doesn't. Perhaps some platforms are just not meant
for timing - some googling shows a lot of Atom D510 results showing TSC
clock source not starting.

The problem with writing the TSC is that it's a moving target that gets
incremented with every CPU tick. It is writable with the wrmsr (0x10)
instruction, and there's a write_tsc macro defined in asm/msr.h that does
exactly that, but you also need to send it to the right core.

One thing worth mentioning though is that issues like this can sometimes be
resolved with a BIOS upgrade - always worth a try.

More information about the Time-nuts_lists.febo.com mailing list