On review 1622 (http://reviews.gem5.org/r/1622/), a patch that implements the x86 mwait instruction, I made the following comments:
> *...* > *2. I ran into minor issues testing the O3 in syscall emulation where I > was running out of stack space. I think there is a bug somewhere in the > simulator (or more likely m5threads), but I was able to hack around it for > testing purposes. This issue is orthogonal to this patch, so I hope to not > worry about it for now.* > *3. While mwait does work in full system, testing it was a nightmare. > This is because interrupts from a hardware timer and system calls trigger > wakeups frequently. In fact, wakeups are triggered so frequently, that I > suspect something may be wrong with fully system mode (maybe the timer is > not running at the correct speed?). Again, this potential issue is > orthogonal to this patch.* > Nilay suggested that I document the exact issues I ran into. *With respect to issue #2:* When I tested the patch, with a test program I wrote (which can be found in review 1621, http://reviews.gem5.org/r/1621/), the simulator could not run the program to completion because it ran out of stack space. See "*command line for issue #2*" at the bottom of this email for the exact details. I was able to circumvent this issue, by setting the max_stack_size parameter for the LiveProcess in configs/example/se.py to '0B'. I was actually just experimenting when I tried this, but the test ran to completion. See the "*hack for issue #2*" at the bottom of this email for a patch that makes this modification. related threads: http://comments.gmane.org/gmane.comp.emulators.m5.users/8035 http://comments.gmane.org/gmane.comp.emulators.m5.devel/2281 *With respect to issue #3:* I'm not able to recreate whatever I was talking about here. I actually didn't mean for this comment to make it to review board as I didn't understand the problems I was facing very well when I wrote it. *command line for issue #2:* morr@redwood ~/mwait-patch/gem5 $ ./build/X86/gem5.debug --debug-flags=Mwait ./configs/example/se.py -c tests/test-progs/mwait/mwait -n 2 --cpu-type detailed --ruby gem5 Simulator System. http://gem5.org gem5 is copyrighted software; use the --copyright option for details. gem5 compiled Jan 23 2013 10:16:52 gem5 started Feb 16 2013 12:34:37 gem5 executing on redwood command line: ./build/X86/gem5.debug --debug-flags=Mwait ./configs/example/se.py -c tests/test-progs/mwait/mwait -n 2 --cpu-type detailed --ruby Global frequency set at 1000000000000 ticks per second warn: CoherentBus system.membus has no snooping ports attached! 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000 0: system.remote_gdb.listener: listening for remote gdb #1 on port 7001 **** REAL SIMULATION **** info: Entering event queue @ 0. Starting simulation... warn: instruction 'fldcw_Mw' unimplemented info: Increasing stack size by one page. ... ... info: Increasing stack size by one page. fatal: Over max stack size for one thread @ cycle 10226500 [fixupStackFault:build/X86/sim/process.cc, line 353] Memory Usage: 645124 KBytes *hack for issue #2:* morr@redwood ~/mwait-patch/gem5 $ hg diff diff --git a/configs/example/se.py b/configs/example/se.py --- a/configs/example/se.py +++ b/configs/example/se.py @@ -82,7 +82,7 @@ idx = 0 for wrkld in workloads: - process = LiveProcess() + process = LiveProcess(max_stack_size='0B') process.executable = wrkld if len(pargs) > idx: Thanks, Marc _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
