> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Subject: Re: RV-Predict bugs

> I don't see why a thread would read one value from memory and then have
> that value change locally without going back to main memory.

The point that was trying to be made was that independent reads could be issued 
for the field, and that those reads are not necessarily ordered.  This would 
allow the second (in program order) read to observe an older value for the 
field.  However, that argument ignored the fact that if the first read observed 
a null (or zero), it would trigger action that invalidated the second read.  
The compiler (JIT) cannot move the second read to a spot prior to the first due 
to the potential of an intervening write.  An x86 CPU could move the read, but, 
if the write occurred, store forwarding would be used to update the second read 
before the value is materialized by instruction retirement.

> I don't think that T2 can read non-null and then later read null given
> the code we are discussing.

Correct - program order would be violated.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to