IP Library Granted Patent US 11,593,268
Granted Patent B2
US 11,593,268 · App. 17/079,925 · Granted Feb 28, 2023

Method, electronic device and computer program product for managing cache

Inventors: Shuo Lv (Beijing, CN); Ming Zhang (Beijing, CN)
Assignee: EMC IP Holding Company LLC
G06F12/0877G06F2212/60
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 11,593,268
App. No.
17/079,925
Granted
Feb 28, 2023
Kind
B2
Abstract

Techniques for cache management involve accessing, when a first data block to be accessed is missing in a first cache, the first data block from a storage device storing the first data block; selecting, when the first cache is full and based on a plurality of parameters associated with a plurality of eviction policies, an eviction policy for evicting a data block in the first cache from the plurality of eviction policies, the plurality of parameters indicating corresponding possibilities that the plurality of eviction policies are selected; evicting a second data block in the first cache to a second cache based on the selected eviction policy, the second cache being configured to record the data block evicted from the first cache; and caching the accessed first data block in the first cache. Such techniques can improve the cache hit rate, thereby improving the access performance of a system.

Claims (75)

1. A method for cache management, comprising:

accessing, according to a determination that a first data block to be accessed is missing in a first cache, the first data block from a storage device storing the first data block;

selecting, according to a determination that the first cache is full and based on a plurality of parameters having a one-to-one association with a plurality of eviction policies, an eviction policy for evicting a data block in the first cache from the plurality of eviction policies, the plurality of parameters indicating corresponding possibilities that the plurality of eviction policies are selected;

evicting a second data block in the first cache to a second cache based on the selected eviction policy, the second cache being configured to record the data block evicted from the first cache; and

caching the accessed first data block in the first cache.

2. The method of claim 1 , wherein accessing the first data block from the storage device storing the first data block comprises:

accessing, according to a determination that the first data block exists in the second cache, the first data block from the second cache; and

accessing, according to a determination that the first data block is missing in the second cache, the first data block from the storage device storing the first data block.

3. The method of claim 1 , further comprising:

deleting the first data block from the second cache according to a determination that the first data block exists in the second cache; and

updating the plurality of parameters according to an eviction policy for evicting the first data block to the second cache.

4. The method of claim 3 , wherein the second cache comprises a plurality of lists, each of the plurality of lists comprising data blocks evicted from the first cache based on a corresponding eviction policy in the plurality of eviction policies, and deleting the first data block from the second cache comprises:

determining, from the plurality of lists, a list in which the first data block is located; and

deleting the first data block from the determined list.

5. The method of claim 3 , wherein the plurality of eviction policies comprise a first eviction policy and a second eviction policy, and the plurality of parameters comprise a first parameter associated with the first eviction policy and a second parameter associated with the second eviction policy, and updating the plurality of parameters comprises:

updating the first parameter and the second parameter according to a determination that the first data block is evicted to the second cache based on the first eviction policy, to increase the possibility that the second eviction policy is selected; and

updating the first parameter and the second parameter according to a determination that the first data block is evicted to the second cache based on the second eviction policy, to increase the possibility that the first eviction policy is selected.

6. The method of claim 1 , wherein selecting the eviction policy from the plurality of eviction policies comprises:

determining a maximum parameter in the plurality of parameters; and

selecting an eviction policy corresponding to the maximum parameter in the plurality of eviction policies as the eviction policy for evicting the second data block.

7. The method of claim 1 , wherein the plurality of eviction policies comprise:

a first eviction policy based on the least recently used (LRU) algorithm; and

a second eviction policy based on the least frequently used (LFU) algorithm.

8. The method of claim 7 , wherein the second cache comprises a first list for caching data blocks evicted from the first cache based on the first eviction policy, and evicting the second data block from the first cache to the second cache comprises:

determining, according to a determination that the first eviction policy is selected, a least recently accessed data block from the first cache as the second data block; and

evicting the second data block from the first cache to the first list.

9. The method of claim 7 , wherein the second cache comprises a second list for caching data blocks evicted from the first cache based on the second eviction policy, and evicting the second data block from the first cache to the second cache comprises:

determining, according to a determination that the second eviction policy is selected, a least frequently accessed data block from the first cache as the second data block; and

evicting the second data block from the first cache to the second list.

10. The method of claim 1 , further comprising:

accessing the first data block from the first cache according to a determination that the first data block to be accessed exists in the first cache.

11. The method of claim 1 , further comprising:

caching the first data block in the first cache according to a determination that the first data block is accessed from the storage device and the first cache is not full.

12. An electronic device, comprising:

a processor;

a memory coupled to the processor and storing instructions for execution by the processor, wherein when executed by the processor, the instructions cause the device to perform actions comprising:

accessing, according to a determination that a first data block to be accessed is missing in a first cache, the first data block from a storage device storing the first data block;

selecting, according to a determination that the first cache is full and based on a plurality of parameters having a one-to-one association with a plurality of eviction policies, an eviction policy for evicting a data block in the first cache from the plurality of eviction policies, the plurality of parameters indicating corresponding possibilities that the plurality of eviction policies are selected;

