linux-stable/arch/x86/ia32
Jan Beulich 46db09d3fd x86-64: Slightly shorten line system call entry and exit paths
GET_THREAD_INFO() involves a memory read immediately followed by
an "sub" on the value read, in turn (in several cases)
immediately followed by a use of the calculated value as the
base address of a memory access. This combination of
instructions has a non-negligible potential for stalls.

In the system call entry point code, however, the (fixed) offset
of the stack pointer from the end of the stack is generally
known, and hence we can instead avoid the memory load and
subtract, and instead do the memory reference using %rsp as the
base register. To do so in a legible fashion, introduce a
THREAD_INFO() macro which, provided a register (generally %rsp)
and the known offset from the end of the stack, produces a
suitable memory access operand.

The patch attempts to only touch the fast paths (no auditing and
alike), but manages to do so only in the 64-bit entry point
case; the compatibility mode entry points have so many
interdependencies between their various branch targets that it
was necessary to also adjust the slow paths to eliminate the
risk of having missed some register dependency during code
analysis.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/4ED4CD690200007800064075@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-12-05 17:24:41 +01:00
..
audit.c x86: coding style fixes in arch/x86/ia32/audit.c 2008-01-30 13:32:54 +01:00
ia32_aout.c x86: mark associated mm when running a task in 32 bit compatibility mode 2011-03-23 16:36:53 -04:00
ia32_signal.c x86, signals: Convert the IA32_EMULATION code to use set_current_blocked() 2011-07-14 21:21:31 -07:00
ia32entry.S x86-64: Slightly shorten line system call entry and exit paths 2011-12-05 17:24:41 +01:00
ipc32.c x86: introducing asm/sys_ia32.h 2008-12-29 13:18:40 +01:00
Makefile x86: compat_binfmt_elf 2008-01-30 13:31:55 +01:00
sys_ia32.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00