Loop strip mining to decreases safepoint poll frequency

Aleksey Shipilev shade at redhat.com
Tue Feb 28 13:17:38 UTC 2017


On 02/28/2017 01:35 PM, Roland Westrelin wrote:
>> My concern is that latency-oriented people do run with -XX:+UseCLS in their
>> configurations, and current patch seems to disable loop strip mining for them!
> 
> I don't have a strong opinion on this. C2 now ignores UseCLS entirely
> and only checks LSM:
> 
> LSM=0, no safepoint = -XX:-UseCLS
> LSM=1, safepoint in every iteration = -XX:+UseCLS
> LSM>1, strip mining

I would like to keep UseCLS to pretend to be "independent". E.g. UseCLS enables
safepoints in counted loops, and LSM>1 additionally strip mines the loops.
Regardless what the actual implementation is doing, the saner interface seems
better if done like that.

Do we foresee loop strip mining to be useful for something else besides
safepoint poll improvements? If so, untying their respective options make even
more sense.

> so argument parsing is expected to adjust the LSM value from the UseCLS
> value and what you're suggesting translates to:
> 
>   if (UseCountedLoopSafepoints && LoopStripMiningIter == 0) {
>     LoopStripMiningIter = 1;
>   } else if (!UseCountedLoopSafepoints && LoopStripMiningIter > 0) {
>     LoopStripMiningIter = 0;
>   }

Yes, and keep setting UseCLS and LoopStripMiningIter to "true" and "1000" for
Shenandoah.

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list