All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: "Dieter Nützel" <Dieter.Nuetzel@hamburg.de>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: Feedback on preemptible kernel patch
Date: 14 Sep 2001 00:35:01 -0400	[thread overview]
Message-ID: <1000442113.3897.19.camel@phantasy> (raw)
In-Reply-To: <200109140302.f8E32LG13400@zero.tech9.net>
In-Reply-To: <200109140302.f8E32LG13400@zero.tech9.net>

On Thu, 2001-09-13 at 22:47, Dieter Nützel wrote:
> > first, highmem is fixed and the original patch you have from me is good.
> > second, Daniel Phillips gave me some feedback into how to figure out the
> > VM error.  I am working on it, although just the VM potential
> 
> Good to hear.
> 
> > -- ReiserFS may be another problem.
> 
> Can't wait for that.
> 
> > third, you may be experiencing problems with a kernel optimized for
> > Athlon.  this may or may not be related to the current issues with an
> > Athlon-optimized kernel.  Basically, functions in arch/i386/lib/mmx.c
> > seem to need some locking to prevent preemption.  I have a basic patch
> > and we are working on a final one.
> 
> Can you please send this stuff along to me?
> You know I own an Athlon (since yester Athlon II 1 GHz :-) and need some 
> input...

Yes, find the Athlon patch below.  Please let me know if it works.

> Mobo is MSI MS-6167 Rev 1.0B (AMD Irongate C4, yes the very first one)
> 
> Kernel with preempt patch and mmx/3dnow! optimization crash randomly.
> Never had that (without preempt) during the last two years.

Oh, I did not remember you having problems with Athlon.  I try to keep a
list of what problems are being had.

Are there any other configurations where you have problems?

> Thanks,
> 	Dieter

You are welcome; thank you for the feedback.

Before applying, note there are new patches at
http://tech9.net/rml/linux - a patch for 2.4.10-pre9 and a _new_ patch
for 2.4.9-ac10.  These include everything (highmem, etc) except the
Athlon patch.

The problem with Athlon compiled kernels is that MMX/3DNow routines used
in the kernel are not preempt safe (but SMP safe, so I missed them). 
This patch should correct it.


diff -urN linux-2.4.10-pre8/arch/i386/kernel/i387.c linux/arch/i386/kernel/i387.c
--- linux-2.4.10-pre8/arch/i386/kernel/i387.c	Thu Sep 13 19:24:48 2001
+++ linux/arch/i386/kernel/i387.c	Thu Sep 13 20:00:57 2001
@@ -10,6 +10,7 @@
 
 #include <linux/config.h>
 #include <linux/sched.h>
+#include <linux/spinlock.h>
 #include <asm/processor.h>
 #include <asm/i387.h>
 #include <asm/math_emu.h>
@@ -65,6 +66,8 @@
 {
 	struct task_struct *tsk = current;
 
+	ctx_sw_off();
+	
 	if (tsk->flags & PF_USEDFPU) {
 		__save_init_fpu(tsk);
 		return;
diff -urN linux-2.4.10-pre8/include/asm-i386/i387.h linux/include/asm-i386/i387.h
--- linux-2.4.10-pre8/include/asm-i386/i387.h	Thu Sep 13 19:27:28 2001
+++ linux/include/asm-i386/i387.h	Thu Sep 13 20:01:30 2001
@@ -12,6 +12,7 @@
 #define __ASM_I386_I387_H
 
 #include <linux/sched.h>
+#include <linux/spinlock.h>
 #include <asm/processor.h>
 #include <asm/sigcontext.h>
 #include <asm/user.h>
@@ -24,7 +25,7 @@
 extern void restore_fpu( struct task_struct *tsk );
 
 extern void kernel_fpu_begin(void);
-#define kernel_fpu_end() stts()
+#define kernel_fpu_end() stts(); ctx_sw_on()
 
 
 #define unlazy_fpu( tsk ) do { \


-- 
Robert M. Love
rml at ufl.edu
rml at tech9.net


       reply	other threads:[~2001-09-14  4:35 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200109140302.f8E32LG13400@zero.tech9.net>
2001-09-14  4:35 ` Robert Love [this message]
2001-09-15  4:25   ` Feedback on preemptible kernel patch Dieter Nützel
     [not found]   ` <200109150444.f8F4iEG19063@zero.tech9.net>
2001-09-15  5:14     ` Robert Love
2001-09-18  4:06       ` Dieter Nützel
2001-09-18  8:35         ` Daniel Phillips
2001-09-18 18:18         ` Roger Larsson
2001-09-18 23:31           ` Robert Love
2001-09-20  6:40             ` Dieter Nützel
     [not found]       ` <200109180406.f8I46LG02238@zero.tech9.net>
2001-09-18 23:31         ` Robert Love
2001-09-15 19:18 Robert Love
2001-09-16  1:28 ` Daniel Phillips
2001-09-16  1:54   ` Daniel Phillips
     [not found] <Pine.LNX.4.33.0109140838040.21992-100000@sjoerd.sjoerdnet>
2001-09-14 15:04 ` Robert Love
2001-09-15  9:44   ` Arjan Filius
2001-09-15 10:38     ` Erik Mouw
2001-09-15 17:57     ` Robert Love
  -- strict thread matches above, loose matches on Subject: below --
2001-09-14  2:47 Dieter Nützel
2001-09-11 22:53 Robert Love
2001-09-08  5:22 grue
2001-09-08  5:47 ` Robert Love
2001-09-08 17:33   ` Arjan Filius
2001-09-08 18:22     ` safemode
2001-09-09  4:40     ` Robert Love
2001-09-09 17:09       ` Robert Love
2001-09-09 21:07         ` Arjan Filius
2001-09-09 21:26           ` Robert Love
2001-09-09 21:23         ` Arjan Filius
2001-09-09 21:37           ` Robert Love
2001-09-10  3:24             ` Daniel Phillips
2001-09-10  3:37               ` Jeremy Zawodny
2001-09-10  5:09               ` Robert Love
2001-09-10 18:25                 ` Daniel Phillips
2001-09-10 21:29                 ` Arjan Filius
2001-09-13 17:27                   ` Robert Love
2001-09-14  7:30                     ` george anzinger
2001-09-14 15:01                       ` Robert Love
2001-09-11 19:47             ` Arjan Filius
2001-09-09 18:57   ` grue
2001-09-09 21:44     ` Robert Love

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=1000442113.3897.19.camel@phantasy \
    --to=rml@tech9.net \
    --cc=Dieter.Nuetzel@hamburg.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.