This is a note to let you know that I've just added the patch titled

    time: Avoid making adjustments if we haven't accumulated anything

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     time-avoid-making-adjustments-if-we-haven-t-accumulated-anything.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From [email protected]  Thu Sep 27 13:32:31 2012
From: John Stultz <[email protected]>
Date: Tue, 11 Sep 2012 15:04:18 -0400
Subject: time: Avoid making adjustments if we haven't accumulated anything
To: [email protected]
Cc: John Stultz <[email protected]>, Prarit Bhargava <[email protected]>, 
Ingo Molnar <[email protected]>, Thomas Gleixner <[email protected]>
Message-ID: <[email protected]>

From: John Stultz <[email protected]>

commit bf2ac312195155511a0f79325515cbb61929898a upstream.

If update_wall_time() is called and the current offset isn't large
enough to accumulate, avoid re-calling timekeeping_adjust which may
change the clock freq and can cause 1ns inconsistencies with
CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE.

Signed-off-by: John Stultz <[email protected]>
Cc: Prarit Bhargava <[email protected]>
Cc: Ingo Molnar <[email protected]>
Link: 
http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 kernel/time/timekeeping.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1057,9 +1057,12 @@ static void update_wall_time(void)
 #else
        offset = (clock->read(clock) - clock->cycle_last) & clock->mask;
 #endif
+       /* Check if there's really nothing to do */
+       if (offset < timekeeper.cycle_interval)
+               goto out;
+
        timekeeper.xtime_nsec = (s64)timekeeper.xtime.tv_nsec <<
                                                timekeeper.shift;
-
        /*
         * With NO_HZ we may have to accumulate many cycle_intervals
         * (think "ticks") worth of time at once. To do this efficiently,


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/time-avoid-making-adjustments-if-we-haven-t-accumulated-anything.patch
queue-3.4/time-move-ktime_t-overflow-checking-into-timespec_valid_strict.patch
queue-3.4/time-improve-sanity-checking-of-timekeeping-inputs.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to