Product manual

CDA 7 Input/Output Operations
77 A1 69UP Rev00 3-3
3.1.1.1 LRU Algorithm
The directors replace the least recently used data in cache with new data when
needed. The LRU algorithm optimizes cache performance through high hit ratios
by ensuring that the most appropriate data is stored in cache. The following figure
illustrates data flow with the LRU algorithm.
READ or WRITE HIT
OLDEST SLOT
CACHE
CAPACITY
NEWLY STAGED
CACHE SLOT
PROMOTED
TO TOP
Figure 3-2. LRU Data Flow
Each time a read hit or write hit occurs, CDA 7 marks that cache slot as most
recently used and promotes it to the top of the LRU list. For each write, a
written-to flag is set on the initial write to each cache block and is cleared when the
cache block is "destaged". At the bottom of the LRU list is the least recently used
cache slot.