Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932269AbcJCUuA (ORCPT ); Mon, 3 Oct 2016 16:50:00 -0400 Received: from mga09.intel.com ([134.134.136.24]:1429 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932227AbcJCUtv (ORCPT ); Mon, 3 Oct 2016 16:49:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,291,1473145200"; d="scan'208";a="16273747" Subject: Re: [PATCH RFC 4/5] x86,fpu: lazily skip FPU restore when still loaded To: Rik van Riel , linux-kernel@vger.kernel.org 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> Cc: x86@kernel.org, tglx@linutronix.de, pbonzini@redhat.com, mingo@redhat.com, luto@kernel.org, hpa@zytor.com, bp@suse.de From: Dave Hansen Message-ID: <57F2C467.5060007@linux.intel.com> Date: Mon, 3 Oct 2016 13:49:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1475526171.4622.9.camel@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 519 Lines: 12 On 10/03/2016 01:22 PM, Rik van Riel wrote: >> > What are the preempt rules with this thing? This needs to be called >> > in preempt-disabled contexts, right? > Indeed, all the FPU context switching code needs > to be called in preempt-disabled contexts. > > You do not want to get preempted halfway through > saving or restoring floating point registers. OK, cool, that's what I expected. Could 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?