summaryrefslogtreecommitdiffstats
path: root/cpus.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-03-01 14:18:24 +0800
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:12 -0600
commitb527bb9200ccaaf0afcc83c13a34ee7bf2d28438 (patch)
tree2285e7770378832466798031b167e6f4c73c0528 /cpus.c
parent74f8e4eb79703798d61775c6b3df40ba700b5916 (diff)
downloadhqemu-b527bb9200ccaaf0afcc83c13a34ee7bf2d28438.zip
hqemu-b527bb9200ccaaf0afcc83c13a34ee7bf2d28438.tar.gz
exec: Introduce AddressSpaceDispatch.mru_section
Under heavy workloads the lookup will likely end up with the same MemoryRegionSection from last time. Using a pointer to cache the result, like ram_list.mru_block, significantly reduces cost of address_space_translate. During address space topology update, as->dispatch will be reallocated so the pointer is invalidated automatically. Perf reports a visible drop on the cpu usage, because phys_page_find is not called. Before: 2.35% qemu-system-x86_64 [.] phys_page_find 0.97% qemu-system-x86_64 [.] address_space_translate_internal 0.95% qemu-system-x86_64 [.] address_space_translate 0.55% qemu-system-x86_64 [.] address_space_lookup_region After: 0.97% qemu-system-x86_64 [.] address_space_translate_internal 0.97% qemu-system-x86_64 [.] address_space_lookup_region 0.84% qemu-system-x86_64 [.] address_space_translate Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1456813104-25902-8-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud