[Top] [All Lists]

Re: FPU emulator unsafe for SMP?

To: Greg Lindahl <>
Subject: Re: FPU emulator unsafe for SMP?
From: Jun Sun <>
Date: Tue, 19 Feb 2002 20:24:34 -0800
In-reply-to: <>; from on Tue, Feb 19, 2002 at 10:28:35PM -0500
References: <> <> <> <> <002b01c1b607$6afbd5c0$10eca8c0@grendel> <> <00af01c1b9a2$c0d6d5f0$10eca8c0@grendel> <> <>
User-agent: Mutt/1.2.5i
On Tue, Feb 19, 2002 at 10:28:35PM -0500, Greg Lindahl wrote:
> Alpha seems to always save the fpu state (the comments say that gcc
> always generates code that uses it in every user process.)

I think the comment might be an execuse. :-)  Never heard of gcc
generating unnecessary floating point code.

> I suspect that the optimization of not saving the fpu state for a
> process that doesn't use the fpu is the most critical optimization.
> And that you do already.

If you do use floating point, I think it is pretty common to have
only process that uses fpu and runs for very long.  In that case,
leaving FPU owned by the process also saves quite a bit.
> 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? 

In this case, proc that uses fpu gets about 50% of one cpu, i.e., 25% of total
load, while the other two integer math proces split the rest 75%, which
gives 37.5% each.  Not too bad in my opinion.

> Imagine all the funky effects. Now add in a
> MIPS design in which interrupts are not delivered uniformly to all the
> cpus...

This is chip-specific, I think.  Not related to general MIPS arch.


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