From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755456AbbBTVtD (ORCPT ); Fri, 20 Feb 2015 16:49:03 -0500 Received: from mail.skyhub.de ([78.46.96.112]:46148 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752745AbbBTVtA (ORCPT ); Fri, 20 Feb 2015 16:49:00 -0500 Date: Fri, 20 Feb 2015 22:48: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 2/3] x86, fpu: always allow FPU in interrupt if use_eager_fpu() Message-ID: <20150220214805.GM19378@pd.tnic> References: <1421012793-30106-1-git-send-email-riel@redhat.com> <20150115191918.GA27332@redhat.com> <20150119185109.GA16427@redhat.com> <20150119185151.GC16427@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150119185151.GC16427@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:51:51PM +0100, Oleg Nesterov wrote: > The __thread_has_fpu() check in interrupted_kernel_fpu_idle() was needed > to prevent the nested kernel_fpu_begin(). Now that we have in_kernel_fpu > and !__thread_has_fpu() case in __kernel_fpu_begin() does not depend on > use_eager_fpu() (except clts) we can remove it. > > __thread_has_fpu() can be false even if use_eager_fpu(), but this case > does not differ from !use_eager_fpu() case except we should not worry > about X86_CR0_TS, __kernel_fpu_begin/end will not touch this bit. > > Note: I think we can kill all irq_fpu_usable() checks except in_kernel_fpu, > just we need to record the state of X86_CR0_TS in __kernel_fpu_begin() and > conditionalize stts() in __kernel_fpu_end(), but this needs another patch. > > Signed-off-by: Oleg Nesterov Applied, thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --