Re: [RFC patch 0/4] TSC calibration improvements

From: Linus Torvalds
Date: Thu Sep 04 2008 - 17:35:36 EST




On Thu, 4 Sep 2008, Linus Torvalds wrote:
>
> Face it, if somebody tries to make QUICK_PIT_MS be so large as to that be
> an issue, then the whole point of the function goes away.

Btw, the same is true of adding any random "sanity checking". The point of
that thing was to simply only work when the PIT works as advertized, and
fail immediately if it doesn't. Even *if* you were to pick a big
calibration delay *and* if you happened to have a PIT that is broken and
doesn't wrap correctly, the design of the thing would mean that it would
then fail the calibration already.

Exactly because it would _see_ that it's not wrapping.

So then it returns zero, and the slow and complicated case can run.

Take a look at the generated assembly language. I literally wrote it so
that you could imagine that it's an old-time asm hacker that wrote the
asm. Don't screw it up.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/