<font size=2 face="sans-serif">Hi Thomas, David, and all,</font><br><br><font size=2 face="sans-serif">> I think you intended to modify
cmpxchg_pre_membar not </font><br><font size=2 face="sans-serif">> cmpxchg_post_membar!</font><br><br><font size=2 face="sans-serif">The previous patch will change only
behavior of cmpxchg_pre_membar. But the patch is not good to be reviewed
(it was not obvious) and Martin suggested me to use lwsync rather than
sync. </font><br><font size=2 face="sans-serif">I created a new webrev. This webrev
includes all points that David and Thomas pointed also.</font><br><br><a href=http://cr.openjdk.java.net/~horii/8154736/webrev.05/><font size=2 color=blue face="sans-serif">http://cr.openjdk.java.net/~horii/8154736/webrev.05/</font></a><br><br><font size=2 face="sans-serif">With this change, callers of copy_to_survivor_space
can safely touch fields of returned obj because OrderAccess::acquire()
is called in copy_to_survivor_space when CAS fails.</font><br><br><font size=2 face="sans-serif">> Changes in shared code must be
algorithmically correct on all platforms. </font><br><font size=2 face="sans-serif">> Not just "it will work fine
today".</font><br><font size=2 face="sans-serif">> </font><br><font size=2 face="sans-serif">> Given all then work being done
to add missing barriers, removing them </font><br><font size=2 face="sans-serif">> must come with a detailed analysis
establishing the safety of doing so. </font><br><font size=2 face="sans-serif">> And I am not seeing that here.</font><br><br><font size=2 face="sans-serif">The latest codes in the repository are
missing some calls of OrderAccess::acquire() before touching fileds of
new_obj or o->forwardee() in PSPromotionManager::copy_and_push_safe_barrier
and copy_to_survivor_space respectivey. I believe, this webrev correct
them, also.</font><br><br><font size=2 face="sans-serif">Some methods call forwardee(). However,
they don't toruch fields of forwardee while copying survived objects to
a survivor space.</font><br><font size=2 face="sans-serif">  PSMarkSweepDecorator::compact()</font><br><font size=2 face="sans-serif">  PSPromotionManager::process_array_chunk()</font><br><font size=2 face="sans-serif">  PSPromotionManager::claim_or_forward_internal_depth()</font><br><br><font size=2 face="sans-serif">Regards,<br>Hiroshi<br>-----------------------<br>Hiroshi Horii, Ph.D.<br>IBM Research - Tokyo<br></font><BR>