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

From: Ingo Molnar
Date: Thu Sep 04 2008 - 12:37:18 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Thu, 4 Sep 2008, Ingo Molnar wrote:
> >
> > ah - perhaps a dynamic statistical approach with an estimation of
> > worst-case calibration error (~= standard deviation) and a quality
> > threshold to reach? That could dramatically increase the number of
> > samples while also making it much faster in practice. Nifty!
>
> Oh, no, I'm _much_ more nifty than that!
>
> Instead of being very clever, I have a very _stupid_ algorithm, one
> that has very hardcoded expectations of exactly what it will see. And
> if it doesn't see exactly that, it just fails early.
>
> I'd post the patch, but I really need to actually _test_ it first, and
> I haven't rebooted yet.

ok, will wait with patience :)

i've been using adaptive calibration with great success in user-space,
to run benchmarks on multiple boxes with a variable number of lmbench
iterations. Once the observable statistical properties of the series of
measurements looks valid it stops the test iterations and emits a
result. This both makes things faster (more predictable hw/kernel
executes certain lmbench tests much faster) and it makes the results
more reliable (less noise, better cross-hardware, cross-kernel and
cross-test comparisons). I've got a quality threshold (and a max
iterations threshold) hardcoded as well.

Ingo
--
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/