lkml.org 
[lkml]   [2006]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: slow UML on x86-64, soft lockups
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 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
\
 
 \ /
  Last update: 2006-11-09 01:41    [W:0.037 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site