> Secondly, I have implemented the nanosleep() system call. I believe that > the appropriate way to do this would be suspending (tc->suspend()) the > ThreadContext and re-activating (tc->activate(delay)) after the sleep > duration (please correct me if I am mistaken). This however led to a > peculiar behaviour with O3 in SMT mode: > 1. in FullO3CPU<Impl>::suspendContext (cpu.cc) the CPU _status is set to > Idle, regardless whether there are other running contexts in the CPU. Thus a > thread sleeping leads to all the other SMT threads sleeping. >
This looks like a legit bug. In getting SMT to work as threads are spawned/respawned/suspended/etc. there may definitely be some bugs there in code assuming the CPU only has 1 thread context. do you want to give fixing that a go and then send out a patch to the m5-dev list (or better yet reviewboard)? -- - Korey
_______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
