On Thu, Jul 22, 2010 at 12:53 PM, nathan binkert <[email protected]> wrote:

> > 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)?
>
> To be honest, unless it's changed in the last couple of years, the
> whole wakeup context suspend resume everything is pretty messy.  I
> remember trying to make sense of it years ago.  It would be extremely
> helpful if someone could clean this all up or at least come up with a
> proposal for a direction we'd like to take this code.
>
I actually redid this mechanism for the InOrderCPU (in terms of coordinating
when events are called) and I wanted to re-do how the O3 was done to match
that modeling.

The problem is that there are some conventions that we would need to point
out and follow (i.e. Do threads start out Halted, Idle, or ???) and then
also sort out (at least for me) what is the true role and relationship
between ThreadContext and ThreadState. I always was confused by those two
and thought they should be merged into the same object. I know at one point,
Steve was frustrated enough to just get things working and commit a change
for this stuff (maybe 1yr ago),

Lastly, there are some issues of how the architectural state gets
transferred in/out in SE mode since there is no explicit OS handler to do
this for you (e.g. assign a thread to a SMT hardware context in O3, before
there are enough physical registers ... or flushing the pipeline and
deallocating registers after a thread is suspended or halted)

If people want, I can try to summarize what changes I think need to be made
and then others with more knowledge on how that relates to things working
for FS_MODE can chime in as well.
-- 
- Korey
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to