[lkml]   [2005]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 2.6.13-rc3a] i386: inline restore_fpu

    On Thu, 21 Jul 2005, Chuck Ebbert wrote:
    > This patch makes restore_fpu() an inline. When L1/L2 cache are saturated
    > it makes a measurable difference.

    I've now pushed out an alternative fix for this, which imho is much

    We've long had infrastructure for "alternative asm instructions" that are
    conditional on CPU features, and I just made restore_fpu() use that

    * The "nop" is needed to make the instructions the same
    * length.
    #define restore_fpu(tsk) \
    alternative_input( \
    "nop ; frstor %1", \
    "fxrstor %1", \
    "m" ((tsk)->thread.i387.fsave))

    which not only makes it inline, but makes it a single instruction instead
    of the mess it was before.

    Now, we should do the same for "fnsave ; fwait" vs "fxsave ; fnclex" too,
    but I was lazy. If somebody wants to try that, it would need an
    "alternative_output()" define but should otherwise be trivial too.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-11-18 23:46    [W:0.022 / U:13.264 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site