From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbbCOUju (ORCPT ); Sun, 15 Mar 2015 16:39:50 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45469 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166AbbCOUjt (ORCPT ); Sun, 15 Mar 2015 16:39:49 -0400 Date: Sun, 15 Mar 2015 21:38:16 +0100 From: Borislav Petkov To: Oleg Nesterov Cc: Dave Hansen , Ingo Molnar , Andy Lutomirski , Linus Torvalds , Pekka Riikonen , Rik van Riel , Suresh Siddha , LKML , "Yu, Fenghua" , Quentin Casasnovas Subject: Re: [PATCH 4/4] x86/fpu: don't abuse drop_init_fpu() in flush_thread() Message-ID: <20150315203816.GC29134@pd.tnic> References: <20150313105251.GD31998@pd.tnic> <20150313145542.GD21603@redhat.com> <20150313161958.GI31998@pd.tnic> <20150313162654.GA26453@redhat.com> <20150313192717.GJ31998@pd.tnic> <20150314144816.GA13029@redhat.com> <20150315173620.GA29134@pd.tnic> <20150315181643.GA488@redhat.com> <20150315185048.GB29134@pd.tnic> <20150315200436.GA30079@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150315200436.GA30079@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 15, 2015 at 09:04:36PM +0100, Oleg Nesterov wrote: > But please note that it is not only used after the failure. > See handle_signal() and the first drop_init_fpu() in > __restore_xstate_sig(). Yeah, that's why I said "In the most places it is used..." > I think its name is confusing a bit... Yeah, the "init" aspect affects only the eager case... How about we call this function fpu_reset_state() instead? This way it doesn't really need to be documented what it does - it simply resets the FPU state. And resetting is what we do in all call sites so the usage dictates the name and then "drop" can be differentiated from "reset" as "drop" is only a part of the "reset" operation on an FPU state. And so on and so on... Hmmm? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --