From: Paolo Giarrusso <blaisorblade@yahoo.it>
To: Jeff Garzik <jeff@garzik.org>, Jeff Dike <jdike@addtoit.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: slow UML on x86-64, soft lockups
Date: Thu, 9 Nov 2006 01:37:35 +0100 (CET) [thread overview]
Message-ID: <20061109003735.76755.qmail@web25221.mail.ukl.yahoo.com> (raw)
In-Reply-To: <4550FFFB.3000602@garzik.org>
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
Jeff Garzik <jeff@garzik.org> ha scritto:
> Recent 2.6.18 / 2.6.19-rc kernels run at the expected speed, on
> 32-bit
> x86, with a Fedora Core 5 or 6 UML userland. However, on 64-bit
> x86-64
> with a 64-bit UML userland, the kernel is achingly slow. It works,
>
> but... Login takes several minutes (via ssh from host or xterm
> console), and soft lockup traces continually print to the screen
> (see
> output below). Once logged into, programs work, but again, very
> slowly.
> Commands which complete in under a second normally often takes
> minutes.
>
> Any ideas? I guess there is a bug in the 64-bit UML timer code?
Yes, there is. Jeff, after our discussion, did I send you the patch
for this (not sure whether tested, I haven't reproduced this bug yet,
but fairly obvious)?
It is attached but I'm answering from a webmail (it happens since I'm
so busy), so I decline responsibility for any MIME content (I'm
sorry, yes).
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
http://mail.yahoo.it
[-- Attachment #2: 2991312419-fix-udelay.diff --]
[-- Type: text/plain, Size: 1784 bytes --]
Index: linux-2.6.git/arch/um/sys-i386/delay.c
===================================================================
--- linux-2.6.git.orig/arch/um/sys-i386/delay.c
+++ linux-2.6.git/arch/um/sys-i386/delay.c
@@ -27,14 +27,3 @@ void __udelay(unsigned long usecs)
}
EXPORT_SYMBOL(__udelay);
-
-void __const_udelay(unsigned long usecs)
-{
- int i, n;
-
- n = (loops_per_jiffy * HZ * usecs) / MILLION;
- for(i=0;i<n;i++)
- cpu_relax();
-}
-
-EXPORT_SYMBOL(__const_udelay);
Index: linux-2.6.git/arch/um/sys-x86_64/delay.c
===================================================================
--- linux-2.6.git.orig/arch/um/sys-x86_64/delay.c
+++ linux-2.6.git/arch/um/sys-x86_64/delay.c
@@ -28,14 +28,3 @@ void __udelay(unsigned long usecs)
}
EXPORT_SYMBOL(__udelay);
-
-void __const_udelay(unsigned long usecs)
-{
- unsigned long i, n;
-
- n = (loops_per_jiffy * HZ * usecs) / MILLION;
- for(i=0;i<n;i++)
- cpu_relax();
-}
-
-EXPORT_SYMBOL(__const_udelay);
Index: linux-2.6.git/include/asm-um/delay.h
===================================================================
--- linux-2.6.git.orig/include/asm-um/delay.h
+++ linux-2.6.git/include/asm-um/delay.h
@@ -1,9 +1,20 @@
#ifndef __UM_DELAY_H
#define __UM_DELAY_H
-#include "asm/arch/delay.h"
-#include "asm/archparam.h"
-
#define MILLION 1000000
+/* Undefined on purpose */
+extern void __bad_udelay(void);
+extern void __bad_ndelay(void);
+
+extern void __udelay(unsigned long usecs);
+extern void __const_udelay(unsigned long usecs);
+extern void __delay(unsigned long loops);
+
+#define udelay(n) ((__builtin_constant_p(n) && (n) > 20000) ? \
+ __bad_udelay() : __udelay(n))
+
+/* It appears that ndelay is not used at all for UML. */
+#define ndelay(n) __bad_ndelay()
+
#endif
prev parent reply other threads:[~2006-11-09 0:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-07 21:51 Jeff Garzik
2006-11-08 18:19 ` Jeff Dike
2006-11-09 0:37 ` Paolo Giarrusso [this message]
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=20061109003735.76755.qmail@web25221.mail.ukl.yahoo.com \
--to=blaisorblade@yahoo.it \
--cc=jdike@addtoit.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®