Messages in this thread | | | Subject | Re: [PATCH 01/25] x86: Make SMAP 64-bit only | From | Denys Vlasenko <> | Date | Thu, 21 Mar 2019 18:25:05 +0100 |
| |
On 3/18/19 7:10 PM, Linus Torvalds wrote: > On Mon, Mar 18, 2019 at 10:51 AM Peter Zijlstra <peterz@infradead.org> wrote: >> >> How about I do a patch that schedules EFLAGS for both 32bit and 64bit, >> mark this for backporting to infinity. >> >> And then at the end, after the objtool-ac bits land, I do a patch >> removing the EFLAGS scheduling for x86_64. > > Sounds sane to me. > > And we can make it AC-conditional if it's actually shown to be visible > from a performance standpoint. > > 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.
| |