* Re: [uml-devel] Re: 2.6.0 uptime bug
[not found] ` <20030906190708.56B8C3BCE4@home.petschge.de>
@ 2003-09-09 16:16 ` Jeff Dike
2003-09-09 16:28 ` Patrick "Petschge" Kilian
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Dike @ 2003-09-09 16:16 UTC (permalink / raw)
To: Patrick "Petschge" Kilian; +Cc: User-mode-linux-devel
petschge@web.de said:
> 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.
Jeff
-------------------------------------------------------
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
* Re: [uml-devel] Re: 2.6.0 uptime bug
2003-09-09 16:16 ` [uml-devel] " Jeff Dike
@ 2003-09-09 16:28 ` Patrick "Petschge" Kilian
0 siblings, 0 replies; 7+ messages in thread
From: Patrick "Petschge" Kilian @ 2003-09-09 16:28 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.
I don't know if other arch beside uml give the wrong uptime. If anyone could
check this on i386 or other "read" hardware I'd be glad to hear the result.
Looking at the code and the callpath all arch should have this bug. If
someone is able to confirm this I'm going to post the patch to the lkml.
mfg,
Patrick "Petschge" Kilian
--
Spam ist weniger ein technisches als ein soziales Problem. Die einzigen
technischen Mittel, die soziale Probleme halbwegs brauchbar loesen,
sind schwere Waffen. Und das auch nur bei wirklich konsequenter
Anwendung. -- Alexander Schreiber in dasr
-------------------------------------------------------
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-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
* Re: [uml-devel] Re: 2.6.0 uptime bug
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
1 sibling, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2003-09-12 18:09 UTC (permalink / raw)
To: petschge; +Cc: user-mode-linux-devel
petschge@gmx.de said:
> Ok 2.6.0-test5 gives the correct uptime on i386 and the wrong huge
> uptime as uml.
That being the case, there's a bug in UML somewhere which needs fixing.
Jeff
-------------------------------------------------------
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
* Re: [uml-devel] Re: 2.6.0 uptime bug
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
1 sibling, 0 replies; 7+ messages in thread
From: Oleg Drokin @ 2003-09-12 19:32 UTC (permalink / raw)
To: user-mode-linux-devel
Hello!
Patrick Kilian <petschge@gmx.de> wrote:
>>> 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.
PK> 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.
Well, but we have HZ=1000 on i386 and HZ=100 in UML
that's different code paths in kernel.
Bye,
Oleg
-------------------------------------------------------
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
* Re: [uml-devel] Re: 2.6.0 uptime bug
2003-09-12 13:30 Patrick Kilian
@ 2003-09-14 16:06 ` Jeff Dike
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2003-09-14 16:06 UTC (permalink / raw)
To: petschge; +Cc: user-mode-linux-devel
petschge@gmx.de said:
> 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.
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
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