On Wed, Aug 17, 2016 at 12:32 PM, Linus Torvalds
<torva...@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

Reply via email to