lkml.org 
[lkml]   [2010]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] clocksource: really use a margin of 12.5% to limit deferment
Date
< 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@pengutronix.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-12-02 17:11    [W:2.059 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site