2.6.0 uptime bug
Hi,
Quoted 3 lines
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 Fri Sep 12 15:14:57 2003 renamed from arch/um/kernel/time.c.orig Fri Sep 12 15:19:21 2003 +8 -0
@@ -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
Signature · 14 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 4 lines · [email protected] said:
The wrong setup of
wall_to_monotonicmakes 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.
Yup, and I like it a lot better. It's in and will be in the next 2.6 patch.
Thanks for chasing that down.
Jeff
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel