CN117472590B - Storage scheduling method, storage scheduling component, storage device, computer equipment and medium - Google Patents

Storage scheduling method, storage scheduling component, storage device, computer equipment and medium Download PDF

Info

Publication number
CN117472590B
CN117472590B CN202311814069.3A CN202311814069A CN117472590B CN 117472590 B CN117472590 B CN 117472590B CN 202311814069 A CN202311814069 A CN 202311814069A CN 117472590 B CN117472590 B CN 117472590B
Authority
CN
China
Prior art keywords
heat
super
data
super block
word line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311814069.3A
Other languages
Chinese (zh)
Other versions
CN117472590A (en
Inventor
王琨
付凤之
高美洲
刘忞斋
杨勇军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311814069.3A priority Critical patent/CN117472590B/en
Publication of CN117472590A publication Critical patent/CN117472590A/en
Application granted granted Critical
Publication of CN117472590B publication Critical patent/CN117472590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure relates to the field of storage devices, and in particular, to a storage scheduling method, a storage device, a component, a computer device, and a medium. The storage scheduling method comprises the following steps: acquiring heat information of super word lines in each super block in the storage device, and analyzing distribution of cold data and heat data in each super block; evaluating the heat parameter of each super block by using the distribution of cold data and hot data, selecting the super block with the heat parameter meeting the recovery condition as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the recovery condition comprises that the heat parameter of the super block which can be used as a source super block is lower than that of other super blocks with preset quantity; and migrating the data of the source super block to the target super block in a first transmission mode. The method can balance the distribution of cold and hot data in the super block, is favorable for balancing the erasable times of the super block, and is further favorable for prolonging the service cycle of the storage device.

Description

Storage scheduling method, storage scheduling component, storage device, computer equipment and medium
Technical Field
The present disclosure relates to the field of storage devices, and in particular, to a storage scheduling method, a storage scheduling component, a storage device, a computer device, and a computer readable storage medium.
Background
The storage device such as a solid state disk applying NAND flash memory supports programming operation and operation, and can ensure continuous writing of data through reserved space and garbage collection. However, programming and erasing operations can cause irreversible damage to the physical structure of the floating gate transistor. In view of performance reliability and the importance of the headspace, it is generally determined whether or not to perform a data migration operation through static wear leveling and dynamic wear leveling. However, due to the unreasonable design of the wear leveling method, the current problems of complicated leveling process and poor universality exist.
Disclosure of Invention
Accordingly, in view of the above-mentioned problems, it is necessary to provide a storage scheduling method, a storage scheduling component, a storage device, a computer apparatus, and a computer readable storage medium, which can balance distribution of cold and hot data in a super block, and is beneficial to balance the erasable times of the super block, and further beneficial to prolonging the service cycle of the storage device.
In one aspect, a storage scheduling method is provided, where the storage scheduling method includes: acquiring heat information of super word lines in each super block in the storage device, and analyzing distribution of cold data and heat data in each super block; evaluating the heat parameter of each super block by using the distribution of cold data and hot data, selecting the super block with the heat parameter meeting the recovery condition as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the recovery condition comprises that the heat parameter of the super block which can be used as a source super block is lower than that of other super blocks with preset quantity; and migrating the data of the source super block to the target super block in a first transmission mode.
In one embodiment of the present application, the distribution of cold data, hot data, includes the heat offset parameter of the super word line; evaluating the heat parameters of the superblock using the distribution of cold data, hot data, includes: acquiring the number of effective data frames of the super block; acquiring weight parameters, and weighting the heat offset parameters by using the weight parameters; and superposing the weighted result and the effective data frame number to serve as a heat parameter.
In one embodiment of the present application, the distribution of cold data, hot data, includes a heat offset parameter that includes a mean factor and a bias factor; analyzing the distribution of cold data and hot data in the super block comprises: acquiring a global heat mean value of the super word lines in the storage device, and acquiring global heat bias of each super word line in the storage device based on the global heat mean value; acquiring a local heat mean value of a super word line in the super block, and acquiring local heat deflection of the super block based on the local heat mean value; taking the difference value between the local heat mean value and the global heat mean value as a mean value factor; the difference between the local heat bias and the global heat bias is used as a bias factor.
In an embodiment of the present application, the weight parameter includes a first weight and a second weight; the first weight is used for weighting the mean value factors to obtain first floating factors; the second weight is used for weighting the skewness factor to obtain a second floating factor; the ratio of the sum of the first floating factor and the second floating factor to the number of effective data frames of the super block is 2% -10%.
In one embodiment of the present application, obtaining a global heat mean value of a super word line in a memory device includes: taking the storage device as an analysis range, and acquiring heat information of each super word line of the storage device; calculating the ratio of the sum of the heat information of each super word line in the storage device to the number of the super word lines in the acquired storage device, and taking the ratio as the global heat mean value; and/or, obtaining the local heat mean value of the super word line in the super block comprises: taking the current super block as an analysis range, and acquiring heat information of each super word line in the current super block; and calculating the ratio of the sum value of the heat information of each super word line in the current super block to the number of the super word lines in the current super block, and taking the ratio as the local heat mean value.
In an embodiment of the present application, the calculation formula of the heat parameter is: VDFC (virtual double-sided fiber) n eff =VDFC n + C 1 *(S n -S tot )+ C 2 *(t ni avg -t tot avg ),VDFC n eff Representing the heat parameter of the nth superblock; VDFC (virtual double-sided fiber) n Representing the number of valid data frames of the nth superblock; c (C) 1 Representing a first weight; c (C) 2 Representing a second weight; s is S n Representing the local heat bias of the nth superblock; s is S tot Representing global heat bias of the storage device; t is t ni avg Representing the local heat mean value of the nth super block; t is t tot avg Representing a global heat mean value of the storage device; the weight parameters comprise a first weight and a second weight; the heat offset parameter comprises a mean value factor and a bias factor, wherein the difference value between the local heat mean value and the global heat mean value is taken as the mean value factor, and the difference value between the local heat bias and the global heat bias is taken as the bias factor.
In one embodiment of the present application, obtaining heat information of a super word line in each super block in a storage device includes: responding to the storage device to execute data writing operation, and acquiring writing time information of the super word line to form heat information; and writing the heat information into a preset recording space to call the heat information in the recording space, and analyzing the cold data and the distribution of the heat data in each super block.
In an embodiment of the present application, before acquiring the write time forming heat information of the super word line further includes: identifying a write type of a data write operation; responding to the writing type as a first transmission mode, and acquiring writing time information of the super word line through the first mode; responding to the writing type as a second transmission mode, and acquiring writing time information of the super word line in the second mode; the second transmission mode includes writing data into the storage device from the outside of the storage device and migrating the data in the storage device in response to the control instruction.
In an embodiment of the present application, obtaining write time information of a super word line to form heat information by a first method includes: responding to the current super word line written in the first transmission mode to have at least one source super word line, and respectively acquiring the writing time of each source super word line; acquiring the number of data frames recovered to the current super word line by each source super word line; accumulating the number of the data frames to obtain the total number of the data frames; respectively obtaining products of writing time and data frame number of each source super word line, and accumulating and summing each product; and obtaining the ratio of the accumulated and summed result to the total number of data frames as the writing time of the current super word line.
In an embodiment of the present application, obtaining write time information of the super word line to form heat information by the second method includes: acquiring a time stamp of the super word line written into the super block in a second transmission mode; the time stamp is marked as write time information for the super word line.
In an embodiment of the present application, migrating data of a source superblock to a target superblock in a first transmission manner includes: mapping at least one source super block to be migrated and one target super block, and writing the data of the source super block into the target super block; removing the target super block from the reserved space of the storage device, so that the target super block can be used as a target data block migrated in a second transmission mode; the second transmission mode includes a host write operation.
In an embodiment of the present application, the storage device has a reserved space, and the reserved space includes at least one empty superblock; wherein each super block in the memory device supports a programming operation and an erasing operation; the method for acquiring the heat information of the super word lines in each super block in the storage device comprises the following steps: and acquiring word lines in the same position in the plurality of data blocks, processing the plurality of word lines to form a super word line, and taking the plurality of data blocks to which the word lines forming the super word line belong as a super block.
In another aspect, a storage scheduling component is provided, the storage scheduling component comprising: the system comprises a heat module, a control module and a configuration module; the heat degree module is used for recording heat degree information of the super word lines in the super block; the control module is used for acquiring heat information of super word lines in each super block in the storage device, analyzing distribution of cold data and heat data in each super block, and controlling migration of data of a source super block to a target super block in a first transmission mode; the configuration module is used for evaluating the heat parameters of each super block by using the distribution of cold data and hot data, selecting the super block with the heat parameters meeting the recovery conditions as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the reclamation conditions include that the heat parameter of the superblock that can be the source superblock is lower than the heat parameter of the other superblocks of the preset number.
In still another aspect, there is provided a storage device including: a flash memory unit and a memory scheduling component as in the previous embodiments connected to the flash memory unit.
In yet another aspect, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring heat information of super word lines in each super block in the storage device, and analyzing distribution of cold data and heat data in each super block; evaluating the heat parameter of each super block by using the distribution of cold data and hot data, selecting the super block with the heat parameter meeting the recovery condition as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the recovery condition comprises that the heat parameter of the super block which can be used as a source super block is lower than that of other super blocks with preset quantity; and migrating the data of the source super block to the target super block in a first transmission mode.
In yet another aspect, a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: acquiring heat information of super word lines in each super block in the storage device, and analyzing distribution of cold data and heat data in each super block; evaluating the heat parameter of each super block by using the distribution of cold data and hot data, selecting the super block with the heat parameter meeting the recovery condition as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the recovery condition comprises that the heat parameter of the super block which can be used as a source super block is lower than that of other super blocks with preset quantity; and migrating the data of the source super block to the target super block in a first transmission mode.
According to the storage scheduling method, the storage scheduling component, the storage device, the computer equipment and the computer readable storage medium, the distribution condition of cold and hot data in the super blocks can be analyzed, the storage scheduling is carried out by combining the distribution condition of cold and hot data, the cold and hot data in each super block can be balanced, and the risk of the super blocks which have more cold data and cannot meet the storage scheduling condition is reduced. Meanwhile, the storage scheduling is carried out by combining the cold and hot data, so that the increasing rate of the erasable frequency difference between the super blocks can be slowed down, the number of times of starting static wear balancing is reduced, and the erasable frequency of the super blocks is balanced. Thus, the service cycle of the storage device can be effectively prolonged.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a memory device of the present application;
FIG. 2 is a flow chart of an embodiment of a memory scheduling method of the present application;
FIG. 3 is a flow chart illustrating another embodiment of a memory scheduling method of the present application;
FIG. 4 is a schematic diagram of another embodiment of a memory device of the present application;
FIG. 5 is a flow chart of yet another embodiment of a storage scheduling method of the present application;
FIG. 6 is a schematic diagram illustrating the construction of one embodiment of a storage scheduling component of the present application;
FIG. 7 is a schematic diagram of an embodiment of a computer device of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In order to solve the technical problems of complicated equalization process and poor universality in the related art, the application provides a storage scheduling method, a storage scheduling assembly, a storage device, computer equipment and a computer readable storage medium, which can equalize cold and hot data distribution in a super block, are favorable for equalizing erasable times of the super block, and are further favorable for prolonging the service cycle of the storage device. The present application is described in detail below.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an embodiment of a memory device of the present application.
The storage device comprises a flash memory unit and a storage scheduling component connected with the flash memory unit.
The storage device may be a Solid State Disk or the like, such as an SSD (Solid State Disk/Solid State Drive, solid State drive) or the like.
The flash memory unit 11 may be a storage medium such as a NAND flash (NAND flash).
With the development of the information age, modern life of human beings has been free from storage technologies. It is easy to understand that different application scenarios may put different requirements on performance, reliability, stability, energy consumption, etc. of the storage device, so that the levels of hardware, software, algorithms, etc. of the storage device need to be continuously developed to meet the requirements of increasing data storage requirements on the storage device.
Taking a solid state disk of NAND flash memory as an example, the solid state disk has the characteristics of high reliability, high performance, low energy consumption and the like, and is one of development hot spots in the storage field.
The basic memory cell of NAND flash memory is a floating gate transistor, which can tunnel electrons into/out of the floating gate layer by a voltage-up operation of the gate or substrate. The floating gate layer can trap electrons, and the number of electrons in the floating gate layer has different effects on the threshold voltage, which means that the memory cell stores different data.
The minimum programmed cells of the NAND flash memory are pages, and the minimum erased cells are blocks. Since NAND cannot perform an overwrite operation, a reserved space (Over Provisioning, OP) and garbage collection (Garbage Collection, GC) mechanism can be used to ensure that data can be written continuously.
The physical structure of the floating gate transistor is irreversibly damaged by the programming and erasing operations, so that it can be considered that the number of times of erasing (PE) has an influence on the life of the NAND solid state disk. In view of the reliability of the performance of the storage device and the importance of the OP, it is desirable that the storage units on the NAND solid state disk wear evenly to maximize life.
In general, wear leveling methods in NAND solid state disks can include two types: static wear leveling and dynamic wear leveling.
The static wear leveling is mainly used for judging whether data migration operation is needed to be carried out on the flash memory blocks which are already written through PE times, data retention time and the like.
Dynamic wear leveling is mainly aimed at selecting target blocks written by a host and GC, and PE growth rates of different blocks can be adjusted in real time. Dynamic wear leveling methods are typically included in the GC source block selection algorithm, where it is desirable to keep the cold and hot data separate to facilitate static wear leveling based on conventional garbage collection algorithms. If so, cold and hot data in the storage device are separated to a certain extent, and although the cold and hot data separation is favorable for facilitating static wear balance processing, the storage scheduling process is more tedious and has poorer universality.
In order to achieve the simplicity and universality of the storage scheduling method, the process of the storage scheduling method is optimized through the storage scheduling component 12, the rationality of the storage scheduling method is improved, the erasable frequency of the super block is regulated in a one-time storage scheduling process as much as possible, meanwhile, the cold and hot data distribution in the storage device is balanced, and meanwhile, the service life/period of the storage device can be effectively prolonged.
The specific working principle of the storage scheduling component for scheduling data in the storage device is explained in detail below.
Referring to fig. 2, fig. 2 is a flowchart illustrating an embodiment of a memory scheduling method according to the present application.
S201: and acquiring heat information of super word lines in each super block in the storage device, and analyzing distribution of cold data and heat data in each super block.
In this embodiment, the word line is a data transmission unit. A block is a unit of storage on a memory device.
The super word lines may include one or more word lines.
The data included by the superblock may include control information for the file volume, a volume resource table, most of the information about the file volume, etc.
The heat information may be equivalent to a heat frequency, and the heat information of the super word line may be associated with a write time, a call frequency, or the like, or may be associated with a write time, a call frequency, a latest call time, or the like, which is not described herein.
And the cold and hot data conditions in the super blocks can be evaluated based on the heat information of the super word lines, namely, the distribution of cold data and hot data in each super block is analyzed.
In this embodiment, the storage scheduling may be performed based on macroscopically performing storage scheduling on the cold data and hot data distribution of the superblock in the storage device. In an alternative embodiment, the proportion of the cold data and the hot data in the super block may be analyzed to perform storage scheduling, which is not described herein.
S202: evaluating the heat parameter of each super block by using the distribution of cold data and hot data, selecting the super block with the heat parameter meeting the recovery condition as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the reclamation conditions include that the heat parameter of the superblock that can be the source superblock is lower than the heat parameter of the other superblocks of the preset number.
In this embodiment, the heat parameter of each super block may be estimated by using the distribution of the cold data and the hot data, and the distribution of the cold data and the hot data of each super block in the storage device may be quantified by the heat parameter.
The recovery condition includes that the heat parameter of the superblock is lower than the heat parameter of the other superblocks of the preset number. This means that the superblock that meets the reclamation condition is the source superblock of the data to be migrated because the heat of the data stored in the current environment of the storage device is low.
For example, the predetermined amount may be a proportional value, such as 70%, 80%, 85%, 90%, etc.; alternatively, the predetermined number may be a specific number, such as 50, 100, 1000, etc., which is exemplary, and may be adapted for specific applications. Taking 80% of the preset number as an example, the heat parameter of the superblock that can be used as the source superblock in this embodiment is at least less than 80% of the total number of superblocks.
The storage device in this embodiment may have at least one empty superblock reserved, where the empty superblock may be that data written through an I/O (Input/Output) path or a storage schedule is not currently stored.
S203: and migrating the data of the source super block to the target super block in a first transmission mode.
In this embodiment, the data in the super block with low data heat is migrated to the target super block, which is favorable for reducing the risk of unbalanced cold and hot data distribution among super blocks caused by that the super block with more cold data does not perform storage scheduling such as garbage collection for a long time.
Therefore, in the embodiment, the distribution condition of cold and hot data in the super blocks can be analyzed, and the storage scheduling is performed by combining the distribution condition of cold and hot data, so that the cold and hot data in each super block can be balanced, and the risk of the super blocks which have more cold data and cannot meet the storage scheduling condition is reduced. Meanwhile, in the embodiment, the storage scheduling is performed by combining the cold and hot data, so that the increase rate of the erasable frequency difference between the super blocks can be slowed down, and the number of times of starting static wear balancing is reduced, namely the erasable frequency of the super blocks is balanced. Thus, the present embodiment can effectively prolong the service cycle of the storage device.
Referring to fig. 3, fig. 3 is a flowchart illustrating another embodiment of a memory scheduling method according to the present application.
S301: in response to the storage device performing a data write operation, a write type of the data write operation is identified.
In this embodiment, if the writing type of the data writing operation is the first transmission mode, step S303 is executed; if the writing type of the data writing operation is the second transmission mode, step S302 is executed.
The first transmission mode is to migrate the valid data in the super block to the blank super block and delete the useless data in the migrated super block. For example, the first transmission mode may be a GC (Garbage Collection ) write operation, which can release the unused space in the memory (e.g., heap memory) of the storage device.
The second transmission mode includes writing data from outside the storage device into the storage device, and migrating the data inside the storage device in response to the control instruction. For example, the second transmission mode includes a host write operation.
The definition of the superblock and superword line in this embodiment is also described herein.
Specifically, the word lines in the same position in the plurality of data blocks may be acquired, the plurality of word lines may be processed to form a super word line, and the plurality of data blocks to which the word lines forming the super word line belong may be regarded as one super block.
S302: and acquiring write time information of the super word line in a second mode.
In this embodiment, in response to the write type being the second transmission mode, write time information of the super word line is obtained through the second mode.
Specifically, a timestamp of the super word line writing the super block through the second transmission mode can be obtained; the time stamp is marked as write time information for the super word line.
S303: write time information of the super word line is acquired in a first manner.
In this embodiment, in response to the write type being the first transmission mode, write time information of the super word line is obtained through the first mode.
In particular, the current super word line currently written by the first transmission mode may have at least one source super word line. The write time of each source super word line can be acquired separately.
And acquiring the number of data frames recovered to the current super word line by each source super word line. The number of data frames is accumulated to obtain the total number of data frames.
And respectively obtaining products of the writing time of each source super word line and the number of the data frames, and accumulating and summing the products.
The ratio of the result of the accumulated summation to the total number of data frames is obtained and can be taken as the writing time of the current super word line.
In this embodiment, for different writing types, different writing time information obtaining strategies are respectively provided, so as to optimize the fineness of the storage schedule in this embodiment, and thus, the reliability of the storage schedule is improved. Further, in the embodiment, when the super word line is migrated in the storage through the first transmission mode, the time of the first/original writing of the super word line into the storage device can be considered, which is beneficial to improving the matching degree of the writing time information of the super word line and the real situation, so as to improve the reliability of storage scheduling.
In alternative embodiments, the first mode and the second mode may be the same, and will not be described herein.
S304: and acquiring write time information of the super word line to form heat information.
In this embodiment, the heat information is written into a preset recording space. In this way, the embodiment can form a standardized heat information recording process, so that when the distribution of cold data and heat data in each super block is analyzed, the heat information in the recording space is conveniently called, so as to obtain the heat information of the super word line in each super block in the storage device, and the flexibility and the record performance of storage scheduling can be improved. Alternatively, the heat information may be stored in the recording space in a format such as a table, which is not limited herein.
S305: and analyzing the heat offset parameter of each super block.
In this embodiment, the distribution of cold data, hot data, includes the heat offset parameter of the super word line. And if so, analyzing the heat offset parameters of each super block, and quantifying the distribution of cold data and heat data in each super block by utilizing the heat offset parameters. For example, the heat offset parameter may be a quantization super block cold and hot data distribution emphasis value; alternatively, the heat offset parameter may be an offset of the heat of the superblock itself from the global heat of the storage device, as illustrated in the present embodiment.
Further, the thermal offset parameter in this embodiment may include a mean factor and a bias factor.
Alternatively, the difference between the local heat mean and the global heat mean may be taken as a mean factor, and the difference between the local heat bias and the global heat bias may be taken as a bias factor.
Specifically, a global heat mean value of a super word line in a memory device is obtained. The heat information of each super word line of the storage device can be obtained by taking the storage device as an analysis range; and calculating the ratio of the sum value of the heat information of each super word line in the storage device to the number of the super word lines in the acquired storage device, and taking the ratio as the global heat mean value.
And acquiring the global heat bias of each super word line in the storage device based on the global heat mean value. That is, in the embodiment, when the storage scheduling is performed, the relative heat information between the super word lines in the storage device can be combined, which is favorable for enabling the storage scheduling to conform to the current overall state of the storage device, adaptively migrating the data, and improving the current suitability of the storage scheduling and the storage device.
And obtaining the local heat mean value of the super word line in the super block. The method comprises the steps of taking a current super block as an analysis range, and acquiring heat information of each super word line in the current super block; and calculating the ratio of the sum value of the heat information of each super word line in the current super block to the number of the super word lines in the current super block, and taking the ratio as the local heat mean value.
And obtaining the local heat deflection of the super block based on the local heat mean value. This means that in the present embodiment, when performing heat analysis of data in the super block, the heat distribution in the super block can be calculated in a targeted manner by focusing on the relative heat information between the super word lines in the super block, so as to be beneficial to obtaining reliable cold data and heat data distribution information.
The specific implementation manner of calculating the global heat deviation by the global heat mean value and obtaining the local heat deviation by the local heat mean value will be described in detail in the following examples, which will not be described herein.
S306: and acquiring the number of effective data frames of each super block.
In the present embodiment, the number of valid data frames may be VDFC (valid dataframe count, number of valid data frames) of a super block or the like.
S307: and obtaining weight parameters.
In this embodiment, the weight parameter may include a first weight and a second weight.
Optionally, the first weight and the second weight may be related to the flash memory granule and the firmware architecture of the storage device, that is, specific data of the first weight and the second weight may depend on the flash memory granule and the firmware architecture, specific detailed data may be determined through testing, and the values of the first weight and the second weight in the testing process may be selected to enable the storage device to have the value of the maximum lifetime. If so, in the embodiment, when the heat parameter of each super block is measured and calculated, the characteristics of the storage device can be fused, so that the storage scheduling method is more attached to the currently applied storage device, and conforms to the actual application scene, and meanwhile, the service life of the storage device can be further prolonged.
In an alternative embodiment, the values of both during the test may be selected to enable the storage device to have the optimal performance, which is not limited herein.
S308: the heat offset parameter is weighted with a weight parameter.
In this embodiment, the mean factor may be weighted with a first weight to obtain a first floating factor. The second weight may be utilized to weight the skewness factor to obtain a second floating factor.
Further, the sum of the first floating factor and the second floating factor is used as an adjustment parameter for adjusting the number of effective data frames in combination with the characteristics of the storage device, so as to form a heat parameter which is more adaptive to the current storage device, and the ratio of the adjustment parameter (i.e. the sum of the first floating factor and the second floating factor) to the number of effective data frames of the super block is 2% -10%. The method is beneficial to realizing that the heat adjustment is in a reasonable range, in other words, the risk that the storage scheduling cannot be effectively interfered due to too small adjustment parameters can be reduced, and the risk that the storage scheduling is too severe due to too large adjustment parameters can be reduced.
S309: and superposing the weighted result and the effective data frame number to serve as a heat parameter.
In this embodiment, the heat parameter of each super block is evaluated by using the distribution of the cold data and the hot data, specifically, the heat offset parameter of the super block and the effective data frame are used to obtain the heat parameter, for example, the effective data frame number of the super block can be subjected to gradient change by using the cold data and the hot data distribution information, so that the amplitude of the storage schedule is beneficial to adjusting, ensuring the effective storage schedule, and reducing the risk of excessively severe scheduling, in other words, the embodiment is beneficial to reliably realizing the storage schedule.
In this embodiment, a specific calculation formula of the heat parameter may be shown as the following formula:
VDFC n eff =VDFC n + C 1 *(S n -S tot )+ C 2 *(t ni avg -t tot avg ) 1-1
Wherein VDFC n eff Representing the heat parameter of the nth superblock; VDFC (virtual double-sided fiber) n Representing the number of valid data frames of the nth superblock; c (C) 1 Representing a first weight; c (C) 2 Representing a second weight; s is S n Representing the local heat bias of the nth superblock; s is S tot Representing global heat bias of the storage device; t is t ni avg Representing the local heat mean value of the nth super block; t is t tot avg Representing a global heat mean value of the storage device; the weight parameters comprise a first weight and a second weight; the heat offset parameter comprises a mean value factor and a bias factor, wherein the difference value between the local heat mean value and the global heat mean value is taken as the mean value factor, and the difference value between the local heat bias and the global heat bias is taken as the bias factor.
S310: and selecting the superblocks with the heat parameters meeting the recovery conditions as source superblocks to be migrated, and selecting the reserved blank superblocks as target superblocks to be migrated.
In this embodiment, the recovery conditions include: the heat parameter of the superblock that can be used as the source superblock is lower than the heat parameter of the other superblocks of the preset number.
As illustrated in fig. 4, fig. 4 is a schematic structural diagram of another embodiment of a storage device according to the present application, where the storage device may have a reserved space, and the reserved space includes at least one empty superblock. Wherein each superblock in the memory device supports a program operation and an erase operation.
The storage device may also have a used pool and the superblock currently storing the first transfer mode and/or the second transfer mode write data may be located in the used pool. In this embodiment, the superblock performing the heat parameter calculation may be a superblock located in a used pool, and the superblock currently needing to be stored and scheduled is selected from the used pool as a source superblock, and data of the superblock is migrated to a blank superblock located in a reserved space and serving as a target superblock.
S311: and migrating the data of the source super block to the target super block in a first transmission mode.
In this embodiment, a mapping may be established between at least one source superblock to be migrated and one target superblock, and data of the source superblock may be written into the target superblock.
And removing the target super block from the reserved space of the storage device, so that the target super block can be used as the target super block migrated through the second transmission mode and is not used as the target super block of the first transmission mode.
Optionally, as illustrated in fig. 4, the target superblock of the data written into the source superblock may be migrated to the used pool, so that the target superblock may be selected together in the second transmission mode, and the working efficiency of the storage device may be optimized.
Further, after the data migration is completed, the mapping relationship between the source superblock and the target superblock in this embodiment may be released.
In summary, the embodiment can be beneficial to uniformly distributing cold and hot data to each super block, and reduce the risk of super blocks which have more cold data and cannot reach the garbage collection threshold. Meanwhile, the method can slow down the increase rate of the difference value of the erasable times between the super blocks, can be beneficial to reducing the times of additionally starting static wear balance, reduces the risk of overlarge difference value of the erasable times between the super blocks, and further is beneficial to improving the performance stability of the storage device and effectively prolonging the service cycle of the storage device.
Referring to fig. 5, fig. 5 is a flowchart of another embodiment of the storage scheduling method of the present application.
In an embodiment, the preset recording space for recording the write time of the super word line mentioned in the above embodiment may be stored in the form of a table. In this embodiment, the write time of each super word line is recorded by a data write schedule.
After the data write operation, information of the data write schedule is updated to maintain the data write schedule. The data writing time of the data may be used as the writing time information in the above-described embodiment.
Specifically, as set forth in the foregoing embodiments, the write type may include a first transmission manner and a second transmission manner.
Taking the second transmission mode as the host write operation as an example, responding to the writing of the super word line into the storage device through the second transmission mode, marking the current time stamp as the current time, namely the data write time, for the super word line after finishing the host write operation of the ith super word line (namely the super word line) by the mth super block (namely the super block), and marking the current time stamp as the time stamp t mi
Taking the first transmission mode as a GC writing operation as an example, after the nth super block completes the writing operation of the second transmission mode of the jth super word line, the super word line is marked with a time stamp of data writing time, and is marked with a time stamp t nj . Since the GC writes one super word line whose source data may be composed of one or more super word lines, t nj Can be averaged from the data write time of the source super word line:
2-1
2-2
Wherein n is mi DF Super word line m is the source i (m i An ith super wordline representing an mth super block, the same applies below) is recycled to the target super wordline n j DF number of (d); DF is the dataframe, i.e. the data frame. n is n nj DF To be recycled to the target super word line n j Is the total DF number of (C).
And updating the time threshold value at each interval, calculating the data writing time distribution mean value and the skewness of all data on the SSD and calculating the data writing time distribution mean value and the skewness on each block by utilizing a data writing time table, so as to realize the data writing time distribution calculation. As shown by way of example in fig. 5, the update time threshold is reached, counting the heat offset parameter for each superblock in the storage device, with the time of the last update.
The overall data write time distribution average of all super word lines on the memory device, i.e. the global heat average is t tot avg The method comprises the steps of carrying out a first treatment on the surface of the The global heat standard deviation is sigma tot The method comprises the steps of carrying out a first treatment on the surface of the Global heat bias of S tot . The specific calculation formula is as follows:
2-3
2-4
2-5
Wherein N is tot SWL T is the number of super word lines where all valid data is located ni The write time of the ith super word line of the nth super block is shown.
The data write time distribution mean of all super word lines on the nth super block on the memory device, i.e. the local heat soaking is t n avg Standard deviation of local heat degree sigma n tot Local heat deflection of S tot . The specific calculation formula is as follows:
2-6
2-7
2-8
Wherein N is n SWL The number of super word lines for the nth super block.
In this embodiment, the direction of the data writing time deviating from the average data writing time is represented by the global heat deviation/the local heat deviation, so that the overall data is cold or hot, and the method is more dependent on/suitable for the actual application scenario of the storage device.
In this embodiment, when configuring the garbage collection source/target superblock, the data writing time average value and the data writing time skewness are considered at the same time when selecting the source superblock, so as to drive the data writing time skewness on the superblock to be consistent, thereby being beneficial to uniformly distributing the cold and hot data in each superblock. The determination can be made based on the data write time skewness of the source superblock and the overall data write time skewness of the superblock.
For example, the detailed configuration of the source superblock and the target superblock may be as follows: the storage device may have a used pool and a reserved space. The super blocks which can be used as garbage recycling source super blocks are located in the used pool, and the blank super blocks which can be used as target super blocks are located in the reserved space.
Specifically, the number of valid data frames (valid dataframe count, VDFC) for each superblock may be weighted with skewness to obtain a valid VDFC as a superblock heat parameter.
Taking the nth superblock as an example, the heat parameter is recorded as VDFC n eff The specific calculation formula can be as follows:
2-9
Wherein VDFC n The number of effective data frames of each super block n; c (C) 1 Is a first weight; c (C) 2 Is a second weight.
The storage scheduling in the first transmission mode can select the VDFC with the minimum heat parameter when selecting the source super block n eff The reclamation conditions may include a minimum heat parameter for the one or more superblocks within the storage device.
The target superblock may follow a one-to-many or one-to-one principle, i.e., one target superblock may have multiple or one source superblock to which data is migrated. That is, reclaiming data from one or more superblocks onto an idle superblock. This means that the data of one superblock is migrated to one empty superblock, where the data is not scattered.
After the blank superblock serving as the target superblock realizes data writing, the blank superblock can be migrated from the reserved space, is not used as the target superblock for storage scheduling of the first transmission mode, and can be used as the target superblock written by the host.
Further, the data in the superblock may carry a valid tag, including a valid tag and an invalid tag. When the storage scheduling superblock is used as a source superblock, the utility label of the data can be identified in the process of migrating the data to the target superblock, and the data is migrated to the target superblock in response to the fact that the data carries the effective label; and in response to the fact that the data carrying the invalid tag does not migrate, the data carrying the invalid tag which is not migrated can be erased later, and the storage space of the storage device is released.
It should be understood that, although the steps in the flowcharts of fig. 2-3 and 5 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-3, 5 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The specific structure of the storage scheduling component is described in detail below.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a storage scheduling component of the present application.
In one embodiment, the storage scheduling component includes a heat module 61, a control module 62, and a configuration module 63.
The heat module 61 is used for recording heat information of super word lines in the super block.
The control module 62 is connected to the heat module 61. The control module 62 may obtain heat information of the super word lines in each super block in the storage device, and analyze the cold data and the heat data distribution in each super block.
The configuration module 63 is connected to the control module 62. The configuration module 63 can evaluate the heat parameter of each superblock by using the distribution of the cold data and the hot data, select the superblock with the heat parameter meeting the recovery condition as the source superblock to be migrated, and select the reserved blank superblock as the target superblock to be migrated. Wherein the reclamation conditions include that the heat parameter of the superblock that can be the source superblock is lower than the heat parameter of the other superblocks of the preset number.
The control module 62 may control migration of data of the source superblock to the target superblock in a first manner of transmission.
Therefore, in the embodiment, the distribution condition of cold and hot data in the super blocks can be analyzed, and the storage scheduling is performed by combining the distribution condition of cold and hot data, so that the cold and hot data in each super block can be balanced, and the risk of the super blocks which have more cold data and cannot meet the storage scheduling condition is reduced. Meanwhile, in the embodiment, the storage scheduling is performed by combining the cold and hot data, so that the increase rate of the erasable frequency difference between the super blocks can be slowed down, and the number of times of starting static wear balancing is reduced, namely the erasable frequency of the super blocks is balanced. Thus, the present embodiment can effectively prolong the service cycle of the storage device.
For specific limitations of the storage scheduling component, reference may be made to the above limitation of the storage scheduling method, and no further description is given here. Each of the modules in the storage scheduling component described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of a computer device of the present application.
In one embodiment, a computer device includes a memory 71, a processor 72, and a computer program stored on the memory 71 and executable on the processor.
In one embodiment, the processor when executing the computer program performs the steps of: s201: and acquiring heat information of super word lines in each super block in the storage device, and analyzing distribution of cold data and heat data in each super block.
S202: evaluating the heat parameter of each super block by using the distribution of cold data and hot data, selecting the super block with the heat parameter meeting the recovery condition as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the reclamation conditions include that the heat parameter of the superblock that can be the source superblock is lower than the heat parameter of the other superblocks of the preset number.
S203: and migrating the data of the source super block to the target super block in a first transmission mode.
In an embodiment, the processor when executing the computer program further performs the steps of: s301: in response to the storage device performing a data write operation, a write type of the data write operation is identified.
In this embodiment, if the writing type of the data writing operation is the first transmission mode, step S303 is executed; if the writing type of the data writing operation is the second transmission mode, step S302 is executed.
The first transmission mode is to migrate the valid data in the super block to the blank super block and delete the useless data in the migrated super block. For example, the first transmission mode may be a GC (Garbage Collection ) write operation, which can release the unused space in the memory (e.g., heap memory) of the storage device.
The second transmission mode includes writing data from outside the storage device into the storage device, and migrating the data inside the storage device in response to the control instruction. For example, the second transmission mode includes a host write operation.
The definition of the superblock and superword line in this embodiment is also described herein.
Specifically, the word lines in the same position in the plurality of data blocks may be acquired, the plurality of word lines may be processed to form a super word line, and the plurality of data blocks to which the word lines forming the super word line belong may be regarded as one super block.
In an alternative embodiment, the super word line may be formed by selecting a plurality of word lines after a certain operation such as heat scoring, and will not be described herein.
S302: and acquiring write time information of the super word line in a second mode.
In this embodiment, in response to the write type being the second transmission mode, write time information of the super word line is obtained through the second mode.
Specifically, a timestamp of the super word line writing the super block through the second transmission mode can be obtained; the time stamp is marked as write time information for the super word line.
S303: write time information of the super word line is acquired in a first manner.
In this embodiment, in response to the write type being the first transmission mode, write time information of the super word line is obtained through the first mode.
In particular, the current super word line currently written by the first transmission mode may have at least one source super word line. The write time of each source super word line can be acquired separately.
And acquiring the number of data frames recovered to the current super word line by each source super word line. The number of data frames is accumulated to obtain the total number of data frames.
And respectively obtaining products of the writing time of each source super word line and the number of the data frames, and accumulating and summing the products.
The ratio of the result of the accumulated summation to the total number of data frames is obtained and can be taken as the writing time of the current super word line.
S304: and acquiring write time information of the super word line to form heat information.
In this embodiment, the heat information is written into a preset recording space. When the distribution of cold data and hot data in each super block is analyzed, the heat information in the recording space can be called to acquire the heat information of the super word line in each super block in the storage device.
S305: and analyzing the heat offset parameter of each super block.
In this embodiment, the distribution of cold data, hot data, includes the heat offset parameter of the super word line. And if so, analyzing the heat offset parameters of each super block, and quantifying the distribution of cold data and heat data in each super block by utilizing the heat offset parameters.
Further, the heat offset parameter may include a mean factor and a bias factor.
Alternatively, the difference between the local heat mean and the global heat mean may be taken as a mean factor, and the difference between the local heat bias and the global heat bias may be taken as a bias factor.
Specifically, a global heat mean value of a super word line in a memory device is obtained. The heat information of each super word line of the storage device can be obtained by taking the storage device as an analysis range; and calculating the ratio of the sum value of the heat information of each super word line in the storage device to the number of the super word lines in the acquired storage device, and taking the ratio as the global heat mean value.
And acquiring the global heat bias of each super word line in the storage device based on the global heat mean value.
And obtaining the local heat mean value of the super word line in the super block. The method comprises the steps of taking a current super block as an analysis range, and acquiring heat information of each super word line in the current super block; and calculating the ratio of the sum value of the heat information of each super word line in the current super block to the number of the super word lines in the current super block, and taking the ratio as the local heat mean value.
And obtaining the local heat deflection of the super block based on the local heat mean value.
S306: and acquiring the number of effective data frames of each super block.
In the present embodiment, the number of valid data frames may be VDFC (valid dataframe count, number of valid data frames) of a super block or the like.
S307: and obtaining weight parameters.
In this embodiment, the weight parameter may include a first weight and a second weight.
Optionally, the first weight and the second weight may be related to the flash memory granule and the firmware architecture of the storage device, that is, specific data of the first weight and the second weight may depend on the flash memory granule and the firmware architecture, specific detailed data may be determined through testing, and values of the first weight and the second weight in the testing process may be selected to enable the storage device to have a value of a maximum lifetime.
S308: the heat offset parameter is weighted with a weight parameter.
In this embodiment, the mean factor may be weighted with a first weight to obtain a first floating factor. The second weight may be utilized to weight the skewness factor to obtain a second floating factor.
Further, the ratio of the sum of the first floating factor and the second floating factor to the number of effective data frames of the super block is 2% -10%.
S309: and superposing the weighted result and the effective data frame number to serve as a heat parameter.
In this embodiment, the heat parameter of each super block is evaluated by using the distribution of the cold data and the hot data, specifically, the heat offset parameter of the super block and the valid data frame are used to obtain the heat parameter.
In this embodiment, a specific calculation formula of the heat parameter may be shown as the following formula:
3-1
VDFC n eff Representing the heat parameter of the nth superblock; VDFC (virtual double-sided fiber) n Representing the number of valid data frames of the nth superblock; c (C) 1 Representing a first weight; c (C) 2 Representing a second weight; s is S n Representing the local heat bias of the nth superblock; s is S tot Representing global heat bias of the storage device; t is t avg ni Indicating local heat levels of the nth superblockA value; t is t avg tot Representing a global heat mean value of the storage device; the weight parameters comprise a first weight and a second weight; the heat offset parameter comprises a mean value factor and a bias factor, wherein the difference value between the local heat mean value and the global heat mean value is taken as the mean value factor, and the difference value between the local heat bias and the global heat bias is taken as the bias factor.
S310: and selecting the superblocks with the heat parameters meeting the recovery conditions as source superblocks to be migrated, and selecting the reserved blank superblocks as target superblocks to be migrated.
In this embodiment, the reclamation conditions include that the heat parameter of the superblock that may be the source superblock is lower than the heat parameter of the other superblocks of the preset number.
The storage device has a reserved space comprising at least one empty superblock. Wherein each superblock in the memory device supports a program operation and an erase operation.
S311: and migrating the data of the source super block to the target super block in a first transmission mode.
In this embodiment, a mapping may be established between at least one source superblock to be migrated and one target superblock, and data of the source superblock may be written into the target superblock.
And removing the target super block from the reserved space of the storage device, so that the target super block can be used as a target data block migrated through the second transmission mode.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: s201: and acquiring heat information of super word lines in each super block in the storage device, and analyzing distribution of cold data and heat data in each super block.
S202: evaluating the heat parameter of each super block by using the distribution of cold data and hot data, selecting the super block with the heat parameter meeting the recovery condition as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the reclamation conditions include that the heat parameter of the superblock that can be the source superblock is lower than the heat parameter of the other superblocks of the preset number.
S203: and migrating the data of the source super block to the target super block in a first transmission mode.
In an embodiment, the computer program when executed by the processor further performs the steps of: s301: in response to the storage device performing a data write operation, a write type of the data write operation is identified.
In this embodiment, if the writing type of the data writing operation is the first transmission mode, step S303 is executed; if the writing type of the data writing operation is the second transmission mode, step S302 is executed.
The first transmission mode is to migrate the valid data in the super block to the blank super block and delete the useless data in the migrated super block. For example, the first transmission mode may be a GC (Garbage Collection ) write operation, which can release the unused space in the memory (e.g., heap memory) of the storage device.
The second transmission mode includes writing data from outside the storage device into the storage device, and migrating the data inside the storage device in response to the control instruction. For example, the second transmission mode includes a host write operation.
The definition of the superblock and superword line in this embodiment is also described herein.
Specifically, the word lines in the same position in the plurality of data blocks may be acquired, the plurality of word lines may be processed to form a super word line, and the plurality of data blocks to which the word lines forming the super word line belong may be regarded as one super block.
S302: and acquiring write time information of the super word line in a second mode.
In this embodiment, in response to the write type being the second transmission mode, write time information of the super word line is obtained through the second mode.
Specifically, a timestamp of the super word line writing the super block through the second transmission mode can be obtained; the time stamp is marked as write time information for the super word line.
S303: write time information of the super word line is acquired in a first manner.
In this embodiment, in response to the write type being the first transmission mode, write time information of the super word line is obtained through the first mode.
In particular, the current super word line currently written by the first transmission mode may have at least one source super word line. The write time of each source super word line can be acquired separately.
And acquiring the number of data frames recovered to the current super word line by each source super word line. The number of data frames is accumulated to obtain the total number of data frames.
And respectively obtaining products of the writing time of each source super word line and the number of the data frames, and accumulating and summing the products.
The ratio of the result of the accumulated summation to the total number of data frames is obtained and can be taken as the writing time of the current super word line.
S304: and acquiring write time information of the super word line to form heat information.
In this embodiment, the heat information is written into a preset recording space. When the distribution of cold data and hot data in each super block is analyzed, the heat information in the recording space can be called to acquire the heat information of the super word line in each super block in the storage device.
S305: and analyzing the heat offset parameter of each super block.
In this embodiment, the distribution of cold data, hot data, includes the heat offset parameter of the super word line. And if so, analyzing the heat offset parameters of each super block, and quantifying the distribution of cold data and heat data in each super block by utilizing the heat offset parameters.
Further, the heat offset parameter may include a mean factor and a bias factor.
Alternatively, the difference between the local heat mean and the global heat mean may be taken as a mean factor, and the difference between the local heat bias and the global heat bias may be taken as a bias factor.
Specifically, a global heat mean value of a super word line in a memory device is obtained. The heat information of each super word line of the storage device can be obtained by taking the storage device as an analysis range; and calculating the ratio of the sum value of the heat information of each super word line in the storage device to the number of the super word lines in the acquired storage device, and taking the ratio as the global heat mean value.
And acquiring the global heat bias of each super word line in the storage device based on the global heat mean value.
And obtaining the local heat mean value of the super word line in the super block. The method comprises the steps of taking a current super block as an analysis range, and acquiring heat information of each super word line in the current super block; and calculating the ratio of the sum value of the heat information of each super word line in the current super block to the number of the super word lines in the current super block, and taking the ratio as the local heat mean value.
And obtaining the local heat deflection of the super block based on the local heat mean value.
S306: and acquiring the number of effective data frames of each super block.
In the present embodiment, the number of valid data frames may be VDFC (valid dataframe count, number of valid data frames) of a super block or the like.
S307: and obtaining weight parameters.
In this embodiment, the weight parameter may include a first weight and a second weight.
Optionally, the first weight and the second weight may be related to the flash memory granule and the firmware architecture of the storage device, that is, specific data of the first weight and the second weight may depend on the flash memory granule and the firmware architecture, specific detailed data may be determined through testing, and values of the first weight and the second weight in the testing process may be selected to enable the storage device to have a value of a maximum lifetime.
S308: the heat offset parameter is weighted with a weight parameter.
In this embodiment, the mean factor may be weighted with a first weight to obtain a first floating factor. The second weight may be utilized to weight the skewness factor to obtain a second floating factor.
Further, the ratio of the sum of the first floating factor and the second floating factor to the number of effective data frames of the super block is 2% -10%.
S309: and superposing the weighted result and the effective data frame number to serve as a heat parameter.
In this embodiment, the heat parameter of each super block is evaluated by using the distribution of the cold data and the hot data, specifically, the heat offset parameter of the super block and the valid data frame are used to obtain the heat parameter.
In this embodiment, a specific calculation formula of the heat parameter may be shown as the following formula:
4-1
VDFC n eff Representing the heat parameter of the nth superblock; VDFC (virtual double-sided fiber) n Representing the number of valid data frames of the nth superblock; c (C) 1 Representing a first weight; c (C) 2 Representing a second weight; s is S n Representing the local heat bias of the nth superblock; s is S tot Representing global heat bias of the storage device; t is t avg ni Representing the local heat mean value of the nth super block; t is t avg tot Representing a global heat mean value of the storage device; the weight parameters comprise a first weight and a second weight; the heat offset parameter comprises a mean value factor and a bias factor, wherein the difference value between the local heat mean value and the global heat mean value is taken as the mean value factor, and the difference value between the local heat bias and the global heat bias is taken as the bias factor.
S310: and selecting the superblocks with the heat parameters meeting the recovery conditions as source superblocks to be migrated, and selecting the reserved blank superblocks as target superblocks to be migrated.
In this embodiment, the reclamation conditions include that the heat parameter of the superblock that may be the source superblock is lower than the heat parameter of the other superblocks of the preset number.
The storage device has a reserved space comprising at least one empty superblock. Wherein each superblock in the memory device supports a program operation and an erase operation.
S311: and migrating the data of the source super block to the target super block in a first transmission mode.
In this embodiment, a mapping may be established between at least one source superblock to be migrated and one target superblock, and data of the source superblock may be written into the target superblock.
And removing the target super block from the reserved space of the storage device, so that the target super block can be used as a target data block migrated through the second transmission mode.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The examples set forth above represent only a few embodiments of the present application, which are described in greater detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (15)

1. A storage scheduling method, characterized in that the storage scheduling method comprises:
acquiring heat information of super word lines in each super block in a storage device, and analyzing distribution of cold data and heat data in each super block;
evaluating the heat parameters of each super block by using the distribution of the cold data and the hot data, selecting the super block with the heat parameters meeting the recovery conditions as a source super block to be migrated, and selecting a reserved blank super block as a target super block to be migrated; wherein the recycling condition comprises that the heat parameter of the super block which can be used as the source super block is lower than that of other super blocks with preset quantity;
Migrating the data of the source super block to the target super block in a first transmission mode;
the distribution of the cold data and the hot data comprises a heat offset parameter of the super word line; the heat offset parameter is used for quantifying the offset of the distribution emphasis value of the cold and hot data in the super block or the heat of the super block per se relative to the global heat of the storage device;
evaluating the heat parameter of the superblock using the distribution of the cold data, the hot data includes:
acquiring the number of effective data frames of the super block;
acquiring weight parameters, and weighting the heat offset parameters by using the weight parameters;
and superposing the weighted result with the effective data frame number to serve as the heat parameter.
2. The storage scheduling method of claim 1, wherein the hotness offset parameter comprises a mean factor and a bias factor; analyzing the distribution of cold data and hot data in the super block comprises the following steps:
acquiring a global heat mean value of the super word lines in the storage device, and acquiring global heat skewness of each super word line in the storage device based on the global heat mean value;
acquiring a local heat mean value of the super word line in the super block, and acquiring local heat deflection of the super block based on the local heat mean value;
Taking the difference value between the local heat mean value and the global heat mean value as a mean value factor; taking the difference value between the local heat deflection and the global heat deflection as a deflection factor.
3. The storage scheduling method of claim 2, wherein the weight parameters include a first weight and a second weight; the first weight is used for weighting the mean value factors to obtain first floating factors; the second weight is used for weighting the skewness factor to obtain a second floating factor;
the ratio of the sum of the first floating factor and the second floating factor to the number of effective data frames of the super block is 2% -10%.
4. The memory scheduling method of claim 2, wherein the obtaining the global heat mean value of the super word line in the memory device comprises: taking the storage device as an analysis range, and acquiring heat information of each super word line of the storage device; calculating the ratio of the sum of the heat information of each super word line in the storage device to the number of the super word lines in the storage device, and taking the ratio as the global heat mean value;
and/or, the obtaining the local heat mean value of the super word line in the super block comprises: taking a current super block as an analysis range, and acquiring heat information of each super word line in the current super block; and calculating the ratio of the sum value of the heat information of each super word line in the current super block to the number of the super word lines in the current super block, and taking the ratio as the local heat mean value.
5. The storage scheduling method according to claim 1, wherein the calculation formula of the heat parameter is:
VDFC n eff =VDFC n + C 1 *(S n -S tot )+ C 2 *(t ni avg -t tot avg ),VDFC n eff representing the heat parameter of the nth superblock; VDFC (virtual double-sided fiber) n Representing the number of valid data frames of the nth superblock; c (C) 1 Representing a first weight; c (C) 2 Representing a second weight; s is S n Representing the local heat bias of the nth superblock; s is S tot Representing global heat bias of the storage device; t is t ni avg Representing the local heat mean value of the nth super block; t is t tot avg Representing a global heat mean value of the storage device;
wherein the weight parameter includes the first weight and the second weight; the heat offset parameter comprises a mean factor and a bias factor, wherein the difference value between the local heat mean value and the global heat mean value is used as the mean factor, and the difference value between the local heat bias and the global heat bias is used as the bias factor.
6. The memory scheduling method of claim 1, wherein the obtaining the heat information of the super word line in each super block in the memory device comprises:
responding to a storage device to execute data writing operation, and acquiring writing time information of the super word line to form the heat information;
and writing the heat information into a preset recording space to call the heat information in the recording space, and analyzing the distribution of cold data and heat data in each super block.
7. The memory scheduling method of claim 6, wherein the acquiring the write time of the super word line before forming the heat information further comprises:
identifying a write type of the data write operation;
responding to the writing type as the first transmission mode, and acquiring the writing time information of the super word line through a first mode; responding to the writing type as a second transmission mode, and acquiring the writing time information of the super word line through the second mode;
the second transmission mode comprises writing data into the storage device from the outside of the storage device and migrating the data in the storage device in response to a control instruction.
8. The memory scheduling method of claim 7, wherein obtaining write time information of the super word line by a first manner to form the heat information comprises:
responding to the fact that the current super word line written currently by the first transmission mode is provided with at least one source super word line, and respectively acquiring the writing time of each source super word line;
acquiring the number of data frames recovered to the current super word line by each source super word line; accumulating the data frame number to obtain total data frame number;
Respectively obtaining products of the writing time and the data frame number of each source super word line, and accumulating and summing each product;
and obtaining the ratio of the accumulated and summed result to the total number of data frames as the writing time of the current super word line.
9. The memory scheduling method of claim 7, wherein obtaining write time information of the super word line by the second method to form the heat information comprises:
acquiring a time stamp written into the super block by the super word line through the second transmission mode; the time stamp is marked as write time information of the super word line.
10. The storage scheduling method of claim 1, wherein the migrating the data of the source superblock to the target superblock in the first transmission manner comprises:
mapping at least one source super block to be migrated and one target super block, and writing data of the source super block into the target super block;
removing the target super block from the reserved space of the storage device, so that the target super block can be used as a target data block migrated in a second transmission mode; wherein the second transmission mode includes a host write operation.
11. The storage scheduling method of claim 1, wherein the storage device has a reserved space comprising at least one empty superblock; wherein each super block in the memory device supports a program operation and an erase operation;
the step of obtaining the heat information of the super word lines in each super block in the storage device comprises the following steps:
and acquiring word lines in the same position in a plurality of data blocks, processing the word lines to form a super word line, and taking the data blocks which form the word lines of the super word line as a super block.
12. A storage scheduling component, the storage scheduling component comprising:
the heat degree module is used for recording heat degree information of the super word lines in the super block;
the control module is used for acquiring heat information of super word lines in each super block in the storage device, analyzing distribution of cold data and hot data in each super block, and controlling migration of data of a source super block to a target super block in a first transmission mode;
the configuration module is used for evaluating the heat degree parameters of each super block by using the distribution of the cold data and the hot data, selecting the super block with the heat degree parameters meeting the recovery condition as the source super block to be migrated, and selecting the reserved blank super block as the target super block to be migrated; wherein the recycling condition comprises that the heat parameter of the super block which can be used as the source super block is lower than that of other super blocks with preset quantity; the distribution of the cold data and the hot data comprises a heat offset parameter of the super word line; the heat offset parameter is used for quantifying the offset of the distribution emphasis value of the cold and hot data in the super block or the heat of the super block per se relative to the global heat of the storage device; evaluating the heat parameter of the superblock using the distribution of the cold data, the hot data includes: acquiring the number of effective data frames of the super block; acquiring weight parameters, and weighting the heat offset parameters by using the weight parameters; and superposing the weighted result with the effective data frame number to serve as the heat parameter.
13. A storage device, the storage device comprising: a flash memory cell and a storage scheduling component as claimed in claim 12 connected to the flash memory cell.
14. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the storage scheduling method of any one of claims 1 to 11 when the computer program is executed.
15. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor realizes the steps of the storage scheduling method of any one of claims 1 to 11.
CN202311814069.3A 2023-12-27 2023-12-27 Storage scheduling method, storage scheduling component, storage device, computer equipment and medium Active CN117472590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311814069.3A CN117472590B (en) 2023-12-27 2023-12-27 Storage scheduling method, storage scheduling component, storage device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311814069.3A CN117472590B (en) 2023-12-27 2023-12-27 Storage scheduling method, storage scheduling component, storage device, computer equipment and medium

Publications (2)

Publication Number Publication Date
CN117472590A CN117472590A (en) 2024-01-30
CN117472590B true CN117472590B (en) 2024-03-19

Family

ID=89624114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311814069.3A Active CN117472590B (en) 2023-12-27 2023-12-27 Storage scheduling method, storage scheduling component, storage device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN117472590B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120096217A1 (en) * 2010-10-15 2012-04-19 Kyquang Son File system-aware solid-state storage management system
US20190179698A1 (en) * 2017-12-08 2019-06-13 Macronix International Co., Ltd. Managing Data Arrangement in a Super Block
CN111708481A (en) * 2020-04-24 2020-09-25 浙江大学 Solid State Disk (SSD) double-area wear leveling method based on super block
CN112181861A (en) * 2019-07-02 2021-01-05 爱思开海力士有限公司 Controller, memory system having the same, and method of operating the same
CN113467713A (en) * 2021-05-31 2021-10-01 深圳大普微电子科技有限公司 Data separation method and solid state disk

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120096217A1 (en) * 2010-10-15 2012-04-19 Kyquang Son File system-aware solid-state storage management system
US20190179698A1 (en) * 2017-12-08 2019-06-13 Macronix International Co., Ltd. Managing Data Arrangement in a Super Block
CN112181861A (en) * 2019-07-02 2021-01-05 爱思开海力士有限公司 Controller, memory system having the same, and method of operating the same
CN111708481A (en) * 2020-04-24 2020-09-25 浙江大学 Solid State Disk (SSD) double-area wear leveling method based on super block
CN113467713A (en) * 2021-05-31 2021-10-01 深圳大普微电子科技有限公司 Data separation method and solid state disk

Also Published As

Publication number Publication date
CN117472590A (en) 2024-01-30

Similar Documents

Publication Publication Date Title
US10209902B1 (en) Method and apparatus for selecting a memory block for writing data, based on a predicted frequency of updating the data
US10915442B2 (en) Managing block arrangement of super blocks
US8811074B2 (en) Parametric tracking to manage read disturbed data
US20130339574A1 (en) Variability aware wear leveling
CN107526543A (en) Shape storage device
US20100161880A1 (en) Flash initiative wear leveling algorithm
CN108897492B (en) Data writing method and device
CN107515728B (en) Data management method and device for developing internal concurrency characteristics of flash memory device
CN104298465A (en) Block grouping method in SSD
CN108874309B (en) Method and device for managing physical blocks in solid state disk
CN107092563B (en) Garbage recovery method and device
CN107544754B (en) Garbage recovery method and device
US20140047281A1 (en) Memory system and memory controller
CN111966299A (en) Wear leveling method and device for Nand Flash
CN115421651A (en) Data processing method of solid state disk, electronic device and medium
CN117472590B (en) Storage scheduling method, storage scheduling component, storage device, computer equipment and medium
CN112130749A (en) Data storage device and non-volatile memory control method
CN112908391B (en) Flash memory classification method and device based on mathematical model
CN110286848B (en) Data processing method and device
CN106951193B (en) Improve the method and its system of Nand Flash storage performance
WO2014185038A1 (en) Semiconductor storage device and control method thereof
CN106021124B (en) A kind of storage method and storage system of data
JP2021140311A (en) Memory system
CN108572924B (en) Request processing method of 3D MLC flash memory device
US20230087470A1 (en) Memory system and control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant