lkml.org 
[lkml]   [2014]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Make math_state_restore() save and restore the interrupt flag
From
Date
It would be good to know how often #3 happens on a real workload.

On February 1, 2014 1:17:10 PM PST, George Spelvin <linux@horizon.com> wrote:
>> .. which *does* actually bring up something that might work, and
>might
>> be a good idea: remove the "restore math state or set TS" from the
>> normal kernel paths *entirely*, and move it to the "return to user
>> space" phase.
>
>This definitely seems much more sensible. For processors without
>optimized context save/restore, the decision whether to restore eagerly
>is best made once the kernel has decided what it's returning *to*.
>
>From an interrupt handler, there are now three cases:
>1) FPU not in use, available for immediate use.
>2) FPU in use by user-space; save to <location> before using.
>3) FPU in use by kernel code; may not be used (unless we want
> to add nested FPU state save hair).

--
Sent from my mobile phone. Please pardon brevity and lack of formatting.


\
 
 \ /
  Last update: 2014-02-01 23:21    [W:0.140 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site