A system and method for cache management in a data processing system
having a memory hierarchy of upper memory and lower memory cache. A lower
memory cache controller accesses a coherency state table to determine
replacement policies of coherency states for cache lines present in the
lower memory cache when receiving a cast-in request from one of the upper
memory caches. The coherency state table implements a replacement policy
that retains the more valuable cache coherency state information between
the upper and lower memory caches for a particular cache line contained
in both levels of memory at the time of cast-out from the upper memory
cache.