Messages in this thread | | | Date | Wed, 10 Jun 2015 11:12:15 +0200 | From | Ingo Molnar <> | Subject | Re: Discussion: quick_pit_calibrate is slow |
| |
* Adrian Hunter <adrian.hunter@intel.com> wrote:
> On 10/06/15 10:08, George Spelvin wrote: > > > The 8254 timer latches the msbyte when the lsbyte is read and returns the > > latched value on the next read > > Are you sure about? The docs I've read don't seem to say that.
Btw., even if docs claim that, the code should gracefully handle the case where that's not the case or where there's an occasional quirk in the numbers.
Because real OSs mostly only care about the interrupts generated by the PIT. That we can read the count is just a bonus that might or might not work reliably, depending on the hardware.
Especially any 'measure the minimum time' approach measuring more than a single PIT tick would be senstive to false positives.
Thanks,
Ingo
| |