Hello,
My name is Chun Hao Lai. Currently, I am tracing the MESI coherence
cache part for
doing modification to the cache hierarchy.
And I know the *complete_request *function in "coherentCache.cpp" will
evict the cache line
first before inserting a conflict cache line, which is done by
*handle_cache_insert *function.
But, I am curious about the following codes in *complete_request*
function
/* If line is in use then don't evict it, *it will be inserted later*.
When?*/
if (is_line_in_use(*oldTag*)) {
*oldTag *= -1;
}
It says if the cache is in use, then it will insert it later. But,
following the codes afterward these codes,
I doesn't see that the "*oldTag*" is checked and the "insert it later"
happens. And the flows I traced is the
function "handle_cache_insert(queueEntry, oldTag);", which delegates to
"coherence_logic_->handle_cache_insert(queueEntry, oldTag);" as the
following:
void CacheController::handle_cache_insert(CacheQueueEntry *queueEntry, W64
oldTag)
{
coherence_logic_->handle_cache_insert(queueEntry, oldTag);
}
And finally, "coherence_logic_->handle_cache_insert(queueEntry,
oldTag);" uses "send_message" for
evicting the cache line as the following:
void CacheController::send_message(CacheQueueEntry *queueEntry,
Interconnect *interconn, OP_TYPE type, W64 tag)
{
MemoryRequest *request = memoryHierarchy_->get_free_request(
queueEntry->request->get_coreid());
assert(request);
* if(tag == InvalidTag<W64>::INVALID || tag == (W64)-1)*
* tag = queueEntry->request->get_physical_address();*
*...*
}
And from the above, if the "tag == -1", then it does nothing, but
changes the tag and will send the eviction message
out. So,* my question is: when will it be inserted later for the case of
"is_line_in_use(oldTag) == true"?*
And I guess the answer is that because the eviction message will be put
into pendingRequests_ queue and will be done later.
Is that right?
By the way, why does mesiLogic need to check if the cache
"is_lowest_private()" and depending on the check, it does different thing?
Is it because that the upper level private cache will be inconsistent with
the lower level private cache?
And should all coherentcache be private chace? Or it is OK that the
coherentcache is shared cache?
Sorry for so many questions.
Thank you for your patience and hope anybody here could help me with the
confusion.
If you don't understand what I'm asking because of my bad writing, please
ask me.
Any help is greatly appreciated.
With best regards,
Chun Hao
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel