All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] target-arm: cache tbflags in CPUARMState
@ 2016-09-14  9:56 Paolo Bonzini
  2016-09-14  9:56 ` [Qemu-devel] [PATCH 1/3] target-arm: introduce cpu_dynamic_tb_cpu_flags Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Paolo Bonzini @ 2016-09-14  9:56 UTC (permalink / raw)
  To: qemu-devel

Computing TranslationBlock flags is pretty expensive on ARM, especially
32-bit.  Because tbflags are computed on every tb lookup, it is not
unlikely to see cpu_get_tb_cpu_state close to the top of the profile
now that QHT makes the hash table much more efficient.

However, most tbflags only change when the EL is switched or after
MSR instructions.  Based on this observation, this series caches these
tbflags in CPUARMState, resulting in a 10-15% speedup on 32-bit code.

Paolo

Paolo Bonzini (3):
  target-arm: introduce cpu_dynamic_tb_cpu_flags
  target-arm: add env->tbflags
  target-arm: cache most tbflags

 target-arm/cpu.c           |  2 ++
 target-arm/cpu.h           | 58 ++++++++++++++++++++++++++++++++--------------
 target-arm/helper.c        |  2 ++
 target-arm/helper.h        |  1 +
 target-arm/op_helper.c     |  7 ++++++
 target-arm/translate-a64.c |  4 ++++
 target-arm/translate.c     | 12 ++++++++--
 target-arm/translate.h     |  1 +
 8 files changed, 68 insertions(+), 19 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2016-11-10 13:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14  9:56 [Qemu-devel] [PATCH 0/3] target-arm: cache tbflags in CPUARMState Paolo Bonzini
2016-09-14  9:56 ` [Qemu-devel] [PATCH 1/3] target-arm: introduce cpu_dynamic_tb_cpu_flags Paolo Bonzini
2016-09-14  9:56 ` [Qemu-devel] [PATCH 2/3] target-arm: add env->tbflags Paolo Bonzini
2016-09-26 22:00   ` Peter Maydell
2016-09-27  8:15     ` Paolo Bonzini
2016-09-14  9:56 ` [Qemu-devel] [PATCH 3/3] target-arm: cache most tbflags Paolo Bonzini
2016-09-26 10:04 ` [Qemu-devel] [PATCH 0/3] target-arm: cache tbflags in CPUARMState Laurent Desnogues
2016-09-26 11:13   ` Laurent Desnogues
2016-11-10 11:42 ` Alex Bennée
2016-11-10 12:19   ` Paolo Bonzini
2016-11-10 13:37     ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.