linux-um archives
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Sakari Ailus <sakari.ailus@saunalahti.fi>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] umls unresponsive & consuming 100% cpu time
Date: Mon, 19 May 2008 12:16:13 -0400	[thread overview]
Message-ID: <20080519161613.GC17500@c2.user-mode-linux.org> (raw)
In-Reply-To: <482AA5AE.3000900@saunalahti.fi>

On Wed, May 14, 2008 at 11:41:18AM +0300, Sakari Ailus wrote:
> I have three UML instances running on a host. First, they all were 
> unresponsive simultaneously using all CPU time they could get. After a 
> while they became responsive again. I could log in through SSH. The 
> funny thing is that the date command showed correct date and time (as 
> far as I remember, can't test it now as they are hung again) while the 
> time in bash prompt was constant showing the time around the initial 
> hang, which is the same on all three instances.

I reproduced and debugged a similar problem, resulting in the patch
below.  See if it makes any difference for you...

	       	  	Jeff

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

Index: 2.6/stable/arch/um/os-Linux/time.c
===================================================================
--- 2.6.orig/stable/arch/um/os-Linux/time.c	2008-05-14 14:55:56.000000000 -0400
+++ 2.6/stable/arch/um/os-Linux/time.c	2008-05-14 15:30:48.000000000 -0400
@@ -66,12 +66,21 @@ long long disable_timer(void)
 	return timeval_to_ns(&time.it_value);
 }
 
+static long long last_time;
+
 long long os_nsecs(void)
 {
 	struct timeval tv;
+	long long ret;
 
 	gettimeofday(&tv, NULL);
-	return timeval_to_ns(&tv);
+	ret = timeval_to_ns(&tv);
+
+	if((last_time != 0) && (last_time > ret))
+		ret = last_time;
+
+	last_time = ret;
+	return ret;
 }
 
 #ifdef UML_CONFIG_NO_HZ

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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:[~2008-05-19 16:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 14:00 [uml-devel] umls unresponsive & consuming 100% cpu time Bram Matthys (Syzop)
2008-05-07 20:23 ` Nix
2008-05-08 10:02   ` [SPAM] " Bram Matthys (Syzop)
2008-05-09 15:45 ` Jeff Dike
2008-05-10  8:41   ` [SPAM] " Bram Matthys (Syzop)
2008-05-13 15:40     ` Jeff Dike
2008-05-14  8:41     ` Sakari Ailus
2008-05-19 16:16       ` Jeff Dike [this message]
2008-05-31  9:16         ` Bram Matthys (Syzop)

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=20080519161613.GC17500@c2.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=sakari.ailus@saunalahti.fi \
    --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