[LITMUS^RT] Question about TSC

Mac Mollison mollison at cs.unc.edu
Wed Jan 18 08:33:55 CET 2012


This question seems most appropriate for the public LITMUS list, so here
goes.

Bjoern, on p. 300 of your dissertation, you state that TSC time stamps
are comparable across all cores on your particular test platform because
(1) all TSCs are driven by the same clock signal
(2) processors are prohibited from entering sleep states during
experiments

However, accoring to Thomas Gleixner, the TSC is never trustworthy (not
even with the tsc_invariant bit that comes with Nehalem and later CPUs)
[1] - see [2] for broader context. It seems like the primary concern
here is SMIs changing the TSC around.

Do you have any reason to believe you can "trust" the TSC for your
experiments, other than (presumably) never having any problems with it?
In particular, what about SMIs? Frankly, I think never seeing any
problems with it is more than "good enough" for experimentation
purposes, but is there additional evidence?

I'm interested in constructing the strongest argument for using the TSC
for profiling something in userspace, hence my question. I'd like
to be able to say something stonger than "I know it's OK because it
works, even though the experts tell me not to trust it." I think right
now I can pretty much assume I don't have any nasty SMIs, so I can make
a decent argument, but not a great one. Maybe that was your logic as
well?

[1] http://lwn.net/Articles/388286/
[2] http://lwn.net/Articles/388188/

Thanks,
Mac






More information about the litmus-dev mailing list