[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1291306126-16990-1-git-send-email-u.kleine-koenig@pengutronix.de>
Date: Thu, 2 Dec 2010 17:08:46 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH] clocksource: really use a margin of 12.5% to limit deferment
< 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@...gutronix.de>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists