When "the same context/ the same address" undergoes update or becomes invalid during the retrieval process (such as QP status change, MPT/MTT update), how does GCCache ensure that the multiple outstanding misses after merging will not read outdated/inconsistent contexts?
This problem cannot be solved by GCCache alone and needs to be explained from the perspective of the network card. First, a core premise must be clarified: there is an essential difference between the cache model of traditional computer architecture and that of RNIC, which is also one of the key challenges to be addressed in the development of RDMA network cards. The traditional cache model follows a hierarchical structure of CPU—Cache—Main Memory, where all data queries and modifications by the CPU are processed through the cache, thus the cache coherence problem can be properly resolved. In the cache model of RDMA network cards, however, in addition to the network cards direct access to the main memory (following the Pipeline—GCCache—Host Memory path), the host driver can also directly read and write the main memory. What is more, the network card has no perception of the main memory modifications made by the host driver. In this case, if stale data remains in the cache, it will easily cause abnormal operation of the network card, which greatly increases the difficulty of solving the cache coherence problem in this scenario. To address this issue, our solution is as follows: before the host driver modifies the main memory data (mainly various context information), it must first send a notification to the network card through a dedicated register; upon detecting the notification, the network card will initiate a clear request with the opcode of Clear to GCCache. If the request hits the cache, GCCache will immediately execute the cache clearing operation to ensure no stale data remains in the cache, thereby guaranteeing that the context information obtained by GCCache from the host is always the latest.