evicting a second data block in the first cache to a second cache based on the selected eviction policy, the second cache being configured to record the data block evicted from the first cache; and

caching the accessed first data block in the first cache.

13. The device of claim 12 , wherein accessing the first data block from the storage device storing the first data block comprises:

accessing, according to a determination that the first data block exists in the second cache, the first data block from the second cache; and

accessing, according to a determination that the first data block is missing in the second cache, the first data block from the storage device storing the first data block.

14. The device of claim 12 , wherein the actions further comprise:

deleting the first data block from the second cache according to a determination that the first data block exists in the second cache; and

updating the plurality of parameters according to an eviction policy for evicting the first data block to the second cache.

15. The device of claim 14 , wherein the second cache comprises a plurality of lists, each of the plurality of lists comprising data blocks evicted from the first cache based on a corresponding eviction policy in the plurality of eviction policies, and deleting the first data block from the second cache comprises:

determining, from the plurality of lists, a list in which the first data block is located; and

deleting the first data block from the determined list.

16. The device of claim 14 , wherein the plurality of eviction policies comprise a first eviction policy and a second eviction policy, and the plurality of parameters comprise a first parameter associated with the first eviction policy and a second parameter associated with the second eviction policy, and updating the plurality of parameters comprises:

updating the first parameter and the second parameter according to a determination that the first data block is evicted to the second cache based on the first eviction policy, to increase the possibility that the second eviction policy is selected; and

updating the first parameter and the second parameter according to a determination that the first data block is evicted to the second cache based on the second eviction policy, to increase the possibility that the first eviction policy is selected.

17. The device of claim 12 , wherein selecting the eviction policy from the plurality of eviction policies comprises:

determining a maximum parameter in the plurality of parameters; and

selecting an eviction policy corresponding to the maximum parameter in the plurality of eviction policies as the eviction policy for evicting the second data block.

18. The device of claim 12 , wherein the plurality of eviction policies comprise:

a first eviction policy based on the least recently used (LRU) algorithm; and

a second eviction policy based on the least frequently used (LFU) algorithm.

19. The device of claim 18 , wherein the second cache comprises a first list for caching data blocks evicted from the first cache based on the first eviction policy, and evicting the second data block from the first cache to the second cache comprises:

determining, according to a determination that the first eviction policy is selected, a least recently accessed data block from the first cache as the second data block; and

evicting the second data block from the first cache to the first list.

20. The device of claim 18 , wherein the second cache comprises a second list for caching data blocks evicted from the first cache based on the second eviction policy, and evicting the second data block from the first cache to the second cache comprises:

determining, according to a determination that the second eviction policy is selected, a least frequently accessed data block from the first cache as the second data block; and

evicting the second data block from the first cache to the second list.

21. The device of claim 12 , wherein the actions further comprise:

accessing the first data block from the first cache according to a determination that the first data block to be accessed exists in the first cache.

22. The device of claim 12 , wherein the actions further comprise:

caching the first data block in the first cache according to a determination that the first data block is accessed from the storage device and the first cache is not full.

23. A computer program product having a non-transitory computer readable medium which stores a set of instructions to perform cache management; the set of instructions, when carried out by computerized circuitry, causing the computerized circuitry to perform a method of:

accessing, according to a determination that a first data block to be accessed is missing in a first cache, the first data block from a storage device storing the first data block;

selecting, according to a determination that the first cache is full and based on a plurality of parameters having a one-to-one association with a plurality of eviction policies, an eviction policy for evicting a data block in the first cache from the plurality of eviction policies, the plurality of parameters indicating corresponding possibilities that the plurality of eviction policies are selected;

evicting a second data block in the first cache to a second cache based on the selected eviction policy, the second cache being configured to record the data block evicted from the first cache; and

caching the accessed first data block in the first cache.

24. The method of claim 1 , further comprising:

in response to accessing a data block from the second cache, adjusting a parameter to decrease a corresponding possibility that the selected eviction policy is selected.

Assignments (9)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (054475/0523) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
Reel/Frame 060332/0664 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (054475/0434) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
Reel/Frame 060332/0740 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (054475/0609) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
Reel/Frame 062021/0570 →
RELEASE OF SECURITY INTEREST AT REEL 054591 FRAME 0471 Recorded Nov 2, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
Reel/Frame 058001/0463 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 30, 2020
From: LV, SHUO; ZHANG, MING
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 054774/0828 →
SECURITY INTEREST Recorded Nov 18, 2020
From: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 054475/0523 →
SECURITY INTEREST Recorded Nov 18, 2020
From: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 054475/0609 →
SECURITY INTEREST Recorded Nov 18, 2020
From: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 054475/0434 →
SECURITY AGREEMENT Recorded Nov 13, 2020
From: EMC IP HOLDING COMPANY LLC; DELL PRODUCTS L.P.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
Reel/Frame 054591/0471 →