×

Least recently used mechanism for cache line eviction from a cache memory

  • US 9,563,575 B2
  • Filed: 11/02/2015
  • Issued: 02/07/2017
  • Est. Priority Date: 07/19/2013
  • Status: Active Grant
First Claim
Patent Images

1. A method comprising:

  • determining, in a cache memory that stores a plurality of cache lines, that a first eviction is to be performed from the cache memory;

    identifying a first group of cache lines that are selectable for the first eviction;

    identifying one or more invalid cache lines in the first group;

    selecting a least recently used cache line from the one or more invalid cache lines for the first eviction;

    determining that a second eviction is to be performed from the cache memory;

    identifying a second group of cache lines that are selectable for the second eviction;

    determining that none of the cache lines in the second group are invalid;

    identifying one or more second cache lines in the second group that are not also stored in a higher level cache memory;

    selecting the least recently used cache line of the one or more second cache lines for the second eviction;

    determining that a third eviction is to be performed from the cache memory;

    identifying a third group of cache lines that are selectable for the third eviction;

    determining that none of the cache lines in the third group are invalid;

    determining that the cache lines in the third group are also stored in the higher level cache memory;

    selecting the least recently used cache line of the third group for the third eviction;

    allocating a cache line within a least recently used hierarchy having a plurality of positions beginning with a position zero, wherein a cache line designated as being in position zero of the least recently used hierarchy is the least recently used cache line, and wherein cache lines in lower numbered positions of the least recently used hierarchy are selected for eviction before cache lines in higher numbered positions; and

    storing a prefetch bit in each of the cache lines, the prefetch bit indicating whether the corresponding cache line was generated responsive to a cache memory prefetch operation, and wherein the method further comprises allocating a cache line associated with a memory prefetch request to one of positions zero through three of the least recently used hierarchy.

View all claims
  • 0 Assignments
Timeline View
Assignment View
    ×
    ×