linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Kilian <petschge@gmx.de>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Re: 2.6.0 uptime bug
Date: Fri, 12 Sep 2003 15:30:27 +0200	[thread overview]
Message-ID: <200309121530.27560.petschge@gmx.de> (raw)

Hi,

> Ok 2.6.0-test5 gives the correct uptime on i386 and the wrong huge
> uptime as uml. My patch doesn't break anything on i386 but I'm going
> to fix this bug in the uml part of the kernel.

Finally I found the very bug itself. wall_to_monotonic is not 
initialised correctly on uml. The following patch fixes this:

-----

--- ./arch/um/kernel/time.c.orig        Fri Sep 12 15:19:21 2003
+++ ./arch/um/kernel/time.c     Fri Sep 12 15:14:57 2003
@@ -19,6 +19,10 @@

 extern struct timeval xtime;

+extern struct timespec wall_to_monotonic;
+
+struct timespec now;
+
 struct timeval local_offset = { 0, 0 };

 void timer(void)
@@ -84,6 +88,10 @@
        if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR)
                panic("Couldn't set SIGVTALRM handler");
        set_interval(ITIMER_VIRTUAL);
+
+       do_posix_clock_monotonic_gettime(&now);
+       wall_to_monotonic.tv_sec = -now.tv_sec;
+       wall_to_monotonic.tv_nsec = -now.tv_nsec;
 }

 void do_gettimeofday(struct timeval *tv)
-----

The wrong setup of wall_to_monotonic makes the bug arch-dependant. I 
finally found this when I compared a linux-2.6.0-test5  running as uml 
to a linux-2.6.0-test5 running inside a vmware. This patch is far less 
intrusive than the patch I posted September 6th.

mfg,
Patrick "Petschge" Kilian

-- 
Morgens wollte sie ihn spüren, mit den Lippen zart berühren,
...und zum blasen heranzuführen, heiss floss es in sie hinein.
Ja so ein Kaffe. Der ist fein



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

             reply	other threads:[~2003-09-12 13:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-12 13:30 Patrick Kilian [this message]
2003-09-14 16:06 ` [uml-devel] Re: 2.6.0 uptime bug Jeff Dike
  -- strict thread matches above, loose matches on Subject: below --
2003-09-11 17:44 Patrick Kilian
2003-09-12 18:09 ` Jeff Dike
2003-09-12 19:32 ` Oleg Drokin
2003-09-04 15:06 [uml-devel] " Patrick Kilian
     [not found] ` <20030905151952.6EBFC3BCE4@home.petschge.de>
     [not found]   ` <20030906190708.56B8C3BCE4@home.petschge.de>
2003-09-09 16:16     ` [uml-devel] " Jeff Dike
2003-09-09 16:28       ` Patrick "Petschge" Kilian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200309121530.27560.petschge@gmx.de \
    --to=petschge@gmx.de \
    --cc=petschge@web.de \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).