Messages in this thread | | | Date | Sat, 10 Jan 2015 13:08:33 -0800 | Subject | Re: [PATCH 3/4] x86: open-code register save/restore in trace_hardirqs thunks | From | Linus Torvalds <> |
| |
On Sat, Jan 10, 2015 at 12:17 PM, Andy Lutomirski <luto@amacapital.net> wrote: > > I asked this once, and someone told me that push/pop has lower > throughput. I find this surprising.
It was true for some AMD CPU's in particular. One insn/cycle vs two.
I personally would be very happy to go back to push/pop sequences. Even without a fancy stack engine like Intel has done for a while, even *simple* cores can generally pair pushes and pops. I think the original Pentium already had a special magic pairing logic to pair pushes and pops despite both instructions using %esp. It's a common and fairly trivial special case, and the fact that a few AMD microarchitectures didn't do it is likely not really a good reason to avoid repeated push/pop instructions.
Linus
| |