Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe

From: Martin Wilck
Date: Thu Jul 24 2008 - 09:42:40 EST


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@xxxxxxxxxxxxxxxxxxx
Internet: http://www.fujitsu-siemens.com
Company Details: http://www.fujitsu-siemens.com/imprint.html
--
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/