IP Library Granted Patent US 7,526,615
Granted Patent B2
US 7,526,615 · App. 11/513,863 · Granted Apr 28, 2009

Compressed victim cache

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,526,615
App. No.
11/513,863
Granted
Apr 28, 2009
Kind
B2
Abstract

A method for caching a block of data. The method including receiving a request to store the block and determining whether an active cache is able to expand. If the active cache is able to expand, then expanding the active cache to obtain an expanded active cache, and storing the block in the expanded active cache. If the active cache is not able to expand, then determining whether evictable blocks are present in the victim cache. If evictable blocks are present in the victim cache, then evicting a sufficient number of the evictable blocks from the victim cache to facilitate storing the block in the active cache, where the evictable blocks in the victim cache are compressed.

Claims (50)

1. A method for caching a block of data, comprising:

receiving a request to store the block;

determining whether an active cache is able to expand;

if the active cache is able to expand:

expanding the active cache at runtime to obtain an expanded active cache, wherein expanding the active cache comprises increasing the size of the active cache, and

storing the block in the expanded active cache;

if the active cache is not able to expand:

determining whether evictable blocks are present in a victim cache, wherein the victim cache is structured to comprise a most recently used (MRU) evictable portion and a most frequently used (MFU) evictable portion, wherein the MRU evictable portion comprises blocks that previously had at most one active reference and currently have no active references, and the MFU evictable portion comprises blocks that previously had at least two active references and currently have no active references;

if evictable blocks are present in the victim cache:

evicting a sufficient number of the evictable blocks from the victim cache to facilitate storing the block in the active cache,

wherein the evictable blocks in the victim cache are compressed.

2. The method of claim 1 , wherein the active cache comprises blocks that have at least one active reference.

3. The method of claim 1 , wherein the victim cache supports multiple block sizes.

4. The method of claim 1 , wherein determining whether to expand the cache comprises determining whether a memory state of a system in which the cache resides is low.

5. The method of claim 1 , wherein the active cache and the victim cache are located in a single memory.

6. The method of claim 1 , wherein evicting the sufficient number of the evictable blocks from the victim cache comprises:

evicting evictable blocks in a MRU evictable portion of the victim cache; and

evicting evictable blocks in a MFU evictable portion of the victim cache only if the sufficient number of evictable blocks is not present in the MRU evictable portion.

7. A system, comprising:

a memory, wherein the memory comprises an active cache and a victim cache, wherein the victim cache is structured to comprise a most recently used (MRU) evictable portion and a most frequently used (MFU) evictable portion, wherein the MRU evictable portion comprises blocks that previously had at most one active reference and currently have no active references, and the MFU evictable portion comprises blocks that previously had at least two active references and currently have no active references,

and wherein the system is configured to:

receive a request to store a block of data;

determine whether the active cache is able to expand;

if the active cache is able to expand:

expand the active cache at runtime to obtain an expanded active cache, wherein expanding the active cache comprises increasing the size of the active cache, and

store the block in the expanded active cache;

if the active cache is not able to expand:

determine whether evictable blocks are present in the victim cache;

if evictable blocks are present in the victim cache:

determine whether a total size of the evictable blocks is greater than or equal to a size of the block;

evict a sufficient number of the evictable blocks from the victim cache to facilitate storing the block in the active cache,

wherein the evictable blocks in the victim cache are compressed.

8. The system of claim 7 , wherein a size of the block is within a range of 512 bytes and 128 K.

9. The system of claim 7 , wherein the active cache comprises blocks that have at least one active reference.

10. The system of claim 7 , wherein determining whether to expand the cache comprises determining whether a memory state of a system in which the cache resides is low.

11. The system of claim 7 , wherein the active cache comprises blocks that have at least two active references.

12. The system of claim 7 , wherein evicting the sufficient number of the evictable blocks from the victim cache comprises:

evicting evictable blocks in a MRU evictable portion of the victim cache; and

evicting evictable blocks in a MFU evictable portion of the victim cache only if the sufficient number of evictable blocks is not present in the MRU evictable portion.

13. A computer readable medium comprising instructions for performing a method for caching a block of data, the method comprising:

receiving a request for the block from a process;

determining whether the block is in an active cache;

returning the block to the process, if the block is in the active cache;

if the block is not in the active cache:

determining whether the block is in a victim cache, wherein the victim cache is structured to comprise a most recently used (MRU) evictable portion and a most frequently used (MFU) evictable portion, wherein the MRU evictable portion comprises blocks that previously had at most one active reference and currently have no active references, and the MFU evictable portion comprises blocks that previously had at least two active references and currently have no active references;

placing the block in the active cache and returning the block to the process, if the block is in the victim cache;

obtaining the block from persistent storage, if the block is not in the victim cache, wherein the block is in a compressed form, when the block is located in the victim cache.

14. The computer readable medium of claim 13 , wherein the active cache and the victim cache are located in a single memory.

15. The computer readable medium of claim 13 , wherein placing the block in the active cache comprises uncompressing the block prior to placing the block in the active cache.

16. The computer readable medium of claim 13 , wherein returning the block to the process comprises returning a reference to the block.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037304/0151 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2006
From: BONWICK, JEFFREY S.; MOORE, WILLIAM H.; MAYBEE, MARK J.; AHRENS, MATTHEW A.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 018259/0379 →