IP Library Granted Patent US 10,168,917
Granted Patent B2
US 10,168,917 · App. 15/090,706 · Granted Jan 1, 2019

Hotness based data storage for facilitating garbage collection

Inventors: Qiao Qing Dai (Shanghai, CN); Zhen Hua Feng (Shanghai, CN); Xu Chu Jiang (Shanghai, CN); Fei Wang (Shanghai, CN)
Assignee: International Business Machines Corporation
G06F3/0616G06F3/064G06F3/0653G06F3/0685
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 10,168,917
App. No.
15/090,706
Granted
Jan 1, 2019
Kind
B2
Abstract

Embodiments of the present disclosure relate to hotness based data storage for facilitating garbage collection. For target data to be stored into a flash drive, hotness of the target is determined, which indicates an expected update frequency of the target data. Then the in-use blocks in the flash drive are searched for a matching block for storing the target data, such that hotness of data being stored in the matching block matches the hotness of the target data. If no matching block is found, a free block is selected for storing the target data. The selection of the free block is based on the hotness of the target data and a degree of wear of the free block.

Claims (28)

1. A method for operating a flash drive, comprising: determining expected hotness of target data to be stored in a flash drive according to a historical hotness of the target data and a recent hotness of the target data, the historical hotness indicating a historical update frequency of the target data in a previous period of time and the recent hotness indicating a recent update frequency of the target data in a recent period of time, wherein the recent period of time for the recent hotness is more recent than the previous period of time for the historical hotness, wherein the flash drive including includes a plurality of blocks, each of the plurality of blocks including a plurality of pages, and wherein hotness indicating indicates a data update frequency, wherein determining the expected hotness comprises: calculating a weighted average of the historical hotness and the recent hotness; searching the plurality of blocks for a matching block for storing the target data, the hotness of data being stored in the matching block matching the expected hotness of the target data, wherein the matching block is an active block, from the plurality of blocks, currently in use and with a highest hotness matching degree; selecting, in response to not finding the matching block, a free block from the plurality of blocks to store the target data to enable garbage collection in the flash drive, the free block being a block that has been reclaimed by a previous garbage collection, selecting the free block based on the expected hotness of the target data and a degree of wear of the free block, the degree of wear being determined based on the hotness of data previously stored in the free block; and storing the target data in the selected free block.

2. The method of claim 1 , further comprising:

periodically determining a data usage pattern of the target data, the data usage pattern indicating operations performed on the target data; and

updating the historical hotness based on the data usage pattern.

3. The method of claim 1 , wherein the degree of wear of the free block indicates a number of times that the free block has been previously used to store data with high hotness.

4. The method of claim 1 , wherein selecting the free block comprises:

selecting, in response to the expected hotness of the target data exceeding a threshold hotness, the free block with the degree of wear below a threshold degree of wear; and

selecting, in response to the expected hotness of the target data being equal to or below the threshold hotness, the free block with the degree of wear exceeding the threshold degree of wear.

5. The method of claim 1 , further comprising:

incrementing, in response to the previous garbage collection performed on a block of the plurality of blocks, the degree of wear of the block if a hotness of data currently stored in the block exceeds a threshold hotness.

6. A device comprising: a processing unit; a memory coupled to the processing unit and storing instructions thereon, the instructions, when executed by the processing unit, performing operations including: determining expected hotness of target data to be stored in a flash drive according to a historical hotness of the target data and a recent hotness of the target data, the historical hotness indicating a historical update frequency of the target data in a previous period of time and the recent hotness indicating a recent update frequency of the target data in a recent period of time, wherein the recent period of time for the recent hotness is more recent than the previous period of time for the historical hotness, wherein the flash drive including includes a plurality of blocks, each of the plurality of blocks including a plurality of pages, and wherein hotness indicating indicates a data update frequency, wherein determining the expected hotness comprises: calculating a weighted average of the historical hotness and the recent hotness; searching the plurality of blocks for a matching block for storing the target data, the hotness of data being stored in the matching block matching the expected hotness of the target data, wherein the matching block is an active block, from the plurality of blocks, currently in use and with a highest hotness matching degree; selecting, in response to not finding the matching block, a free block from the plurality of blocks to store the target data to enable garbage collection in the flash drive, the free block being a block that has been reclaimed by a previous garbage collection, selecting the free block based on the expected hotness of the target data and a degree of wear of the free block, the degree of wear being determined based on the hotness of data previously stored in the free block; and storing the target data in the selected free block.

