Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase TLB size to 64 #498

Merged
merged 1 commit into from
Jul 15, 2024

Commits on Jul 4, 2024

  1. Increase TLB size to 64

    This has a very significant effect on the emulator performance with virtual memory enabled (e.g. when booting Linux).
    
    Having a more realistic TLB can also help expose bugs, like the recent bug in riscv#496. For example with a larger TLB you can add an assertion in `translate()`. It also allows you to detect missing `sfence.vma`s in software by asserting that the TLB translation is the same as the uncached translation. This is not implemented in this change but we can do it in future (or you can just hack it in when needed). The detection will never be 100% but the bigger the TLB the more missing fences you will detect.
    
    64 was chosen based on benchmarks I did last year. Performance when booting Linux keeps going up until you get to 64.
    Timmmm committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    be3f3b1 View commit details
    Browse the repository at this point in the history