×

Data-aware cache state machine

  • US 7,356,651 B2
  • Filed: 01/31/2005
  • Issued: 04/08/2008
  • Est. Priority Date: 01/30/2004
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for controlling a cache, comprising:

  • managing each line or block of data in the cache by assigning each line or block of data to one of 7 or more states, wherein managing each line or block of data in the cache is performed by a cache state machine comprising 7 or more states and a collection of state transitions, wherein each cache state is associated with a control structure, and wherein each line is associated with a line control block comprising a set of line or block attributes;

    utilizing a hash object to speed up cache line lookup;

    enforcing a total maximum dirty line threshold;

    collecting statistics for each line including read access count, write access count, and time since flush;

    collecting statistics for the cache including cache hits, cache misses, and average access count; and

    wherein the 7 states are defined as;

    (1) Free—

    the cache lines do not contain valid data yet;

    (2) Clean—

    the cache lines contain valid clean data (no flush needed);

    (3) Dirty—

    the cache lines contain valid dirty data (need flush sometime later);

    (4) Sticky—

    the cache lines contain valid clean data that has been accessed at least twice (e.g. two or more reads);

    (5) StickyDirty—

    the cache lines contain valid dirty data that has been accessed at least twice (e.g. 1 write, 1 or more reads;

    or 2 or more writes, etc.);

    (6) Flush—

    the cache lines contain valid dirty data and are about to be written to a physical disk storage; and

    (7) Hash—

    the cache lines are in the process of getting valid data from either physical disk storage (read) or host (write).

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