We (Wisconsin) are working on implementing atomics in Ruby.  For LL/SC, we
are going to stick with the implementation from the original GEM5 that
closely mimics how LL/SC is/was handled in the M5 cache.

For single instructions atomics (fetch&add, comp&swap, etc), we are thinking
about an implementation that just gives the processor priority at the cache
controller on the second half of a RMW, i.e., immediately after the read of
an RMW completes, we will make sure that the next message the cache
controller handles comes from the processor, which should be the RMW write.
For this to work, we have to guarantee that the next request from the cpu
model after an RMW read returns is the corresponding RMW write.  For Bochs
this is always true.  Is this also true in M5 (prefetches excluded, as we
can probably just deprioritize those)?

The benefit of this approach is that it does not require any changes to the
existing protocols.  The drawback is that it may not closely mimic what is
done in real hardware.  Does anyone have a better approach that would more
closely approximate a real implementation?

-Derek
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to