Data-aware cache state machine
First Claim
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).
4 Assignments
0 Petitions
Accused Products
Abstract
A method and system directed to improve effectiveness and efficiency of cache and data management by differentiating data based on certain attributes associated with the data and reducing the bottleneck to storage. The data-aware cache differentiates and manages data using a state machine having certain states. The data-aware cache may use data pattern and traffic statistics to retain frequently used data in cache longer by transitioning it into Sticky or StickyDirty states. The data-aware cache may also use content or application related attributes to differentiate and retain certain data in cache longer. Further, the data-aware cache may provide cache status and statistics information to a data-aware data flow manager, thus assisting data-aware data flow manager to determine which data to cache and which data to pipe directly through, or to switch cache policies dynamically, thus avoiding some of the overhead associated with caches. The data-aware cache may also place clean and dirty data in separate states, enabling more efficient cache mirroring and flush, thus improve system reliability and performance.
88 Citations
17 Claims
-
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 Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. An apparatus, comprising:
-
a cache arranged to operate in accordance with 7 cache states, wherein the 7 states are defined as;
(1) Free—
cache lines do not contain valid data yet;
(2) Clean—
cache lines contain valid clean data (no flush needed);
(3) Dirty—
cache lines contain valid dirty data (need flush sometime later);
(4) Sticky—
cache lines contain valid clean data that has been accessed at least twice (e.g. two or more reads);
(5) StickyDirty—
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—
cache lines contain valid dirty data and are about to be written to a physical disk storage; and
(7) Hash—
cache lines are in the process of getting valid data from either the physical disk storage (read) or a host (write); andan interface arranged to receive an access request associated with the cache and to communicate with the cache regarding the request.
-
Specification