linux-mips
[Top] [All Lists]

Re: FPU emulator unsafe for SMP?

To: Greg Lindahl <lindahl@conservativecomputer.com>
Subject: Re: FPU emulator unsafe for SMP?
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Wed, 20 Feb 2002 10:56:50 +0100 (MET)
Cc: Linux/MIPS Development <linux-mips@oss.sgi.com>
In-reply-to: <20020219222835.A4195@wumpus.skymv.com>
Sender: owner-linux-mips@oss.sgi.com
On Tue, 19 Feb 2002, Greg Lindahl wrote:
> On Tue, Feb 19, 2002 at 05:12:38PM -0800, Jun Sun wrote:
> > As I looked into FPU/SMP issue, I realized this problem.  I agree 
> > that locking fpu owner to the current cpu is the best solution.
> > I bet this won't really hurt performance because any alternative would
> > incur transferring FPU registers across cpus, which is not a small 
> > overhead.

  [...]

> What you propose, locking the fpu owner to the current cpu, will not
> result in a fair solution. Imagine a 2 cpu machine with 2 processes
> using integer math and 1 using floating point... how much cpu time
> will each process get? Imagine all the funky effects. Now add in a
> MIPS design in which interrupts are not delivered uniformly to all the
> cpus... I don't know if there are any or will ever be any, but...

What if you have 2 processes who are running at the same CPU when they start
using the FPU? Won't they be locked to that CPU, while all other's stay idle
(if no other processes are to be run)?

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds


<Prev in Thread] Current Thread [Next in Thread>