Re: [PATCH] Fix TSC calibration issues
From: Thomas Gleixner
Date: Wed Sep 03 2008 - 05:11:59 EST
On Tue, 2 Sep 2008, Linus Torvalds wrote:
> This is "wrongish".
>
> You really should do the
>
> tsc1 = tsc_read_refs(&pm1, hpet ? &hpet1 : NULL);
> ...
> tsc2 = tsc_read_refs(&pm2, hpet ? &hpet2 : NULL);
>
> around the whole loop, because they get more exact with more time inside,
> and they don't improve from looping around.
True. Just kept them at the place where my debug patches had left them.
> Also, that code is already _too_ unreadable. How about starting by just
> moving the PIT calibration into a function of its own, like the appended
> patch. And then as a separate patch, improving the heuristics for just the
> PIT calibration.
Yeah, should have done that. But I was too tired to touch anything in
the code more complex than adding a few comments.
Thanks,
tglx
--
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/