kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Emulator speedups - avoid initializations where possible
@ 2014-04-03 22:27 Bandan Das
  2014-04-03 22:27 ` [RFC PATCH 1/2] KVM: emulate: move init_decode_cache to emulate.c Bandan Das
  2014-04-03 22:27 ` [RFC PATCH 2/2] KVM: emulate: clean up initializations in init_decode_cache Bandan Das
  0 siblings, 2 replies; 4+ messages in thread
From: Bandan Das @ 2014-04-03 22:27 UTC (permalink / raw)
  To: kvm; +Cc: linux-kernel, Paolo Bonzini

While initializing emulation context structure, kvm memsets to 0 a 
number of fields some of which are redundant since they get set eventually.
This patch attempts at avoiding some of them.

Here are some before/after numbers on a Haswell host
Note : The before numbers already include Paolo's RFC posted here :
http://comments.gmane.org/gmane.linux.kernel/1676101

Before:
667 cycles/emulated jump instruction
839 cycles/emulated move instruction
892 cycles/emulated arithmetic instruction
995 cycles/emulated memory load instruction
1026 cycles/emulated memory store instruction
1022 cycles/emulated memory RMW instruction

After:
639 cycles/emulated jump instruction
786 cycles/emulated move instruction
802 cycles/emulated arithmetic instruction
936 cycles/emulated memory load instruction
970 cycles/emulated memory store instruction
1000 cycles/emulated memory RMW instruction

Bandan Das (2):
  KVM: emulate: move init_decode_cache to emulate.c
  KVM: emulate: clean up initializations in init_decode_cache

 arch/x86/include/asm/kvm_emulate.h | 17 +++++++------
 arch/x86/kvm/emulate.c             | 49 ++++++++++++++++++++++++++++++++++++++
 arch/x86/kvm/x86.c                 | 13 ----------
 3 files changed, 59 insertions(+), 20 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-04  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-03 22:27 [RFC PATCH 0/2] Emulator speedups - avoid initializations where possible Bandan Das
2014-04-03 22:27 ` [RFC PATCH 1/2] KVM: emulate: move init_decode_cache to emulate.c Bandan Das
2014-04-03 22:27 ` [RFC PATCH 2/2] KVM: emulate: clean up initializations in init_decode_cache Bandan Das
2014-04-04  9:47   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).