lkml.org 
[lkml]   [2013]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC patch 6/8] timekeeping: Delay update of clock->cycle_last
For calculating the new timekeeper values store the new cycle_last
value in the timekeeper and update the clock->cycle_last just when we
actually update the new values.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/timekeeping.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/kernel/time/timekeeping.c
===================================================================
--- linux-2.6.orig/kernel/time/timekeeping.c
+++ linux-2.6/kernel/time/timekeeping.c
@@ -1120,7 +1120,7 @@ static cycle_t logarithmic_accumulation(

/* Accumulate one shifted interval */
offset -= interval;
- tk->clock->cycle_last += interval;
+ tk->cycle_last += interval;

tk->xtime_nsec += tk->xtime_interval << shift;
accumulate_nsecs_to_secs(tk);
@@ -1235,6 +1235,8 @@ static void update_wall_time(void)
*/
accumulate_nsecs_to_secs(tk);

+ /* Update clock->cycle_last with the new value */
+ clock->cycle_last = tk->cycle_last;
timekeeping_update(tk, false);

out:



\
 
 \ /
  Last update: 2013-02-22 00:41    [W:0.473 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site