RFR: Hint unused regions instead of uncommit them
Zhengyu Gu
zgu at redhat.com
Wed Jan 17 21:59:17 UTC 2018
On 01/16/2018 06:49 AM, Aleksey Shipilev wrote:
> On 01/15/2018 06:21 PM, Zhengyu Gu wrote:
>> This patch adds new experimental flag ShenandoahIdleRegions (default to false) to hint kernel that
>> the regions are not needed (vs. madvise(MADV_DONTNEED), instead of proactively uncommitting.
>>
>> It appears that does have advantage over uncommitting regions, although, not by as much as I was
>> expected.
>>
>> SPECjbb2015:
>>
>> Baseline:
>> RUN RESULT: hbIR (max attempted) = 59167, hbIR (settled) = 51984, max-jOPS = 47925, critical-jOPS =
>> 19108
>>
>> -XX:ShenandoahUncommitDelay=0 -XX:-ShenandoahIdleRegions
>> RUN RESULT: hbIR (max attempted) = 41119, hbIR (settled) = 36501, max-jOPS = 30839, critical-jOPS =
>> 8841
>>
>> -XX:ShenandoahUncommitDelay=0 -XX:+ShenandoahIdleRegions
>> RUN RESULT: hbIR (max attempted) = 49322, hbIR (settled) = 42968, max-jOPS = 35019, critical-jOPS =
>> 9283
>>
>>
>> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/idle_region/webrev.00/
>
> As I read MADV_DONTNEED man page and the explanations of different kernel people, I am getting
> uneasy using this. madvise call that basically corrupts memory, say what? And it also does not
> support large pages...
>
> It _maybe_ makes sense to optionally support this, but only if we make the code changes minimal. It
> looks like the fair bit of complexity comes from the attempt to fallback to commit/uncommit when
> idling fails. Could we just test that idle/activate_memory works, and select one of the options
> without fallback? E.g. when ShenandoahIdleRegions is true, LargePages is false, and idling works,
> make do_commit/do_uncommit only do idle_memory/activate_memory, and fail hard when idle_memory
> returns false. You would not need the _idle_region flag too then.
Okay, made it fatal if can not idle the region.
Updated webrev:
http://cr.openjdk.java.net/~zgu/shenandoah/idle_region/webrev.01/
Test:
hotspot_gc_shenandoah (fastdebug + release)
Manual test to verify large pages are actually used.
Thanks,
-Zhengyu
>
> Thanks,
> -ALeksey
>
More information about the shenandoah-dev
mailing list