-
Notifications
You must be signed in to change notification settings - Fork 738
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
WIP: Reuse free memory from GMP in PGC #7032
WIP: Reuse free memory from GMP in PGC #7032
Conversation
296c5ca
to
dd40227
Compare
0c8b966
to
cfc3529
Compare
94d1b3e
to
64919a2
Compare
9b34fcd
to
065cb69
Compare
a4b1b45
to
a650bab
Compare
7fdef45
to
be49889
Compare
be49889
to
407809a
Compare
b6464fb
to
9350ed6
Compare
220cde1
to
ec68936
Compare
40335ae
to
07afe12
Compare
Region tail point to the last free space which connect to region top, can be reused as survivor or tenure space during copyforward. the first sweep after GMP does reset all of region tails. recover region tails during post-sweep could reduce copyforward abort cases furthermore the largest free space inside region(if it is not tail) can be used during collector allocation. the free list has been created during the sweep after GMP, but in order to keep collector allocation simple and efficient, only region tail and the largest free space would be used during collector allocation. - New XXgc:tarokEnableRecoverRegionTailsAfterSweep option for enabling region tail recovery(default == false). - New XXggc:tarokEnableRecoverRegionLargestFreeMemory option for enabling region largest free memory recovery(default == false). the option would be ignored if tarokEnableRecoverRegionTailsAfterSweep is disabled. - New XXgc:tarokEnableAllocationPointerAssertion option for enabling recovered tail verification(default == false). - Maintain free list during sweep for MemoryPoolBumpPointer. - Maintain last free entry during sweep for MemoryPoolBumpPointer. - Maintain largest free entryt sweep for MemoryPoolBumpPointer. - Recover region tail from last free entry. - Verify recovered region tail via reverse searching markmap - Align recovered tail and the largest free memory with the card and clear card for the free spaces. - Reuse the regions with the largest free memory first, then try to reuse the regions with free tail only before using free regions. - Still using region base lock for the allocation synchronization, for the region with both largest free memory and region tail, only can be used by one thread at the same time. debug -- disable arraylet Signed-off-by: Lin Hu <linhu@ca.ibm.com>
07afe12
to
b0f38da
Compare
These changes are very good from a perspective that you've identified all spots that are affected due to attempt to use free memory, not just from the tail. However, they are restrictive since you've only try to identify one additional (largest) free entry (while there could be several medium to large free entries in a region). It adds more complexity (duplication) in code since you have to separately deal with largest free entry and tail. So, let's separately try (leave this code as-is for now, and create a new branch) to generalize things and try to completely replace MP Bump Pointer with MP Address Ordered List and try to reuse any largish free entry. Let's complete remove a notion of a free tail (candidate region), and deal with free memory (candidate region). Some things should get simpler (relative to this approach), like no 2 separate cases to deal with, but for sure some things might get more complex like overkill complexity of AOL for Mutator allocation from Eden regions that effectively always have only a tail. Then, we'll compare them and see what's better (code wise and perf wise). |
Can one of the admins verify this patch? |
close this PR, #11862 is better replacement solution. |
Step1: Recover Region tails during post-sweep of GMP and Reuse them during PGC
Recover tail point to the last freespace which connect to region top,
can be reused as survivor or tenure space during copyforward.
the first sweep after GMP does reset all of region tails.
recover region tails during post-sweep could reduce copyforward
abort cases.
Step2:Reuse the largest free memory from GMP in PGC
The largest free space inside region(if it is not tail) can be used during
collector allocation. the free list has been created during the sweep after GMP,
but in order to keep collector allocation simple and efficient, only region tail
and the largest free space would be used during collector allocation.
Signed-off-by: Lin Hu linhu@ca.ibm.com
depends on eclipse-omr/omr#4284
depends on #8804
depends on eclipse-omr/omr#5514