-
Notifications
You must be signed in to change notification settings - Fork 78
Replace FragmentedMapper with TwoLevelMmapper #1337
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
base: master
Are you sure you want to change the base?
Conversation
This is a replacement for `FragmentedMapper`. It does not use hash tables and is lock-free when looking up or lazily initializing the slabs table. It is intended to eliminate the pathological case of `FragmentedMapper` where a hash collision can result in many locking operations to find the matching or vacant slab table entry.
FragmentedMapper was FragmentedMmapper in JikesRVM. FragmentedMapper may be a misnomer introduced when porting it to Rust.
The hash table design should have been a mistake. Now that we are going to replace it, we replace it completely.
x86_64 actualy has 47 bit address space for the user.
The current implememntation only has two levels. We leave the name "MultiLevelMmapper" to a true multi-level implementation in the future.
This PR is intended as a quick fix for the pathological case of |
With this PR applied, the I also ran some benchmarks on VO bit linear scanning for internal pointers. The data is shown in #1341 (comment). In short, this PR greatly improves the performance of internal pointer checks. |
It will never be destructed because TwoLevelMmapper is a global singleton and it only monotonically allocates new stubs. But we still add support for dropping for completeness.
Here are benchmark results of running several benchmarks in the DaCapo Chopin benchmark suite. I compared the master branch and this PR. They are run on vole.moma, 10 invocations each, at 2.4x min heap size (w.r.t. G1 in OpenJDK), with 5 plans, all using compressed oops. Each data in the plots below is the relative value of this PR compared to the master branch (i.e. >1 means slowdown). The effect of this PR on the times (total time, STW time and other time) is uncertain. Certain benchmark+plan combinations have speed-up and others have slow-down. GenCopy, for example, has the best relative STW time in |
This PR replaces
FragmentedMapper
withTwoLevelMmapper
.TwoLevelMmapper
does not use hash tables. It is also lock-free when looking upMapState
entries, and also lock-free when lazily initializing slabs. It is intended to eliminate the pathological case ofFragmentedMapper
where a hash collision can result in a long-distance linear scan and many locking operations.Fixes: #1336