On Thu, Aug 16, 2012 at 14:00, Mark Kettenis wrote: > A whitelist-based approach is probably best. What you could do is > attach this timecounter on platforms that are not whitelisted as well, > but give it a fairly low tc_quality if it isn't whitelisted. That way > people can still select the TSC timecounter on systems where we fail > to whitelist it properly.
That sounds reasonable. > Using the brand string to the the whitelisting is a bad idea though in > my opinion. The brand string is initialized by the BIOS, which > sometimes gets it wrong. It is also under control of the marketing > idiots. I was planning on replacing it (or having it replaced), but it's a simple accurate test. It captures most of the CPUs I am certain will work. > > Using cpuspeed to set tc_frequency is a bad idea, since cpuspeed is > the actual frequency at which the CPU is running (which varies > depending on the power management state). Yes, I found the function which sets it based on rdtsc, but then forgot there's a dozen other functions which set it different.
