On Sat, 28 May 2011, Nilay Vaish wrote:
Hi Brad
I am trying to complete the patch on functional accesses in Ruby. I came
across this problem while testing the patch for higher number of processors.
I am working with MESI CMP directory protocol right now. So I will describe
the problem in its context.
Assume we are trying to functionally write some thing to block A. It is in
state S_I in the L2 cache. When a block moves to state S_I from state SS,
then the cache block in the cache is deallocated. Therefore, when viewed from
the CacheMemory's perpespective, since the cache does not have block A,
therefore, the L2 cache is of no consequence for this access. But the
controller has a TBE for this block. And this TBE will have this block with
AccessPermission:Busy. Also, there are L1 caches in the system that hold this
block in S state.
Now, as per the current condition for write functional accesses,
if((num_busy == 0 && num_ro > 0) || num_rw == 1)
this access would go ahead as num_busy would evaluate to 0 and num_ro would
evaluate to some value greater than 0. But clearly we do not want this access
to be performed since that state S_I is a busy state and no other cache holds
the block in a read-write state.
It seems to me that the controller should supply the function for deciding
the access permissions, since it is possible that one the TBE holds the
block.
--
Nilay
Brad, I went over the discussion that we had this morning. I think the
getState() function cannot be used for extracting access permissions. This
is because the getState() function needs pouinters to transaction buffer
and cache entries, apart from the address.
I think we should let the Controller provide a function for getting the
access permissions. This function would be a virtual function declared in
the AbstractController class, but would not be pure. The
AbstractController implementation of the function would always return
busy, so that functional accesses are not enabled at all for protocols
that do not provide such a function.
--
Nilay
_______________________________________________
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev