lkml.org 
[lkml]   [2019]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 08/22] x86/fpu: Remove user_fpu_begin()
    On 2019-01-25 16:18:40 [+0100], Borislav Petkov wrote:
    > Reviewed-by: Borislav Petkov <bp@suse.de>
    thanks.

    > Should we do this microoptimization in addition, to save us the
    > activation when the kernel thread here:
    >
    > taskA -> kernel thread -> taskA
    >
    > doesn't call kernel_fpu_begin() and thus fpu_fpregs_owner_ctx remains
    > the same?

    This might work now but at the end of the series this case will be
    handled. The switch
    taskA -> kernel thread

    will save taskA's registers. The switch
    kernel thread -> taskA

    will only set TF flag to restore FPU registers on the return to
    userland. The load happens only the ctx pointer is different.

    > It would be a bit more correct as it won't invoke the
    > trace_x86_fpu_regs_activated() TP in case the FPU context is the same.

    The trace point is not wrong. As of now the same context will be loaded
    again.

    Sebastian

    \
     
     \ /
      Last update: 2019-02-05 19:16    [W:2.775 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site