Re: 2.6.14-rc4-rt7

From: Steven Rostedt
Date: Wed Oct 26 2005 - 20:26:42 EST


On Wed, 2005-10-26 at 21:07 -0400, Steven Rostedt wrote:

> Index: linux-2.6.14-rc5-rt7/kernel/time/timeofday.c
> ===================================================================
> --- linux-2.6.14-rc5-rt7.orig/kernel/time/timeofday.c 2005-10-26 16:57:03.000000000 -0400
> +++ linux-2.6.14-rc5-rt7/kernel/time/timeofday.c 2005-10-26 21:03:22.000000000 -0400
> @@ -243,8 +243,8 @@
>
> ns_to_timespec(ts, mc);
>
> - now = timespec_to_ktime(*ts);
> prev = per_cpu(prev_mono_time, cpu);
> + now = timespec_to_ktime(*ts);
>
> prev_st = per_cpu(prev_system_time, cpu);
> curr_st = system_time;
>

Silly me! I was thinking the "now = timespec_to_ktime(*ts)" was where
the time was taken.

Try this patch instead!

-- Steve

Index: linux-2.6.14-rc5-rt7/kernel/time/timeofday.c
===================================================================
--- linux-2.6.14-rc5-rt7.orig/kernel/time/timeofday.c 2005-10-26 16:57:03.000000000 -0400
+++ linux-2.6.14-rc5-rt7/kernel/time/timeofday.c 2005-10-26 21:23:05.000000000 -0400
@@ -233,6 +233,9 @@
ktime_t prev, now;
nsec_t mc, prev_st, curr_st;

+ prev = per_cpu(prev_mono_time, cpu);
+ prev_st = per_cpu(prev_system_time, cpu);
+
/* atomically read __get_monotonic_clock_ns() */
do {
seq = read_seqbegin(&system_time_lock);
@@ -242,11 +245,7 @@
} while (read_seqretry(&system_time_lock, seq));

ns_to_timespec(ts, mc);
-
now = timespec_to_ktime(*ts);
- prev = per_cpu(prev_mono_time, cpu);
-
- prev_st = per_cpu(prev_system_time, cpu);
curr_st = system_time;

if (ktime_cmp(now, <, prev)) {


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