Method for Management of Protection and Address Translation Caches.
Original Publication Date: 2005-May-10
Included in the Prior Art Database: 2005-May-10
Disclosed is a mechanism for improving the performance of InfiniBand* Host Channel Adapter memory management by caching protection and address translation tables within the HCA. Disclosed are techniques for managing when entries are loaded into the cache, removed from the cache and maintaining cache coherency.
Method for Management of Protection and Address Translation Caches .
Typically the protection and address tables used by an InfiniBand* (IB) Host Channel Adapter (HCA) for memory management are stored in memory external to the HCA. In order to improve the efficiency of the address translation process, it is desirable to cache parts of these tables in memory internal to the HCA that can be accessed much faster. Described is a mechanism for managing such a cache. This includes mechanisms to maintain the coherency of the cache and also mechanisms for loading and invalidating cache entries that improve the probability of cache hits.
The following mechanisms are used by the HCA hardware to maintain the coherency of the Protection and AT-caches. No unique actions are required by any software using the HCA.
The HCA Invalidates the Protection Cache entry and any associated Address Translation Cache entries with the Local Key (L_Key) of a memory region that is deregistered.
The HCA Invalidates the Protection Cache entry and any associated Address Translation Cache entries with the Remote Key (R_Key) of a memory window that is deallocated.
When a bind memory window is performed, the protection cache entry associated with that window is changed and is no longer coherent with the Protection Table Entry (PTE) in external memory. The copy in external memory does not need to be updated until the cache copy is cast out. An indication in the cache copy that this entry has been modified can be maintained so that when the cache copy is cast out, the copy in external memory can be updated.
The following techniques can be used by the HCA to determine when to load a protection cache or address translation cache entry. All or any combination of these techniques may be used in a given implementation.
A bit may be provided in the PTE to allow software to indicate to the HCA whether this entry may be cached or not. Applications of lower importance or applications that have infrequent usag...