lkml.org 
[lkml]   [2016]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: RFC: Petition Intel/AMD to add POPF_IF insn
    On Wed, Aug 17, 2016 at 12:32 PM, Linus Torvalds
    <torvalds@linux-foundation.org> wrote:
    >
    > The 2-page pseudo-code is about behavior. It's trivial to
    > short-circuit. There are obvious optimizations, which involve just
    > making the rare cases go slow and have a trivial "if those bits didn't
    > change, don't go through the expense of testing them".

    That said, the first thing we should test is to just see how the
    "let's just optimize this in software" thing works.

    Replace the "popf" with "if (val & X86_EFLAGS_IF) local_irq_enable();"
    and see how that works out. Play with inlining it or not, and see if
    the branch predictor matters.

    We may simply not need popf optimizations.

    Linus

    \
     
     \ /
      Last update: 2016-09-17 09:57    [W:4.351 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site