lkml.org 
[lkml]   [2021]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/4] x86/fpu: Add kernel_fpu_begin_mask() to selectively initialize state
    Just nitpicks:

    On Sun, Jan 17, 2021 at 10:20:38PM -0800, Andy Lutomirski wrote:
    > Currently, requesting kernel FPU access doesn't distinguish which parts of
    > the extended ("FPU") state are needed. This is nice for simplicity, but
    > there are a few cases in which it's suboptimal:
    >
    > - The vast majority of in-kernel FPU users want XMM/YMM/ZMM state but do
    > not use legacy 387 state. These users want MXCSR initialized but don't
    > care about the FPU control word. Skipping FNINIT would save time.
    > (Empirically, FNINIT is several times slower than LDMXCSR.)
    >
    > - Code that wants MMX doesn't want need MXCSR or FCW initialized.

    "want/need" ?

    > _mmx_memcpy(), for example, can run before CR4.OSFXSR gets set, and
    > initializing MXCSR will fail.

    "... because LDMXCSR generates an #UD when the aforementioned CR4 bit is
    not set."

    > - Any future in-kernel users of XFD (eXtended Feature Disable)-capable
    > dynamic states will need special handling.
    >
    > This patch adds a more specific API that allows callers specify exactly

    s/This patch adds/Add/

    > what they want.

    --
    Regards/Gruss,
    Boris.

    https://people.kernel.org/tglx/notes-about-netiquette

    \
     
     \ /
      Last update: 2021-01-19 14:14    [W:2.824 / U:0.428 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site