Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754120AbcJEN52 (ORCPT ); Wed, 5 Oct 2016 09:57:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49200 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbcJEN51 (ORCPT ); Wed, 5 Oct 2016 09:57:27 -0400 Message-ID: <1475675843.11869.8.camel@redhat.com> Subject: Re: [PATCH 2/9] x86/fpu: Hard-disable lazy fpu mode From: Rik van Riel To: Paolo Bonzini , linux-kernel@vger.kernel.org Cc: dave.hansen@linux.intel.com, x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, luto@kernel.org, pa@zytor.com, bp@suse.de Date: Wed, 05 Oct 2016 09:57:23 -0400 In-Reply-To: References: <1475627678-20788-1-git-send-email-riel@redhat.com> <1475627678-20788-3-git-send-email-riel@redhat.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-vaRYyp22M3/Z/mrLZ3R/" Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 05 Oct 2016 13:57:26 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2129 Lines: 64 --=-vaRYyp22M3/Z/mrLZ3R/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2016-10-05 at 09:14 +0200, Paolo Bonzini wrote: >=20 > On 05/10/2016 02:34, riel@redhat.com wrote: > >=20 > > From: Andy Lutomirski > >=20 > > Since commit 58122bf1d856 ("x86/fpu: Default eagerfpu=3Don on all > > CPUs") in Linux 4.6, eager FPU mode has been the default on all x86 > > systems, and no one has reported any regressions. > >=20 > > This patch removes the ability to enable lazy mode: use_eager_fpu() > > becomes "return true" and all of the FPU mode selection machinery > > is > > removed. >=20 > I haven't quite followed up on my promise to benchmark lazy vs. eager > FPU, but I probably should do that now... >=20 > I see two possible issues with this.=C2=A0=C2=A0First, AMD as far as I kn= ow > does > not have XSAVEOPT.=C2=A0=C2=A0Second, when using virtualization, dependin= g on > how > you configure your cluster it's enough to have one pre-SandyBridge > Intel > machine to force no XSAVE on all machines. The "OPT" part of XSAVEOPT does not work across the host/guest boundary, anyway. One of the items used in the tuple that determines whether the optimization can be used is whether or not the system is in the VMX root, or in a guest. In other words, across a VMEXIT / VMENTER boundary, it does full saves & restores, if I am reading the manual right. --=20 All Rights Reversed. --=-vaRYyp22M3/Z/mrLZ3R/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJX9QbDAAoJEM553pKExN6DrYYIAIY2rWlHOYW2y9v1N07DJvgM ps6Z+GPdlf95stZcWRVLr/fRETCZIm6SoHVaCDyvtMGuRrTCTu6ndk0YB9SN5TQN 3NkbiXU2rxpgQihfFAZS5dMmdP9WMmgxJM5CC3jHeEexzMWGnhDcxEHJ8KOCOIlG W+B1AoZyce2I0vlyZkX2J1lnfQqi+VVkBbiFvAiPZzemAF/g4/OYkwgfVLFEUlet tYwwuMakywxB0RlwDOOywsgH831tAvWgRkzG1lghvGsQLBrLIT54ifE30/zx1NXu TxrQ1QOlC/5RMGkeZ8mDYRt0EgM2sdIHCl13X8oZ8tlBqIywHwPLp+ZJXvSBtr8= =NFQw -----END PGP SIGNATURE----- --=-vaRYyp22M3/Z/mrLZ3R/--