From: Andi Kleen <ak@muc.de>
To: eliot@cincom.com
Cc: ak@muc.de, linux-kernel@vger.kernel.org, tgriggs@key.net
Subject: Re: PROBLEM: 2.6 kernels on x86 do not preserve FPU flags across context switches
Date: 17 Jun 2004 12:35:29 +0200
Date: Thu, 17 Jun 2004 12:35:29 +0200 [thread overview]
Message-ID: <20040617103529.GA73341@colin2.muc.de> (raw)
In-Reply-To: <200406162302.QAA01806@central.parcplace.com>
On Wed, Jun 16, 2004 at 04:01:46PM -0700, eliot@cincom.com wrote:
> Hi Andi,
>
> you asked:
> | On what CPUs does the failure occur? Linux uses different paths
> | depending on if the CPU supports SSE or not.
>
> Travis responded:
>
> | We run on both AMDs (Durons and Athlons) as well as PII, PIII, and
> | PIV's. Our kernels are all compiled as generic 586+. Though when we were
And you saw it on all of them? (in particular both on PII and on PIV?)
I actually doubt the problem happens on a context switch - the kernel
just uses FXSAVE/FNSAVE for this and this is extremly hard to get wrong.
Either you have no FPU state saved at all or you have all, since the
CPU handles it completely in microcode.
Most likely candidate would be signal context saving. When a signal happens
and the process used floating point then the i386 kernel converts
the internal FXSAVE/FNSAVE image to another image derived from
iBCS on the signal stack (and then later back). If any problems
with subtle corruptions happen I would expect them in this process.
This would be more likely on SSE enabled CPUs though, on pre SSE
CPUs this code is much simpler.
Do you know which status bit gets corrupted exactly?
-Andi
next prev parent reply other threads:[~2004-06-17 10:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-16 23:01 PROBLEM: 2.6 kernels on x86 do not preserve FPU flags across context switches eliot
2004-06-17 10:35 ` Andi Kleen [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-06-16 22:26 eliot
2004-06-17 10:39 ` Andi Kleen
[not found] <27Pmy-sO-25@gated-at.bofh.it>
2004-06-16 21:40 ` Andi Kleen
2004-06-16 20:32 eliot
2004-06-16 21:03 ` Richard B. Johnson
2004-06-17 6:43 ` Denis Vlasenko
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=20040617103529.GA73341@colin2.muc.de \
--to=ak@muc.de \
--cc=eliot@cincom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tgriggs@key.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox