linux/arch/x86
Takuya Yoshikawa b5c9ff731f KVM: x86 emulator: Avoid clearing the whole decode_cache
During tracing the emulator, we noticed that init_emulate_ctxt()
sometimes took a bit longer time than we expected.

This patch is for mitigating the problem by some degree.

By looking into the function, we soon notice that it clears the whole
decode_cache whose size is about 2.5K bytes now.  Furthermore, most of
the bytes are taken for the two read_cache arrays, which are used only
by a few instructions.

Considering the fact that we are not assuming the cache arrays have
been cleared when we store actual data, we do not need to clear the
arrays: 2K bytes elimination.  In addition, we can avoid clearing the
fetch_cache and regs arrays.

This patch changes the initialization not to clear the arrays.

On our 64-bit host, init_emulate_ctxt() becomes 0.3 to 0.5us faster with
this patch applied.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-07-12 11:45:09 +03:00
..
boot x86, setup: When probing memory with e801, use ax/bx as a pair 2011-04-25 14:52:37 -07:00
configs cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
crypto crypto: aesni-intel - fix aesni build on i386 2011-05-18 09:03:34 +10:00
ia32 ns: Wire up the setns system call 2011-05-28 10:48:39 -07:00
include/asm KVM: x86 emulator: Avoid clearing the whole decode_cache 2011-07-12 11:45:09 +03:00
kernel x86 idle: APM requires pm_idle/default_idle unconditionally when a module 2011-06-14 13:42:20 -07:00
kvm KVM: x86 emulator: Avoid clearing the whole decode_cache 2011-07-12 11:45:09 +03:00
lguest lguest: fix timer interrupt setup 2011-05-30 11:14:10 +09:30
lib Merge branches 'x86-apic-for-linus', 'x86-asm-for-linus' and 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-19 17:49:35 -07:00
math-emu
mm x86, efi: Do not reserve boot services regions within reserved areas 2011-06-18 22:48:49 +02:00
net net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
oprofile Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/urgent 2011-06-08 15:49:03 +02:00
pci Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-07-01 13:25:56 -07:00
platform x86, efi: Do not reserve boot services regions within reserved areas 2011-06-18 22:48:49 +02:00
power
tools
vdso x86: vdso: Remove unused variable 2011-05-26 13:17:35 +02:00
video
xen xen/mmu: Fix for linker errors when CONFIG_SMP is not defined. 2011-06-30 09:21:10 -04:00
.gitignore
Kbuild net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
Kconfig arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT} 2011-05-26 17:12:38 -07:00
Kconfig.cpu x86, cpu: Move AMD Elan Kconfig under "Processor family" 2011-04-08 13:01:25 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile
Makefile_32.cpu x86, cpu: Move AMD Elan Kconfig under "Processor family" 2011-04-08 13:01:25 -07:00