IP Library Granted Patent US 11,366,758
Granted Patent B2
US 11,366,758 · App. 16/989,496 · Granted Jun 21, 2022

Method and devices for managing cache

Inventors: Ruiyong Jia (Beijing, CN); Xinlei Xu (Beijing, CN); Lifeng Yang (Beijing, CN); Xiongcheng Li (Beijing, CN); Jian Gao (Beijing, CN)
Assignee: EMC IP HOLDING COMPANY, LLC
G06F12/0871G06F11/3419G06F12/0804G06F12/0815G06F12/0891G06F2201/81G06F2201/885
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,366,758
App. No.
16/989,496
Granted
Jun 21, 2022
Kind
B2
Abstract

Embodiments of the present disclosure relate to a method and apparatus for managing cache. The method comprises determining a cache flush time period of the cache for a lower-layer storage device associated with the cache. The method further comprises: in response to a length of the cache flush time period being longer than a threshold length of time, in response to receiving a write request, determining whether data associated with the write request has been stored into the cache. The method further comprises: in response to a miss of the data in the cache, storing the write request and the data in the cache without returning a write completion message for the write request.

Claims (66)

1. A method of managing cache, comprising:

determining a cache flush time period of the cache for a lower-layer storage device associated with the cache;

in response to determining the cache flush time period, comparing the determined cache flush time period to a preset threshold amount of time;

in response to the determining that the determined cache period exceeds the preset threshold amount of time:

in response to receiving a write request, determining whether data associated with the write request has been stored into the cache;

in response to a miss of the data in the cache, storing the write request and the data in the cache without returning a write completion message for the write request;

comparing a first length of time of the write request being stored in the cache and a predefined second length of time;

in response to the first length of time exceeding the second length of time, determining a dirty block rate in the cache associated with the storage device; and

in response to the dirty block rate being lower than a predetermined threshold, sending the write completion message for the write request.

2. The method according to claim 1 , further comprising:

determining a first number of storage blocks in the cache that are released by a flush to the storage device and are available for the storage device; and

in response to the number being greater than a second number of storage blocks occupied by the data, sending the write completion message for the write request.

3. The method according to claim 1 , wherein determining the cache flush time period for the storage device comprises:

obtaining a plurality of historical flush time periods for a plurality of previous flushes from the cache to the storage device; and

determining the cache flush time period by averaging the plurality of historical flush time periods.

4. The method according to claim 2 , further comprising:

in response to sending the write completion message, subtracting the second number from the first number.

5. The method according to claim 1 , further comprising:

determining a first number of storage blocks in the cache that are released by a flush to the storage device and are available for the storage device;

obtaining the number of storage blocks in the cache and the number of dirty blocks in the cache; and

determining the dirty block rate based on the first number, the number of storage blocks in the cache, and the number of dirty blocks in the cache.

6. A cache manager, the cache comprising a plurality of storage blocks, the cache manager comprising:

a processor; and

a memory having computer program instructions stored thereon, the processor executing the computer program instructions in the memory to control the memory system to perform acts comprising:

determining a cache flush time period of the cache for a lower-layer storage device associated with the cache;

in response to determining the cache flush time period, comparing the determined cache flush time period to a preset threshold amount of time;

in response to the determining that the determined cache period exceeds the preset threshold amount of time:

in response to receiving a write request, determining whether data associated with the write request has been stored into the cache;

in response to a miss of the data in the cache, storing the write request and the data in the cache without returning a write completion message for the write request;

comparing a first length of time of the write request being stored in the cache and a predefined second length of time;

in response to the first length of time exceeding the second length of time, determining a dirty block rate in the cache associated with the storage device; and

in response to the dirty block rate being lower than a predetermined threshold, sending the write completion message for the write request.

7. The manager according to claim 6 , further comprising:

determining a first number of storage blocks in the cache that are released by a flush to the storage device and are available for the storage device;

in response to the number being greater than a second number of storage blocks occupied by the data, sending the write completion message for the write request.

8. The manager according to claim 6 , wherein determining the cache flush time period for the storage device comprises:

obtaining a plurality of historical flush time periods for a plurality of previous flushes from the cache to the storage device; and

determining the cache flush time period by averaging the plurality of historical flush time periods.

9. The manager according to claim 7 , further comprising:

in response to sending the write completion message, subtracting the second number from the first number.

10. The manager according to claim 6 , further comprising:

determining a first number of storage blocks in the cache that are released by a flush to the storage device and are available for the storage device;

obtaining the number of storage blocks in the cache and the number of dirty blocks in the cache; and

determining the dirty block rate based on the first number, the number of storage blocks in the cache, and the number of dirty blocks in the cache.

11. A computer program product for managing cache, comprising:

a non-transitory computer readable medium encoded with computer-executable code, the code configured for the execution of:

determining a cache flush time period of the cache for a lower-layer storage device associated with the cache;

in response to determining the cache flush time period, comparing the determined cache flush time period to a preset threshold amount of time; and

in response to the determining that the determined cache period exceeds the preset threshold amount of time:

in response to receiving a write request, determining whether data associated with the write request has been stored into the cache,

in response to a miss of the data in the cache, storing the write request and the data in the cache without returning a write completion message for the write request,

comparing a first length of time of the write request being stored in the cache and a predefined second length of time,

in response to the first length of time exceeding the second length of time, determining a dirty block rate in the cache associated with the storage device, and

in response to the dirty block rate being lower than a predetermined threshold, sending the write completion message for the write request.

12. The computer program product of claim 11 , the code further configured for the execution of:

determining a first number of storage blocks in the cache that are released by a flush to the storage device and are available for the storage device; and

in response to the number being greater than a second number of storage blocks occupied by the data, sending the write completion message for the write request.

13. The computer program product of claim 11 , wherein determining the cache flush time period for the storage device comprises:

obtaining a plurality of historical flush time periods for a plurality of previous flushes from the cache to the storage device; and

determining the cache flush time period by averaging the plurality of historical flush time periods.

14. The computer program product of claim 12 , the code further configured for the execution of:

in response to sending the write completion message, subtracting the second number from the first number.

15. The computer program product of claim 11 , the code further configured for the execution of:

determining a first number of storage blocks in the cache that are released by a flush to the storage device and are available for the storage device;

obtaining the number of storage blocks in the cache and the number of dirty blocks in the cache; and

determining the dirty block rate based on the first number, the number of storage blocks in the cache, and the number of dirty blocks in the cache.

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 →
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 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 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 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 10, 2020
From: JIA, RUIYONG; XU, XINLEI; YANG, LIFENG; LI, LIAM XIONGCHENG; GAO, JIAN
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 053447/0712 →