WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] Don't clip the TSC-derived usec value

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Don't clip the TSC-derived usec value to <1tick in gettimeofday.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Jun 2007 05:04:06 -0700
Delivery-date: Thu, 21 Jun 2007 05:02:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1182363456 -3600
# Node ID cadc6d58a9e63dd7e590eafc06a99cd68faa42b4
# Parent  496e3157a35c32d7a550223914cfb92389a80874
Don't clip the TSC-derived usec value to <1tick in gettimeofday.
This fixes some very odd gettimeofday() results when NTP is
adjtimex()ing the clock backwards.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 arch/i386/kernel/time-xen.c |   14 +-------------
 1 files changed, 1 insertion(+), 13 deletions(-)

diff -r 496e3157a35c -r cadc6d58a9e6 arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c       Wed Jun 20 14:39:34 2007 +0100
+++ b/arch/i386/kernel/time-xen.c       Wed Jun 20 19:17:36 2007 +0100
@@ -384,19 +384,7 @@ void do_gettimeofday(struct timeval *tv)
                usec = get_usec_offset(shadow);
                lost = jiffies - wall_jiffies;
 
-               /*
-                * If time_adjust is negative then NTP is slowing the clock
-                * so make sure not to go into next possible interval.
-                * Better to lose some accuracy than have time go backwards..
-                */
-               if (unlikely(time_adjust < 0)) {
-                       max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
-                       usec = min(usec, max_ntp_tick);
-
-                       if (lost)
-                               usec += lost * max_ntp_tick;
-               }
-               else if (unlikely(lost))
+               if (unlikely(lost))
                        usec += lost * (USEC_PER_SEC / HZ);
 
                sec = xtime.tv_sec;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Don't clip the TSC-derived usec value to <1tick in gettimeofday., Xen patchbot-linux-2.6.18-xen <=