On Sun, Aug 17, 2008 at 11:16:05AM +0100, Jay Shah wrote:
> Nix,
> 
> Any chance you can point me in the direction of that git/patch?
> 

It's commit cfd28f6695d0fc047478480791a21bdd4967f98e, which is in
current -linus and -stable, appended below.

                                    Jeff

-- 
Work email - jdike at linux dot intel dot com

commit cfd28f6695d0fc047478480791a21bdd4967f98e
Author: Jeff Dike <[EMAIL PROTECTED]>
Date:   Mon May 12 14:01:53 2008 -0700

    uml: fix bad NTP interaction with clock
    
    UML's supposed nanosecond clock interacts badly with NTP when NTP
    decides that the clock has drifted ahead and needs to be slowed down.
    Slowing down the clock is done by decrementing the cycle-to-nanosecond
    multiplier, which is 1.  Decrementing that gives you 0 and time is
    stopped.
    
    This is fixed by switching to a microsecond clock, with a multiplier
    of 1000.
    
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Cc: WANG Cong <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index 0d0cea2..c3e2f36 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -75,7 +75,7 @@ static irqreturn_t um_timer(int irq, void *dev)
 
 static cycle_t itimer_read(void)
 {
-       return os_nsecs();
+       return os_nsecs() / 1000;
 }
 
 static struct clocksource itimer_clocksource = {
@@ -83,7 +83,7 @@ static struct clocksource itimer_clocksource = {
        .rating         = 300,
        .read           = itimer_read,
        .mask           = CLOCKSOURCE_MASK(64),
-       .mult           = 1,
+       .mult           = 1000,
        .shift          = 0,
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to