linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] Re: 2.6.0 uptime bug
@ 2003-09-11 17:44 Patrick Kilian
  2003-09-12 18:09 ` Jeff Dike
  2003-09-12 19:32 ` Oleg Drokin
  0 siblings, 2 replies; 7+ messages in thread
From: Patrick Kilian @ 2003-09-11 17:44 UTC (permalink / raw)
  To: user-mode-linux-devel

Hi,

>> I have a patch which gives the correct uptime. I don't know what the
>> patch  breaks so please post any problems you have.
> Have you been able to figure out whether this is also a problem for
> other ports?  Your patch suggests that it is, and if it is, then you 
> should send it to LKML so it can be fixed in mainline.
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.

mfg,
Patrick "Petschge" Kilian

-- 
Brauchtumspflege ist nicht anmeldepflichtig. Das gilt auch für 
zwanzigstündige Martinsumzüge im Wendland um einen Castor herum.
-- Mathias Schindler in d.o.c



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [uml-devel] Re: 2.6.0 uptime bug
@ 2003-09-12 13:30 Patrick Kilian
  2003-09-14 16:06 ` Jeff Dike
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Kilian @ 2003-09-12 13:30 UTC (permalink / raw)
  To: user-mode-linux-devel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [uml-devel] 2.6.0 uptime bug
@ 2003-09-04 15:06 Patrick Kilian
       [not found] ` <20030905151952.6EBFC3BCE4@home.petschge.de>
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Kilian @ 2003-09-04 15:06 UTC (permalink / raw)
  To: user-mode-linux-devel

Hi,

I found a bug in the 2.6.0-test? kernels. /proc/uptime shows a uptime 
since the start of the epoch, approx. 33 years.
Is anybody able to reproduce this bug?

mfg,
Patrick "Petschge" Kilian
--  
I still think the fastest way to get wholesale IPv6 adoption
is to write a pr0n server that serves thumbnails over IPv[46]
and full-size images over IPv6 only.              -- Ingvar



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-09-14 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-11 17:44 [uml-devel] Re: 2.6.0 uptime bug Patrick Kilian
2003-09-12 18:09 ` Jeff Dike
2003-09-12 19:32 ` Oleg Drokin
  -- strict thread matches above, loose matches on Subject: below --
2003-09-12 13:30 Patrick Kilian
2003-09-14 16:06 ` Jeff Dike
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox