From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752739AbcJCVDK (ORCPT ); Mon, 3 Oct 2016 17:03:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60018 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751171AbcJCVDA (ORCPT ); Mon, 3 Oct 2016 17:03:00 -0400 Message-ID: <1475528577.4622.11.camel@redhat.com> Subject: Re: [PATCH RFC 4/5] x86,fpu: lazily skip FPU restore when still loaded From: Rik van Riel To: Dave Hansen , linux-kernel@vger.kernel.org Cc: x86@kernel.org, tglx@linutronix.de, pbonzini@redhat.com, mingo@redhat.com, luto@kernel.org, hpa@zytor.com, bp@suse.de Date: Mon, 03 Oct 2016 17:02:57 -0400 In-Reply-To: <57F2C467.5060007@linux.intel.com> References: <1475353895-22175-1-git-send-email-riel@redhat.com> <1475353895-22175-5-git-send-email-riel@redhat.com> <57F2B9E9.7030806@linux.intel.com> <1475526171.4622.9.camel@redhat.com> <57F2C467.5060007@linux.intel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-Qjvc634m1UgIzmh/Rj4L" Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 03 Oct 2016 21:03:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-Qjvc634m1UgIzmh/Rj4L Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2016-10-03 at 13:49 -0700, Dave Hansen wrote: > On 10/03/2016 01:22 PM, Rik van Riel wrote: > >=20 > > >=20 > > > >=20 > > > > What are the preempt rules with this thing?=C2=A0=C2=A0This needs t= o be > > > > called > > > > in preempt-disabled contexts, right? > > Indeed, all the FPU context switching code needs=C2=A0 > > to be called in preempt-disabled contexts. > >=20 > > You do not want to get preempted halfway through > > saving or restoring floating point registers. > OK, cool, that's what I expected.=C2=A0=C2=A0Could you just add a comment= about > it > to make it clear that it's also the case for this new > fpu_lazy_skip_restore() helper? Turns out the code already has an old fpu_want_lazy_restore(), which is what I will use instead :) I will add documentation about preemption in places where it is necessary. --=20 All rights reversed --=-Qjvc634m1UgIzmh/Rj4L 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 iQEcBAABCAAGBQJX8seBAAoJEM553pKExN6DW5AH/2ppBVCi60r7TEaN393nC0sL gOZv/9tm5FkH63qCALGEAfd+RNdhyJuSKUFrIeGLbBAU1MWbBhBqi7UdG6bfO+2C HVi2AMvVPleF7MEXjlTYeyKZ2/hgSFO8PXY8H6jtTTsk+IaX8vkuf1nBgndxu+QR FjKUYGf0zow5Howa6sYCU9H1kVzND4S/5bEdlabC3hq9RxwByWJlf1SM+4GHQAp5 aRiunaiwdjeGSGxQjocPJF3M8HAV9Sr5TqgTG87TEVlVd2jjvulkphddyMemFgjJ WUorI/NzuK4pPpJELu3pJh6rpzC6/JnVPAcoPyR8fKbBG3E76xjlw8dB353InMY= =oksy -----END PGP SIGNATURE----- --=-Qjvc634m1UgIzmh/Rj4L--