linux_dsm_epyc7002/arch/x86
Denys Vlasenko 3304c9c37b x86/asm/entry/irq: Simplify interrupt dispatch table (IDT) layout
Interrupt entry points are handled with the following code,
each 32-byte code block contains seven entry points:

		...
		[push][jump 22] // 4 bytes
		[push][jump 18] // 4 bytes
		[push][jump 14] // 4 bytes
		[push][jump 10] // 4 bytes
		[push][jump  6] // 4 bytes
		[push][jump  2] // 4 bytes
		[push][jump common_interrupt][padding] // 8 bytes

		[push][jump]
		[push][jump]
		[push][jump]
		[push][jump]
		[push][jump]
		[push][jump]
		[push][jump common_interrupt][padding]

		[padding_2]
	common_interrupt:

And there is a table which holds pointers to every entry point,
IOW: to every push.

In cold cache, two jumps are still costlier than one, even
though we get the benefit of them residing in the same
cacheline.

This change replaces short jumps with near ones to
'common_interrupt', and pads every push+jump pair to 8 bytes. This
way, each interrupt takes only one jump.

This change replaces ".p2align CONFIG_X86_L1_CACHE_SHIFT" before
dispatch table with ".align 8" - we do not need anything
stronger than that.

The table of entry addresses (the interrupt[] array) is no
longer necessary, the address of entries can be easily
calculated as (irq_entries_start + i*8).

   text	   data	    bss	    dec	    hex	filename
  12546	      0	      0	  12546	   3102	entry_64.o.before
  11626	      0	      0	  11626	   2d6a	entry_64.o

The size decrease is because 1656 bytes of .init.rodata are
gone. That's initdata, though. The resident size does go up a
bit.

Run-tested (32 and 64 bits).

Acked-and-Tested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/1428090553-7283-1-git-send-email-dvlasenk@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-04-08 09:02:13 +02:00
..
boot x86/mm/KASLR: Propagate KASLR status to kernel proper 2015-04-03 15:26:15 +02:00
configs x86/kconfig/defconfig: Enable CONFIG_FHANDLE=y 2014-12-08 12:04:17 +01:00
crypto x86/asm: Replace "MOVQ $imm, %reg" with MOVL 2015-04-01 13:17:39 +02:00
ia32 x86/signal: Remove pax argument from restore_sigcontext 2015-04-06 09:06:39 +02:00
include x86/asm/entry/irq: Simplify interrupt dispatch table (IDT) layout 2015-04-08 09:02:13 +02:00
kernel x86/asm/entry/irq: Simplify interrupt dispatch table (IDT) layout 2015-04-08 09:02:13 +02:00
kvm KVM: x86: call irq notifiers with directed EOI 2015-03-23 20:29:05 -03:00
lguest x86/asm/entry/irq: Simplify interrupt dispatch table (IDT) layout 2015-04-08 09:02:13 +02:00
lib x86/asm: Optimize unnecessarily wide TEST instructions 2015-03-07 11:12:43 +01:00
math-emu asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
mm x86/asm/entry: Change all 'user_mode_vm()' calls to 'user_mode()' 2015-03-23 11:14:17 +01:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-12-10 15:48:20 -05:00
oprofile x86/asm/entry: Change all 'user_mode_vm()' calls to 'user_mode()' 2015-03-23 11:14:17 +01:00
pci Revert "x86/PCI: Refine the way to release PCI IRQ resources" 2015-03-20 14:56:19 +01:00
platform Merge branch 'linus' into x86/urgent, to merge dependent patch 2015-02-28 08:03:10 +01:00
power x86/asm/entry: Rename 'init_tss' to 'cpu_tss' 2015-03-06 08:32:58 +01:00
purgatory Merge branches 'x86-build-for-linus', 'x86-cleanups-for-linus' and 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 12:35:46 -08:00
realmode Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-16 14:58:12 -08:00
syscalls x86/asm/entry/64: Remove stub_iopl 2015-03-10 13:56:10 +01:00
tools x86, build: replace Perl script with Shell script 2015-01-26 13:37:18 -08:00
um x86/asm/entry/64: Remove stub_iopl 2015-03-10 13:56:10 +01:00
vdso x86/vdso: Fix the build on GCC5 2015-03-06 09:34:45 +01:00
video
xen Linux 4.0-rc7 2015-04-08 09:01:54 +02:00
.gitignore x86/build: Add arch/x86/purgatory/ make generated files to gitignore 2014-10-09 09:29:46 +02:00
Kbuild kexec: create a new config option CONFIG_KEXEC_FILE for new syscall 2014-08-29 16:28:16 -07:00
Kconfig x86/intel/quark: Select COMMON_CLK 2015-03-05 17:44:53 +01:00
Kconfig.cpu Merge branch 'x86-nuke-platforms-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 13:15:58 -07:00
Kconfig.debug x86/intel/quark: Add Isolated Memory Regions for Quark X1000 2015-02-18 23:22:47 +01:00
Makefile x86/raid6: correctly check for assembler capabilities 2015-02-04 08:35:51 +11:00
Makefile_32.cpu
Makefile.um kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion 2015-01-09 17:25:44 +01:00