[PATCH] 7189971: Implement CMSWaitDuration for non-incremental mode of CMS

Srinivas Ramakrishna ysr1729 at gmail.com
Thu Aug 30 08:05:52 UTC 2012


Hi Michal -- Thanks so much for the patch... (hopefully you have or will
complete the contributor agreement that will allow the patch to be used). I
will definitely try and review the patch over the next day or two as soon
as i find a few spare cycles.

thanks!
-- ramki

On Mon, Aug 27, 2012 at 10:17 AM, Michal Frajt <michal at frajt.eu> wrote:

>  Hi Ramki / Jon,
>
> Please find the patch for the CMSWaitDuration unstable behavior issue. The
> patch keeps the method wait_on_cms_lock untouched for the calls from the
> abortable_preclean phase (not very correct behaviour but still acceptable
> for the abortable preclean 'short break' calls between the preclean work
> iterations). The new method wait_on_cms_lock_for_scavenge has been added.
> The method monitors the CGC_lock for notifications, handles the full wait
> time interval, checks the scavenge occurrence by the total_collections
> counter changing its value. When reviewing please mind that the allowed
> locking order in the CMS thread should be FreelistHolder -> Heap_lock ->
> CGC_lock (based on a source code comment but the collect_in_background
> method is using reverted order between the Freelist and the Heap_lock ??).
> The sleepBeforeNextCycle method is now using the new
> wait_on_cms_lock_for_scavenge method for both the normal and the
> incremental CMS mode.
>
> The patch has been prepared for the openjdk6 and openjdk7u. The openjdk6
> got compiled and tested on solaris-amd64 platform. The openjdk7u got
> compiled without much testing (we have jdk6 application environment only).
>
> You additionally suggested to have an explicit flag such as
> CMSScavengeBeforeInitialMark. I already replied to it but it did not get
> into the posting list (sent from another email address). The idea of the
> CMSScavengeBeforeInitialMark could be easier to implement but we strongly
> prefer not to invoke yet another scavenge explicitly as it is unbalancing
> young objects aging and leads to unwanted promotions. I could think about a
> combined solution when it first waits for the CMSWaitDuration and, if there
> is no scavenge occurring, it is explicitly invoking a scavenge before the
> inital-mark phase (or better pause) starts.
>
> Regards,
> Michal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20120830/76fb2427/attachment.htm>


More information about the hotspot-gc-dev mailing list