[PATCH] clocksource: really use a margin of 12.5% to limit deferment

From: Uwe Kleine-KÃnig
Date: Thu Dec 02 2010 - 11:09:00 EST


< ukleinek> tglx: the last comment in clocksource_max_deferment is wrong I
think. Unless I'm mistaken the margin is only 2^-5, not 2^-3
< ukleinek> i.e. 3.125%, not 12.5%
...
< tglx> crap, the 3.125% is a bit narrow

So fix the code to really do what the comment specifies.

Signed-off-by: Uwe Kleine-KÃnig <u.kleine-koenig@xxxxxxxxxxxxxx>
---
kernel/time/clocksource.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index c18d7ef..0ddf372 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -528,7 +528,7 @@ static u64 clocksource_max_deferment(struct clocksource *cs)
* note a margin of 12.5% is used because this can be computed with
* a shift, versus say 10% which would require division.
*/
- return max_nsecs - (max_nsecs >> 5);
+ return max_nsecs - (max_nsecs >> 3);
}

#ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
--
1.7.2.3

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