-
Notifications
You must be signed in to change notification settings - Fork 100
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
Manage basic block with adaptive replacement cache #105
Comments
To manage basic blocks, this commit implements the Adaptive Replacement Cache (ARC) and basic profiling tools to show cache information. However, even if a cache hit rate of running
|
You should check memory usage for each RISC-V emulation-related process. Considering that CoreMark has fixed allocations, it might not be an appropriate goal. Choose some from the "tests" directory, such as |
Coremark created the most blocks after examining the number of creating blocks among test cases. As a result, I continue to use Coremark as a test target. The following data generated by Valgrind shows a memory usage analysis while running Coremark. The difference in total heap usage between commit 72bbb63 and commit which ARC is approximately 20%.
|
Furthermore, let's shrink memory utilization by removing blocks with too few instructions. |
To manage block efficiently and lower the memory usage, I implement two mechanisms.
The following data compared the performance and memory usage among baseline and these two mechanisms. Benchmark tool CoreMark generated performance data, and Valgrind shows a memory usage analysis while running Coremark.
The statistics demonstrated that there is just a 1–7% performance reduction while we save more than 52 times (42MB to 805 KB) the memory usage if we combines these two mechanisms. |
It looks promising. Let's concentrate on this approach. Do evaluate #94 for deterministic memory pool implementation. |
Once we refine the implementation for the combination of code block caching and memory pool, we can move on #104 for EBB exploration. |
Considered as completed. |
Current basic block management consumes a significant amount of memory, which leads to unnecessary waste due to frequent map allocation and release. Adaptive Replacement Cache (ARC) is a page replacement algorithm with better performance than least recently used (LRU). Better memory usage and hit rates can be achieved after the translated blocks are handled by ARC by keeping track of frequently used and recently used pages as well as a recent eviction history for both.
Quote from ZFS Caching:
Expected output:
Reference:
The text was updated successfully, but these errors were encountered: