riscv64/mmu: cache identity effective-address state#1007
Open
xiaokamikami wants to merge 1 commit into
Open
Conversation
NEMU Performance Results
|
041f529 to
a879a9e
Compare
NEMU Performance Results
|
Before this change, get_effective_address() re-derived the same common-case identity mapping from privilege and CSR state on every guest memory access. Most of those inputs only change at MMU or privilege state transitions. After this change, the MMU caches whether data effective-address translation is currently an identity mapping and refreshes that cache only when the relevant state changes. The hot path can now return after a cached boolean check. On linux/coremark-pro with the xs quick-profile flow, this change improved simulation frequency from 532,225,645 instr/s to 550,262,185 instr/s (+3.39%). Workload: ./build/riscv64-nemu-interpreter -b ./workloads/linux/coremark-pro/fw_payload.bin Co-authored-by: Yinan Xu <xuyinan@ict.ac.cn>
a879a9e to
d8e47c2
Compare
NEMU Performance Results - XS Interpreter
NEMU Performance Results - XS Ref Shared Object
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this change, get_effective_address() re-derived the same common-case identity mapping from privilege and CSR state on every guest memory access. Most of those inputs only change at MMU or privilege state transitions.
After this change, the MMU caches whether data effective-address translation is currently an identity mapping and refreshes that cache only when the relevant state changes. The hot path can now return after a cached boolean check.
On linux/coremark-pro with the xs quick-profile flow, this change improved simulation frequency from 532,225,645 instr/s to 550,262,185 instr/s (+3.39%).
Workload: ./build/riscv64-nemu-interpreter -b ./workloads/linux/coremark-pro/fw_payload.bin