ThreadContext suspension / activation in O3 SMT - nanosleep syscall
Review Request #68 - Created July 28, 2010 and updated
This is a patch fixing the ThreadContext suspension / activation described in http://firstname.lastname@example.org/msg07307.html and implementing the nanosleep() syscall (albeit without the signal-relevant parts) for AlphaLinux. Changes in O3: - The tick scheduling was removed from activateContext() and moved into activateThread(). It seems more natural since activateContext() either calls activateThread() or schedules it. In the case of scheduling there is no need to schedule ticks prematurely. - suspendContext() and haltContext() check the number of active threads before setting CPU _status to Idle.
Posted (July 29, 2010, 1:46 a.m.)
Thanks! Just a couple minor things... - Did you test this with the other CPU models besides O3? I'm guessing you did and O3 was the only one that broke, but I just wanted to verify that.
src/arch/alpha/linux/process.cc (Diff revision 1)
This is a broader question (not just for Ioannis): does it make sense to proactively add this to the syscall tables for the other ISAs too? I don't see anything ISA-specific here.
src/cpu/o3/cpu.cc (Diff revision 1)
I'm curious why the state is set to idle even if there is one active thread... I see that the existing test above in deallocateContext is similar but I don't understand that one either :-). Adding a comment to cover this would be helpful.
src/sim/syscall_emul.hh (Diff revision 1)
Some of the lines in this function look >80 chars; if so they should be wrapped. (Anyone know if there's a way to check this in ReviewBoard?)
Review request changed
Updated (July 29, 2010, 6:01 a.m.)