I believe the short answer is that UPDATE messages don't generate responses from lower levels, so after they're sent to the lower lever, there's no response that will come back, so it can be removed from the pending queue right away after sending.
Other requests have to wait for a response, so they can't be cleared until the insert is marked as complete (which if I recall correctly, only happens after a response is received from a lower level). The number of callback paths through this code makes it very hard to reason about what is happening where. Someone should sit down and draw a dot diagram of the paths of requests, haha. On Fri, Oct 28, 2011 at 12:23 PM, sparsh mittal <[email protected]>wrote: > Hello > > Here is the sequence of functions called in cacheController. Here, in > cache_insert_cb, clearEntry gets called twice, I don't understand why. Once > by cache_insert_complete_cb and second time by wait_interconnect_cb (which > gets called by send_update_message). > > *bool CacheController::cache_insert_cb() > { > IF(SUCCESSFULL){ > send_update_message(); > } > memoryHierarchy_->add_event(&cacheInsertComplete_,) > > > } > * > bool CacheController::send_update_message() > { > ........ > memoryHierarchy_->add_event(&waitInterconnect_,) > } > > bool CacheController::cache_insert_complete_cb() > { > ........ > memoryHierarchy_->add_event(&clearEntry_) > } > > bool CacheController::wait_interconnect_cb(void* arg) > { > if (queueEntry->sendTo == upperInterconnect_ || > queueEntry->sendTo == upperInterconnect2_) > { > ... > } > else > { > success = lowerInterconnect_-> > get_controller_request_signal()->emit(&message); > > > if (success == false) > { > ... > } > else > { > /* > * If the request is for memory update, its send to > * lower level cache so we can remove the entry from > * local queue > */ > if (queueEntry->request->get_type() == MEMORY_OP_UPDATE) > { > clear_entry_cb(queueEntry); > } > ... > } > } > > /* Free the message */ > memoryHierarchy_->free_message(&message); > > return true; > } > Thanks and Regards > Sparsh Mittal > > > > _______________________________________________ > http://www.marss86.org > Marss86-Devel mailing list > [email protected] > https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel > >
_______________________________________________ http://www.marss86.org Marss86-Devel mailing list [email protected] https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
