Ruby: Update backing store option to propagate through to all RubyPorts
Review Request #2627 - Created Feb. 4, 2015 and submitted
| Information | |
|---|---|
| Jason Lowe-Power | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10681:b2dc4aee1a0d --------------------------- Ruby: Update backing store option to propagate through to all RubyPorts Previously, the user would have to manually set access_backing_store=True on all RubyPorts (Sequencers) in the config files. Now, instead there is one global option that each RubyPort checks on initialization.
Posted (Feb. 5, 2015, 12:25 a.m.)
-
src/mem/ruby/system/DMASequencer.hh (Diff revision 1) -
Can we not get this through the sequencer rather?
-
src/mem/ruby/system/DMASequencer.cc (Diff revision 1) -
Should this really be functional, or should it just be "access"?
-
src/mem/ruby/system/RubySystem.py (Diff revision 1) -
I find the description rather misleading. In essence it is not the case of bypassing the interconnect, it is more a case of duplicating the memory, and ignoring the "normal" one. Thinking about it, why do we not just use the actual memory, but do so by faking it through system->getPhysMem().access(...)
-
src/mem/ruby/system/System.hh (Diff revision 1) -
const
-
src/mem/ruby/system/System.hh (Diff revision 1) -
const
LGTM
LGTM, also. I don't think it should be addressed in this patch, but I'm making notes here as a vision for how I think we should proceed with these backing store and protocol developments: Really what we're capturing with the backing store option is whether a Ruby coherence protocol requires the backing store, but *not* that the RubySystem needs it for any fundamental reason. In other words, requiring a backing store is a property of a particular coherence protocol implementation rather than the overall RubySystem. We've noted previously that protocol implementations can require backing store if they are not known to correctly buffer data in the cache controllers, or if they implement some functionality that cannot be easily modeled without a backing store (e.g. slim GPU atomics). The last couple changes to backing stores are major steps in the right direction: we've reduced the backing store specifier to a single option, rather than the prior structure, which disaggregated the variable and required that the programmer set the option on each of the RubySequencers (previously 'access_phys_mem'). However, the ultimate solution *should* be that each coherence protocol implementation specifies whether it requires the backing store. To this end, I propose that the next step for development on this should be to create an abstract Python wrapper object for Ruby protocol implementations that embeds this "requires backing store" property as a variable. All Ruby protocols could descend from that wrapper object, and we could handle the protocol as a Python object in config files rather than using the ugly Python exec calling convention we have in Ruby.py currently. If the protocol requires the backing store, Ruby should check for the requirement (e.g. accessor function in the abstract Python protocol object) and set up the backing store without the need for any command line parameters. If a developer decides to validate a protocol as "data correct", s/he would simply set the "requires backing store" variable to False for that protocol when the validation is completed.
Review request changed
Updated (Feb. 9, 2015, noon)
Posted (Feb. 9, 2015, 1:43 p.m.)
-
src/mem/ruby/system/System.cc (Diff revision 4) -
This doesn't seem right. m_phys_mem is SimpleMemory type, which inherits empty serialize()/unserialize() functions from the Serializable class. Thus, this code doesn't do anything except add the fake backing store header to the checkpoint. Can you elaborate on the situation that suggested you needed this?
-
src/mem/ruby/system/System.cc (Diff revision 4) -
This is a problematic way to do this. If the checkpoint was taken with a coherence protocol that did not require the fake functional backing store, but you're restoring into a protocol that requires it, then m_phys_mem would not have been serialized and cannot be unserialized here. You'd run into the panic that the fake functional store do not exist in the checkpoint. To resolve this: If something has changed so that we actually do need to serialize the fake functional store (again, I don't understand why), you should probably just serialize out the m_access_backing_store variable and unserialize it to check whether a fake functional store was saved when taking the checkpoint. If it wasn't serialized out, you can't restore it.
Review request changed
Updated (Feb. 10, 2015, 8:02 a.m.)