7. The device of claim 6 , the acts further comprising:

determining, periodically, a data usage pattern of the target data, the data usage pattern indicating operations performed on the target data; and

updating the historical hotness based on the data usage pattern.

8. The device of claim 6 , wherein the degree of wear of the free block indicates a number of times that the free block has been previously used to store data with high hotness.

9. The device of claim 6 , wherein selecting the free block comprises:

selecting, in response to the expected hotness of the target data exceeding threshold hotness, the free block with the degree of wear below a threshold degree of wear; and

selecting, in response to the expected hotness of the target data being equal or below the threshold hotness, the free block with the degree of wear exceeding the threshold degree of wear.

10. The device of claim 8 , the acts further comprising:

incrementing, in response to the previous garbage collection performed on a block of the plurality of blocks, the degree of wear of the block if a hotness of data currently stored in the block exceeds threshold hotness.

11. A computer program product being tangibly stored on a non-transient machine-readable medium and comprising machine-executable instructions, the instructions, when executed on a device, causing the device to: determine expected hotness of target data to be stored in a flash drive according to a historical hotness of the target data and a recent hotness of the target data, the historical hotness indicating a historical update frequency of the target data in a previous period of time and the recent hotness indicating a recent update frequency of the target data in a recent period of time, wherein the recent period of time for the recent hotness is more recent than the previous period of time for the historical hotness, wherein the flash drive including includes a plurality of blocks, each of the plurality of blocks including a plurality of pages, and wherein hotness indicating indicates a data update frequency, wherein determining the expected hotness comprises: calculating a weighted average of the historical hotness and the recent hotness; search the plurality of blocks for a matching block for storing the target data, the hotness of data being stored in the matching block matching the expected hotness of the target data, wherein the matching block is an active block, from the plurality of blocks, currently in use and with a highest hotness matching degree; select, in response to not finding the matching block, a free block from the plurality of blocks to store the target data to enable garbage collection in the flash drive, the free block being a block that has been reclaimed by a previous garbage collection, selecting the free block based on the expected hotness of the target data and a degree of wear of the free block, the degree of wear being determined based on the hotness of data previously stored in the free block; and store the target data in the selected free block.

12. The computer program product of claim 11 , wherein the instructions, when executed on the device, cause the device to:

determine, periodically, a data usage pattern of the target data, the data usage pattern indicating operations performed on the target data; and

update the historical hotness based on the data usage pattern.

13. The computer program product of claim 11 , wherein the instructions, when executed on the device, cause the device to:

select, in response to the expected hotness of the target data exceeding a threshold hotness, the free block with the degree of wear below a threshold degree of wear; and

select, in response to the expected hotness of the target data being below the threshold hotness, the free block with the degree of wear exceeding the threshold degree of wear.

14. The computer program product of claim 11 , wherein the instructions, when executed on the device, cause the device to: increment, in response to the previous garbage collection performed on a block of the plurality of blocks, the degree of wear of the block if a hotness of data currently stored in the block exceeds threshold hotness.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 5, 2016
From: DAI, QIAO QING; FENG, ZHEN HUA; JIANG, XU CHU; WANG, FEI
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 038349/0399 →
Continuity (1)
Related Publication 20170285971A1 · Oct 5, 2017
Cited By (5)
US 1,089,340 US 12,208,456 US 12,265,707 US 12,293,077 US 12,436,883