Messages in this thread | | | Date | Thu, 24 Jul 2008 15:42:32 +0200 | From | Martin Wilck <> | Subject | Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe |
| |
H. Peter Anvin wrote:
> The other thing we may want to consider is doing multiple runs of the > calibration loop. I suspect we'd get a more accurate result running, > say, 9 loops of the 1/9 the current duration and looking either for the > best result or the median (NOT the mean.) > > -hpa
We considered that. However I think if you know what result to expect (here: TICK_COUNT + a few cycles) it is both easier and safer to compare against the expected value than to do statistics. SMI protection is all about outliers (thus, the median is a good suggestion but I'd say it would be over-enigineered).
Martin
PS: I am sorry for the stupid, misleading typo (SMi -> smp) in the mail subject.
-- Martin Wilck PRIMERGY System Software Engineer FSC IP ESP DEV 6
Fujitsu Siemens Computers GmbH Heinz-Nixdorf-Ring 1 33106 Paderborn Germany
Tel: ++49 5251 8 15113 Fax: ++49 5251 8 20209 Email: mailto:martin.wilck@fujitsu-siemens.com Internet: http://www.fujitsu-siemens.com Company Details: http://www.fujitsu-siemens.com/imprint.html
| |