Hi Everyone,

I'm trying to work with Lisa's patch to convert cache vector
statistics to record data on a per-context basis where context is
anything that executes instructions.  (Some things were per-CPU and
some things were per-thread and neither make sense).  She added a
parameter to each cache called "num_sharing_contexts" that would tell
the cache how many contexts could send that cache a request.  Indexing
into the vector was done by taking req->contextId and doing a modulo
with num_sharing_contexts.  DMA controllers would all get stuck in a
special additional bin.

There are two things I don't like about this scheme.  First,
configuring the parameter is a pain in the butt. Second, it's hard to
compare statistics from two different caches because their indexes are
different.  Third, you can't separate out DMA controllers.

So, what I did was get rid fo num_sharing_contexts and use the number
of contexts that were registered with the system with
registerThreadContext (adding one for the DMA controllers).  This
works for the common case, but doesn't work with the MemTester because
the memtester doesn't have a thread context to register.

I see a few options for solving this problem:
1) Separate out the contextId allocation from registerThreadContext so
things like DMA controllers and memtesters can get allocated a
contextID.
2) Create a base class for ThreadContext that is far simpler than the
current thread context and use that when registering.
3) Figure out contextID not by registration, but instead by doing a
traversal of the memory system.  This would require that we have some
sort of indication differentiating memory objects that can generate
requests and thus require a contextID and memory objects that can't
(caches, dram, pio devices, etc.).  We add a constructor parameter to
the MemObject base class.
4) Add a separate registration function for non Thread Contexts.

Thoughts?  Ideas?

  Nate
_______________________________________________
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to