Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932982AbbD0OqP (ORCPT ); Mon, 27 Apr 2015 10:46:15 -0400 Received: from mga09.intel.com ([134.134.136.24]:9431 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932797AbbD0OqN (ORCPT ); Mon, 27 Apr 2015 10:46:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,657,1422950400"; d="scan'208";a="562496112" Message-ID: <553E4BB2.2040603@intel.com> Date: Mon, 27 Apr 2015 07:46:10 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Bobby Powers , linux-kernel@vger.kernel.org CC: x86@kernel.org, Oleg Nesterov , Borislav Petkov , Ingo Molnar , Andy Lutomirski , Fenghua Yu , Linus Torvalds , Pekka Riikonen , Quentin Casasnovas , Rik van Riel , Suresh Siddha , Andi Kleen Subject: Re: [PATCH] x86/fpu: always restore_xinit_state() when !use_eager_cpu() References: <1430085869-4327-1-git-send-email-bobbypowers@gmail.com> In-Reply-To: <1430085869-4327-1-git-send-email-bobbypowers@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1670 Lines: 40 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". -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/