O3 LSQ: Implement TSO
Review Request #908 - Created Nov. 14, 2011 and submitted
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 8702:9a5651e7bd5b --------------------------- O3 LSQ: Implement TSO This patch makes O3's LSQ maintain total order between stores. Essentially only the store at the head of the store buffer is allowed to be in flight. Only after that store completes, the next store is issued to the memory system.
Posted (Nov. 15, 2011, 7:05 a.m.)
Does this really implement a post-retirement store buffer, or is this just a pre-retirement store queue? I don't really know anything about this code, but based on my brief scan the store queue looks like it tracks pre-retirement stores. If so, that is very different than a post-retirement store buffer. Furthermore, you need to be careful whether the head of the pre-retirement store queue is speculative or non-speculative.
Posted (Nov. 15, 2011, 8:05 a.m.)
-
src/cpu/o3/lsq_unit_impl.hh (Diff revision 1) -
How about we have a parameter to the CPU and have a check that it's set for x86.
-
src/cpu/o3/lsq_unit_impl.hh (Diff revision 1) -
Similarly.
-
src/cpu/o3/lsq_unit_impl.hh (Diff revision 1) -
Again.
Posted (Nov. 18, 2011, 7:37 a.m.)
I have added a trait hasTSO with each of the ISA. This is set to true only for x86 and false for the rest.
Posted (Jan. 7, 2012, 12:43 a.m.)
-
src/arch/alpha/isa_traits.hh (Diff revision 3) -
Guys, I dont think this should be enabled/disabled through the ISA TRAITS. Then, if you are doing any architectural exploration on the impact of memory models you are going to have to recompile the code or generate different binaries. Instead, this should be a parameter to the CPU model. The CPU model can then choose to implement relaxed ordering, TSO, or whatever flavor someone wants. I dont think there is anything that explicitly ties an ISA to a memory model in all cases, so we would be creating a dependency we would regret later (for instance, SPARC can have a relaxed model or TSO right?) And IMO, it will be cleaner to just give the CPU a "memory_model" parameter that is a Enum, then the LSQ can by if statement choose what to do and then when someone reads the code it will be obvious what's taking place and why. What do people think about that?
Review request changed
Updated (Jan. 12, 2012, 8:57 p.m.)
Description: |
|
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+18 -1) |
Posted (Jan. 13, 2012, 11:06 a.m.)
Looks good... thanks, Nilay.
-
src/cpu/o3/O3CPU.py (Diff revision 5) -
Seems like we should do something like: needsTSO = Param.Bool(buildEnv['TARGET_ISA'] == 'x86', "Memory model")
Posted (Jan. 13, 2012, 11:29 a.m.)
-
src/cpu/o3/lsq_unit_impl.hh (Diff revision 5) -
Here, we should use a member variable inside the LSQUnit instead of the pointer reference to the CPU's member variable. That way we get: if (needsTSO) storeInFlight=false vs. if (cpu->needsTSO) storeInFlight=false
-
src/cpu/o3/lsq_unit_impl.hh (Diff revision 5) -
Here, we should use a member variable inside the LSQUnit instead of the pointer reference to the CPU's member variable. That way we get: if (needsTSO) storeInFlight=false vs. if (cpu->needsTSO) storeInFlight=false (same for line 773)
-
src/cpu/o3/lsq_unit_impl.hh (Diff revision 5) -
same as above.
