RFR: 8079315: UseCondCardMark broken in conjunction with CMS precleaning

Mikael Gerdin mikael.gerdin at oracle.com
Wed May 6 13:52:32 UTC 2015


Hi Vitaly,

On 2015-05-06 14:41, Vitaly Davidovich wrote:
> Mikael's suggestion was to make mutator check for !clean and then mark
> dirty.  If it sees stale dirty, it will write dirty again no?  Today's code
> would have this problem because it's checking for !dirty, but I thought the
> suggested change would prevent that.

Unfortunately I don't think my suggestion would solve anything.

If the conditional card mark would write dirty again if it sees a stale 
dirty it's not really solving the false sharing problem.

The problem is not the value that the precleaner writes to the card 
entry, it's that the mutator may see the old "dirty" value which was 
overwritten as part of precleaning but not necessarily visible to the 
mutator thread.

/Mikael


>
> sent from my phone
> On May 6, 2015 4:53 AM, "Andrew Haley" <aph at redhat.com> wrote:
>
>> On 05/05/15 20:51, Vitaly Davidovich wrote:
>>> If mutator doesn't see "clean" due to staleness, won't it just mark it
>>> dirty "unnecessarily" using Mikael's suggestion?
>>
>> No.  The mutator may see a stale "dirty" and not write anything.  At least
>> I haven't seen anything which certainly will prevent that from happening.
>>
>> Andrew.
>>
>>
>>


More information about the hotspot-gc-dev mailing list