Messages in this thread | | | From | Linus Torvalds <> | Date | Thu, 21 Mar 2019 11:21:05 -0700 | Subject | Re: [PATCH 01/25] x86: Make SMAP 64-bit only |
| |
On Thu, Mar 21, 2019 at 10:25 AM Denys Vlasenko <dvlasenk@redhat.com> wrote: > > > > > But iirc pushf/popf isn't really that expensive - in fact I think it's > > pretty cheap when system flags don't change. > > I did not see evidence of this. In my testing, > POPF is always ~20 cycles, even if popped flags are identical to current > state of flags.
It may have been an artifact on just some older CPU's. I have this distinct memory of popf that changed IF being more expensive, but maybe that was the Pentium 4 days.
Or maybe it's just that my memory is garbage.
Linus
| |