From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: In-Reply-To: References: <52ED9EA9.7080009@zytor.com> <52EDA60A.50906@zytor.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH] Make math_state_restore() save and restore the interrupt flag From: "H. Peter Anvin" Date: Sat, 01 Feb 2014 18:12:18 -0800 To: Linus Torvalds 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 Message-ID: <4b084999-5ea6-4fd5-b6e9-c9066f4bb55b@email.android.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: Yes, that is exactly the "eageronly" features - currently LWP and MPX. On February 1, 2014 6:05:05 PM PST, Linus Torvalds wrote: >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 -- Sent from my mobile phone. Please pardon brevity and lack of formatting.