Re: 2.6.17-mm2 hrtimer code wedges at boot?

From: Roman Zippel
Date: Tue Jun 27 2006 - 06:15:02 EST


Hi,

On Mon, 26 Jun 2006, Valdis.Kletnieks@xxxxxx wrote:

> Which looks like a good place to get hung in a loop for a while....
>
> Eventually (after about 2 minutes, it finally unwedges and continues on.
>
> Any ideas?

Could you please try the patch below?
tv_nsec can shortly become negative, but its absolute value will always be
smaller then the current nsec offset.

bye, Roman

---
kernel/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-mm/kernel/timer.c
===================================================================
--- linux-2.6-mm.orig/kernel/timer.c 2006-06-27 11:59:19.000000000 +0200
+++ linux-2.6-mm/kernel/timer.c 2006-06-27 12:10:28.000000000 +0200
@@ -1129,7 +1129,7 @@ static void update_wall_time(void)
clocksource_adjust(clock, offset);

/* store full nanoseconds into xtime */
- xtime.tv_nsec = clock->xtime_nsec >> clock->shift;
+ xtime.tv_nsec = (s64)clock->xtime_nsec >> clock->shift;
clock->xtime_nsec -= (s64)xtime.tv_nsec << clock->shift;

/* check to see if there is a new clocksource to use */
-
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/