In a conventional least recently used (LRU) based cache management mechanism of a storage controller, a cache management application may add a track to the most recently used (MRU) end of a least recently used (LRU) list of tracks. The cache management application demotes a track from the cache, in response to determining that the track is a least recently used (LRU) track in a LRU list of tracks.
Certain applications may provide indications (i.e., hints) to the cache management application of the minimum amount of time that a track should remain in the cache, where the application is aware that the track is likely to access the track once again within the minimum amount of time. The minimum amount of time is referred to as the minimum retention time. As a result, caching operations in a storage controller takes account of hints provided by an application to retain certain tracks in cache for at least a minimum amount of time before demoting the tracks. If the minimum retention time is not specified by the application then the conventional LRU based cache management mechanism is employed.
In a two-tiered cache, if minimum retention time is adhered to strictly for all applications, then the two-tiered cache may become full of tracks that have minimum retention time and no track can be demoted. Certain embodiments provide mechanisms to prevent such a situation from occurring in a two-tiered cache, while at the same time ensuring that minimum retention time requirements are adhered to.