Unnecessary CAS with multiple collector threads attempting to forward

Description

attemptToForward(ObjectReference) in org.mmtk.utility.ForwardingWord should return the existing object statusWord if the object attempting to be forwarding is already marked BEING_FORWARDED instead of attempting to CAS BEING_FORWARDED into the statusWord. Whilst this is safe because callers of attemptToForward check the returned (previous) value of statusWord and do not double forward the object it generates unnecessary memory traffic.

Environment

None

Assignee

Erik Brangs

Reporter

Laurence Hellyer

Labels

None

Components

Fix versions

Affects versions

Priority

Low
Configure