From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org, bsd@redhat.com
Subject: [RFC PATCH 0/4] KVM: emulator: speed up instruction fetch
Date: Tue, 6 May 2014 20:16:11 +0200 [thread overview]
Message-ID: <1399400175-23754-1-git-send-email-pbonzini@redhat.com> (raw)
This small series provides another ~6% speedup on top of Bandan's patches.
It does so by speeding up instruction fetches. The three tricks, one per
patch, are to help the compiler a bit by redistributing the work between
do_insn_fetch_byte and do_insn_fetch, to avoid repeated checks on the
boundary of the fetch cache, and to exploit the processor's support for
unaligned accesses.
Before:
819 cycles/emulated jump instruction
1020 cycles/emulated move instruction
1026 cycles/emulated arithmetic instruction
1264 cycles/emulated memory load instruction
1182 cycles/emulated memory store instruction
1299 cycles/emulated memory RMW instruction
After:
771 cycles/emulated jump instruction
963 cycles/emulated move instruction
960 cycles/emulated arithmetic instruction
1192 cycles/emulated memory load instruction
1110 cycles/emulated memory store instruction
1228 cycles/emulated memory RMW instruction
Paolo Bonzini (4):
KVM: emulate: speed up do_insn_fetch
KVM: emulate: avoid repeated calls to do_insn_fetch_bytes
KVM: emulate: avoid per-byte copying in instruction fetches
KVM: emulate: put pointers in the fetch_cache
arch/x86/include/asm/kvm_emulate.h | 4 +-
arch/x86/kvm/emulate.c | 97 ++++++++++++++++++++------------------
arch/x86/kvm/trace.h | 6 +--
3 files changed, 57 insertions(+), 50 deletions(-)
--
1.8.3.1
next reply other threads:[~2014-05-06 18:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 18:16 Paolo Bonzini [this message]
2014-05-06 18:16 ` [RFC PATCH 1/4] KVM: emulate: speed up do_insn_fetch Paolo Bonzini
2014-05-07 2:30 ` Bandan Das
2014-05-07 8:32 ` Paolo Bonzini
2014-05-06 18:16 ` [RFC PATCH 2/4] KVM: emulate: avoid repeated calls to do_insn_fetch_bytes Paolo Bonzini
2014-05-07 4:21 ` Bandan Das
2014-05-07 8:34 ` Paolo Bonzini
2014-05-06 18:16 ` [RFC PATCH 3/4] KVM: emulate: avoid per-byte copying in instruction fetches Paolo Bonzini
2014-05-07 4:36 ` Bandan Das
2014-05-07 8:40 ` Paolo Bonzini
2014-05-06 18:16 ` [RFC PATCH 4/4] KVM: emulate: put pointers in the fetch_cache Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399400175-23754-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=bsd@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®