Re: [PATCH 3/3] x86: get rid of FIXUP_TOP_OF_STACK/RESTORE_TOP_OF_STACK

From: Andy Lutomirski
Date: Wed Mar 18 2015 - 17:02:54 EST


On Wed, Mar 18, 2015 at 12:47 PM, Denys Vlasenko <dvlasenk@xxxxxxxxxx> wrote:
> FIXUP_TOP_OF_STACK is only necessary because we don't save %r11
> to pt_regs->r11 on SYSCALL64 fast path, but we want ptrace to see
> it populated.
>
> Bite the bullet, add a single additional PUSH insn, and remove
> FIXUP_TOP_OF_STACK.
>
> RESTORE_TOP_OF_STACK is already a nop. Remove it too.
>
> On SandyBridge CPU, it does not get slower:
> measured 54.22 ns per getpid syscall before and after last two changes
> on defconfig kernel.

Hallelujah!

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/