CMS parallel initial mark; vm thread sneaking in Thread::try_lock()

Jon Masamitsu jon.masamitsu at oracle.com
Fri Jun 28 07:02:06 UTC 2013


Hiroshi,

I've imported the patches and started some testing.
We've got it from here.

Thanks.

Jon

On 6/27/2013 4:06 PM, Hiroshi Yamauchi wrote:
> OK. Here are updated webrevs that have been rebased to the latest
> hotspot-gc:
>
>    http://cr.openjdk.java.net/~hiroshi/webrevs/cmsparinitmark/webrev.03/
>    http://cr.openjdk.java.net/~hiroshi/webrevs/edenchunks/webrev.02/
>
> These were created from uncommitted changes in my local repositories.
>
> With regard to the order to apply these patches, I think they can go in
> either order, but applying cmsparinitmark first and edenchunks second
> worked for me.
>
> Let me know if there's more to do.
>
> Thanks.
>
>
>
> On Wed, Jun 26, 2013 at 1:02 PM, Jon Masamitsu <jon.masamitsu at oracle.com>wrote:
>
>> Hiroshi,
>>
>> Could you update your repositories to the latest hotspot-gc and
>> send me the patches?  I'll import them into a repository and
>> push it (if I don't see any further comments).
>>
>> Thanks.
>>
>> Jon
>>
>>
>> On 6/25/2013 7:05 PM, Hiroshi Yamauchi wrote:
>>
>>> Here's an updated webrev:
>>> http://cr.openjdk.java.net/~**hiroshi/webrevs/edenchunks/**webrev.01/<http://cr.openjdk.java.net/~hiroshi/webrevs/edenchunks/webrev.01/>
>>>
>>> Let me know if there are more comments.
>>>
>>>
>>> On Fri, Jun 21, 2013 at 3:50 PM, Jon Masamitsu <jon.masamitsu at oracle.com>
>>> **wrote:
>>>
>>>   Yes, remove the assert.
>>>> Jon
>>>>
>>>>
>>>> On 6/19/2013 10:39 AM, Hiroshi Yamauchi wrote:
>>>>
>>>>   Now, if I comment out the assert, it seems to work (though I haven't
>>>>>> tested it very long.) This may be good if in fact sneak won't happen
>>>>>>> with try_lock()/unlock() only.
>>>>>>>
>>>>>>> I haven't tried this, but another potential approach might be to give
>>>>>>> up sampling (just return) if it's called by the VM thread at a
>>>>>>> safepoint, though the VM thread might allocate a large object, and the
>>>>>>> evenness of the sample distribution could suffer to some extent.
>>>>>>>
>>>>>>>   I'd just remove the assert :)
>>>>>> As already mentioned multiple times, try_lock() does never actually
>>>>>> block the thread, so the vm thread cannot actually sneak, as you
>>>>>> already
>>>>>> noticed in your question to David, and he confirmed. The guarded code
>>>>>> can also never block, it's just a few assignments.
>>>>>>
>>>>>>    Removing the assert sounds good to me.
>>>>>>
>>>>> Jon, what do you think?
>>>>>
>>>>>
>>>>>




More information about the hotspot-gc-dev mailing list