From: Dave Hansen <dave.hansen@intel.com>
To: Bobby Powers <bobbypowers@gmail.com>, linux-kernel@vger.kernel.org
Cc: x86@kernel.org, Oleg Nesterov <oleg@redhat.com>,
Borislav Petkov <bp@suse.de>, Ingo Molnar <mingo@kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
Fenghua Yu <fenghua.yu@intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Pekka Riikonen <priikone@iki.fi>,
Quentin Casasnovas <quentin.casasnovas@oracle.com>,
Rik van Riel <riel@redhat.com>,
Suresh Siddha <sbsiddha@gmail.com>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] x86/fpu: always restore_xinit_state() when !use_eager_cpu()
Date: Mon, 27 Apr 2015 07:46:10 -0700 [thread overview]
Message-ID: <553E4BB2.2040603@intel.com> (raw)
In-Reply-To: <1430085869-4327-1-git-send-email-bobbypowers@gmail.com>
On 04/26/2015 03:04 PM, Bobby Powers wrote:
> Oleg's commit f893959b ("x86/fpu: Don't abuse drop_init_fpu() in
> flush_thread()") removed drop_init_fpu() usage from flush_thread.
> This seems to break things for me - the Go 1.4 test suite fails all
> over the place with floating point comparision errors (offending
> commit found through bisection).
First of all, I really appreciate the bug report and the bisection. Thanks!
Which hardware was this seen on? Do you have any idea which part of the
test suite failed, or what actually _caused_ it to fail?
> The functional change was that flush_thread after f893959b only calls
> restore_init_xstate when both !use_eager_fpu and !used_math are true.
> drop_init_fpu (now fpu_reset_state) calls restore_init_xstate()
> regardless of whether current used_math().
This is really interesting. We were seeing some issues where the xstate
was not getting cleared across an exec, which seemed silly, but we just
assumed it was something that had always been there.
BTW, I think restore_init_xstate() is probably buggy for the !fxsave and
softfpu cases.
> static inline void restore_init_xstate(void)
> {
> if (use_xsave())
> xrstor_state(init_xstate_buf, -1);
> else
> fxrstor_checking(&init_xstate_buf->i387);
> }
I'll do some testing of this today and make sure it doesn't break the
things that I saw Oleg's patch "fix".
next prev parent reply other threads:[~2015-04-27 14:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-26 22:04 [PATCH] x86/fpu: always restore_xinit_state() when !use_eager_cpu() Bobby Powers
2015-04-27 14:46 ` Dave Hansen [this message]
2015-04-27 15:00 ` Oleg Nesterov
2015-05-01 18:14 ` Dave Hansen
2015-04-27 14:49 ` Oleg Nesterov
2015-04-27 14:58 ` Bobby Powers
2015-04-27 15:10 ` [PATCH v2] x86/fpu: always restore_xinit_state() when use_eager_cpu() Bobby Powers
2015-04-27 15:19 ` Oleg Nesterov
2015-05-02 20:42 ` Bobby Powers
2015-05-03 17:39 ` Oleg Nesterov
2015-05-04 8:11 ` Borislav Petkov
2015-05-06 10:14 ` [tip:x86/urgent] x86/fpu: Always " tip-bot for Bobby Powers
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=553E4BB2.2040603@intel.com \
--to=dave.hansen@intel.com \
--cc=ak@linux.intel.com \
--cc=bobbypowers@gmail.com \
--cc=bp@suse.de \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=priikone@iki.fi \
--cc=quentin.casasnovas@oracle.com \
--cc=riel@redhat.com \
--cc=sbsiddha@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).