From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756062AbbBPSQM (ORCPT ); Mon, 16 Feb 2015 13:16:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35906 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755736AbbBPSQL (ORCPT ); Mon, 16 Feb 2015 13:16:11 -0500 Date: Mon, 16 Feb 2015 19:14:17 +0100 From: Oleg Nesterov To: Rik van Riel Cc: Borislav Petkov , dave.hansen@linux.intel.com, sbsiddha@gmail.com, luto@amacapital.net, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, fenghua.yu@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/8] x86, fpu: unlazy_fpu: don't reset thread.fpu_counter Message-ID: <20150216181417.GA7382@redhat.com> References: <1423252925-14451-1-git-send-email-riel@redhat.com> <1423252925-14451-2-git-send-email-riel@redhat.com> <20150216170433.GF4458@pd.tnic> <54E22FCD.3030202@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54E22FCD.3030202@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/16, Rik van Riel wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 02/16/2015 12:04 PM, Borislav Petkov wrote: > > > ... and so by looking at the unlazy_fpu() call sites, I think this > > makes sense. > > > > So how's that for a commit message instead: > > > > --- x86, fpu, unlazy_fpu: Don't reset thread.fpu_counter > > > > The "else" branch clears ->fpu_counter as a remnant of the lazy > > FPU usage counting: > > > > e07e23e1fd30 ("[PATCH] non lazy "sleazy" fpu implementation") > > > > However, switch_fpu_prepare() does this now so that else branch is > > superfluous. > > > > If we do use_eager_fpu(), then this has no effect. Otherwise, if > > we actually wanted to prevent fpu preload after the context switch > > we would need to reset it unconditionally, even if > > __thread_has_fpu(). --- > > > > ? > > Good detective work. > > Your changelog makes sense to me. And to me, thanks. Should I resend? Oleg.