Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751301AbaBBCFJ (ORCPT ); Sat, 1 Feb 2014 21:05:09 -0500 Received: from mail-vb0-f42.google.com ([209.85.212.42]:33104 "EHLO mail-vb0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750849AbaBBCFG (ORCPT ); Sat, 1 Feb 2014 21:05:06 -0500 MIME-Version: 1.0 In-Reply-To: <52EDA60A.50906@zytor.com> References: <52ED9EA9.7080009@zytor.com> <52EDA60A.50906@zytor.com> Date: Sat, 1 Feb 2014 18:05:05 -0800 X-Google-Sender-Auth: dpexmMSgjdXYJQeNaqFcsNKbDtY Message-ID: Subject: Re: [PATCH] Make math_state_restore() save and restore the interrupt flag From: Linus Torvalds To: "H. Peter Anvin" Cc: Suresh Siddha , Nate Eldredge , Thomas Gleixner , Ingo Molnar , "the arch/x86 maintainers" , stable , Linux Kernel Mailing List , Maarten Baert , Jan Kara , George Spelvin , Pekka Riikonen Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 1, 2014 at 5:57 PM, H. Peter Anvin wrote: > > Twiddling CR0.TS is pretty slow if we're not taking advantage of it. Immaterial. We *already* avoid twiddling TS if it's not needed. It is true that we used to twiddle it at every context switch (and then twiddle it *again* if we decided that we'd want to pre-load the FPU state anyway, and avoid the extra fault). But that was fixed, and if we switch from a task that had math state to another task that has math state, we leave TS alone. But Suresh apparently hits on the real issue: > not all the state under xsave adhers to cr0.TS/DNA rules which if so is sad but yes, makes CR0.TS no longer sufficient. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/