RFR (S) 8220350: Refactor ShenandoahHeap::initialize
Aleksey Shipilev
shade at redhat.com
Fri Mar 8 19:05:53 UTC 2019
On 3/8/19 7:45 PM, Zhengyu Gu wrote:
> On 3/8/19 12:14 PM, Aleksey Shipilev wrote:
>> Fix:
>> http://cr.openjdk.java.net/~shade/8220350/webrev.01/
>
> With large pages, there is a possibility that a single page can host multiple regions. Our region
> based commit/uncommit might not work in this scenario. Have you tested it?
This is handled already by rounding up region size to page size in ShenandoahHeapRegion::setup_sizes
(yes, it is awkward, but well...):
// Make sure region size is at least one large page, if enabled.
// Otherwise, uncommitting one region may falsely uncommit the adjacent
// regions too.
// Also see shenandoahArguments.cpp, where it handles UseLargePages.
if (UseLargePages && ShenandoahUncommit) {
region_size = MAX2(region_size, os::large_page_size());
}
I think it is tested by one of our regression tests.
> SH::initialize() still a 200 lines function, might be good to break it up, e.g. a method for each
> section? Otherwise, looks good.
Not here. I really need to push the other two bugfixes.
-Aleksey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20190308/fdca7be1/signature.asc>
More information about the hotspot-gc-dev
mailing list