Re: Ingo's PIII FXSTOR patch [2 Mar] causes problems

Doug Ledford (dledford@redhat.com)
Thu, 15 Apr 1999 21:35:53 -0400


Kurt Garloff wrote:
>
> Hi Ingo,
>
> I wanted to give you a bug report about yout PIII patch, using the new
> FXSAVE/FXRESTOR instructions of the PIII (and PII-Deschutes), which are
> supposed to be a little bit faster.
>
> Your patch for 2.2.2 from Mar 2 causes problems for both 2.2.2-ac7 and
> 2.2.5-ac3(+devfs) on my Dual PII (deschutes) box.
>
> Symptoms:
> * My multithreaded numerical benchmark fails (seemingly random NANs)
> * KDE crashes X crashes the console on logging out
>
> So I guess, the patched kernel does not correctly save and retore the FP
> registers. Debugging suggests, that this is what actually happens.
> I reversed the patch on my 2.2.5-ac3 kernel and the problems have
> disappeared, now.
>
> Just wanted to let you know. In case there is a more recent version of the
> patch to try, please let me know.

I'm currently furthering Ingo's original work on this (it was the basis
for some code that was used in the March 17th PIII Xeon launch event by
Intel). As it turns out, if you really pay attention to detail, it is
*impossible* to reconstruct the complete FPU state that you would
normally get from fsave using only fxsave. The changes to the Tag Word
make it impossible (the fxsave uses a lossy form of saving the tag word
and we can't get that lost information back). So, I have some plans for
getting around that, but right now I'm fighting size problems (as soon
as I do the first fxsave, the machine reboots, presumably because the
task struct has grown too large with the added information or else I'm
missing something somewhere, although it's also possible it could be a
bad gas encoding since I switched to using the actual fxsave and fxrstor
mnemonics while Ingo used hand crafted byte code).

-- 
  Doug Ledford   <dledford@redhat.com>
   Opinions expressed are my own, but
      they should be everybody's.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/