From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671AbbBWRIF (ORCPT ); Mon, 23 Feb 2015 12:08:05 -0500 Received: from mail.skyhub.de ([78.46.96.112]:51798 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752339AbbBWRID (ORCPT ); Mon, 23 Feb 2015 12:08:03 -0500 Date: Mon, 23 Feb 2015 16:31:05 +0100 From: Borislav Petkov To: Oleg Nesterov Cc: Rik van Riel , Linus Torvalds , Suresh Siddha , linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com, matt.fleming@intel.com, bp@suse.de, pbonzini@redhat.com, tglx@linutronix.de, luto@amacapital.net Subject: Re: [PATCH 3/3] x86, fpu: don't abuse FPU in kernel threads if use_eager_fpu() Message-ID: <20150223153105.GG22753@pd.tnic> References: <1421012793-30106-1-git-send-email-riel@redhat.com> <20150115191918.GA27332@redhat.com> <20150119185109.GA16427@redhat.com> <20150119185212.GD16427@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150119185212.GD16427@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 Mon, Jan 19, 2015 at 07:52:12PM +0100, Oleg Nesterov wrote: > Afaics there is no reason why kernel threads should have FPU context > even if use_eager_fpu() == T. Now that interrupted_kernel_fpu_idle() > does not check __thread_has_fpu() we can remove the init_fpu() code ^ ... in the use_eager_fpu() case... I added it to the commit message. > from eager_fpu_init() and change flush_thread() called by do_execve() > to initialize FPU. > > Note: of course, the change in flush_thread() is horrible and must be > cleanuped. We need the new helper, and flush_thread() should return the > error if init_fpu() fails. > > Signed-off-by: Oleg Nesterov Applied, thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --