A method for replacing cache lines in a computer system having a
non-uniform set associative cache memory is disclosed. The method
incorporates access latency as an additional factor into the existing
ranking guidelines for replacement of a line, the higher the rank of the
line the sooner that it is likely to be evicted from the cache. Among a
group of highest ranking cache lines in a cache set, the cache line
chosen to be replaced is one that provides the lowest latency access to a
requesting entity, such as a processor. The distance separating the
requesting entity from the memory partition where the cache line is
stored most affects access latency.