Tony Gutierrez got review request #1221!
O3,ARM: fix some problems with drain/switchout functionality and add Drain DPRINTFs
Review Request #1221 - Created May 25, 2012 and submitted
| Information | |
|---|---|
| Tony Gutierrez | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9148:4c0189120c02 --------------------------- O3,ARM: fix some problems with drain/switchout functionality and add Drain DPRINTFs This patch fixes some problems with the drain/switchout functionality for the O3 cpu and for the ARM ISA and adds some useful debug print statements. This is an incremental fix as there are still a few bugs/mem leaks with the switchout code. Particularly when switching from an O3CPU to a TimingSimpleCPU. However, when switching from O3 to O3 cores with the ARM ISA I haven't encountered any more assertion failures; now the kernel will typically panic inside of simulation.
Hi Tony, This looks pretty good. Do you have an idea how to fix the other issues? Is this useful enough to get some things done, or is there more to do? How have you tested it? I'd like to see us run some benchmarks switching back and forth as part of a regression test to make sure that this isn't broken again. Thanks agani, Ali
Summary: |
|
|||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||
Diff: |
Revision 2 (+61 -15) |
-
src/cpu/base.cc (Diff revision 2) -
This will not work correctly with x86. Take a look at the line src/arch/x86/interrupts.cc, line 301.
Summary: |
|
|||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||
Diff: |
Revision 3 (+67 -17) |
Are you still working on this?
Summary: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 4 (+115 -36) |
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+115 -37) |
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+115 -37) |
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 7 (+124 -37) |
-
src/arch/arm/table_walker.cc (Diff revision 7) -
Looks like this should be stateQueueL1
-
src/arch/arm/table_walker.cc (Diff revision 7) -
you could do count + 1 here along with a comment that we're returning the count of the port + 1 because we still have stuff to do.
-
src/cpu/o3/fetch_impl.hh (Diff revision 7) -
that is a nice bug.. good catch
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 8 (+128 -37) |
What happened to the 65 char description limit? :)
As a side note: with this patch, and using the config from my other patch, I can switch repeatedly with Alpha and haven't run into any problems. Switching back-and-forth every 5 billion ticks and every 1 million ticks I can run hello world entirely with O3 CPUs in FS. This includes kernel boot.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 9 (+129 -37) |
Summary: |
|
|---|
Tony... this looks great, thanks! I didn't scrutinize it as carefully as Ali did, but it looks like a lot of good fixes. Just a couple minor things I noticed before committing.
-
src/cpu/base.cc (Diff revision 9) -
This fancy footwork with the cpuId value deserves a comment, I think...
-
src/python/m5/simulate.py (Diff revision 9) -
This looks valuable for debugging, but is it output we always want to leave on? Don't we have a DPRINTF equivalent in Python?
Summary: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 10 (+113 -36) |
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 11 (+114 -36) |
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 12 (+114 -36) |
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 13 (+116 -37) |
Looks good, assuming it still works! Thanks!
-
src/cpu/base.cc (Diff revision 13) -
I suggest adding this: assert(_cpuId == oldCpu->cpuId());
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 14 (+117 -37) |
Great, thanks!
If there are no contentions I think it would be good to ship this and the config patch. It makes switching somewhat usable. With this and the config that does switching out-of-the-box I think more people would start looking at this; the more people using this the better chance the remaining bugs will be fixed.
