CN115543859A - Wear leveling optimization method, device, equipment and medium for multi-partition SSD - Google Patents

Wear leveling optimization method, device, equipment and medium for multi-partition SSD Download PDF

Info

Publication number
CN115543859A
CN115543859A CN202210315025.5A CN202210315025A CN115543859A CN 115543859 A CN115543859 A CN 115543859A CN 202210315025 A CN202210315025 A CN 202210315025A CN 115543859 A CN115543859 A CN 115543859A
Authority
CN
China
Prior art keywords
physical block
blank
partition
blank physical
management module
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.)
Pending
Application number
CN202210315025.5A
Other languages
Chinese (zh)
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 Yilian Information System Co Ltd
Original Assignee
Suzhou Yilian Information System 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 Yilian Information System Co Ltd filed Critical Suzhou Yilian Information System Co Ltd
Priority to CN202210315025.5A priority Critical patent/CN115543859A/en
Publication of CN115543859A publication Critical patent/CN115543859A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7211Wear leveling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a wear leveling optimization method, a wear leveling optimization device, wear leveling optimization equipment and a wear leveling optimization medium for a multi-partition SSD, wherein the method comprises the following steps: receiving a command of a host computer to a partition needing to write data; the partition needing to write data applies for a blank physical block from a public blank physical block management module; the public blank physical block management module distributes blank physical blocks from the blank physical block chain to partitions needing to be written with data; judging whether the number of blank physical blocks on the blank physical block chain is less than a set threshold value or not; if yes, searching each partition to find out the partitions with the physical block occupying more than the set number; garbage collection is carried out on partitions of which the physical blocks occupy more than a set number; erasing the garbage physical block generated after garbage recovery to become a blank physical block; adding the physical block with the erasure becoming blank to a blank physical block chain of a common blank physical block management module. By the mode, the wear balance of the SSD is improved, and the service life is prolonged.

Description

Wear leveling optimization method, device, equipment and medium for multi-partition SSD
Technical Field
The invention relates to a solid state disk, in particular to a wear leveling optimization method, a wear leveling optimization device, wear leveling optimization equipment and a wear leveling optimization medium for a multi-partition SSD.
Background
SSD (solid state disk) has been widely used in various occasions, and has been gradually replacing the conventional HDD in the PC market at present, providing better experience for users in terms of reliability and performance.
In the existing SSD scheme, in order to improve performance or because of the requirement of multiple namespaces, multiple sets of management algorithm instances are generally run in a manner of establishing multiple virtual minidisks, and are respectively responsible for accessing a segment of logical space and storing data using an independent physical space.
Under the model, because a plurality of partitions and namespaces are completely independent and have no correlation, the requirements of performance improvement or independent management of the namespaces can be met. However, it is noted that in this scenario, as shown in fig. 1, since the physical storage areas between the partitions are isolated, for a specific host access (such as repeatedly accessing partition 1), the number of physical block erasures of the specific partition may increase rapidly, and the maximum number of erasures may become bad blocks or the quality may be degraded, so that normal access may not be performed.
In this scenario, other physical spaces in the disk are idle, resulting in significant waste.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a wear leveling optimization method, a wear leveling optimization device, wear leveling optimization equipment and wear leveling optimization media for a multi-partition SSD.
In order to achieve the purpose, the invention adopts the following technical scheme:
on one hand, the wear leveling optimization method of the multi-partition SSD is characterized in that a plurality of partitions of the SSD have a common public blank physical block management module, and blank physical blocks of all the partitions are gathered on a blank physical block chain of the public blank physical block management module; the method comprises the following steps:
receiving a command of a host to a partition needing to write data;
the partition needing to write data applies for a blank physical block from a public blank physical block management module;
the common empty physical block management module allocates an empty physical block from its chain of empty physical blocks to the partition to which data needs to be written.
The further technical scheme is as follows: and sorting the physical blocks on the blank physical block chain from large to small according to the PE erasing.
The further technical scheme is as follows: the public blank physical block management module distributes blank physical blocks from the blank physical block chain to the partition needing to be written with data, and distributes the blank physical blocks with the minimum PE erasure on the blank physical block chain to the partition needing to be written with data.
The further technical scheme is as follows: the method further comprises the following steps:
judging whether the number of blank physical blocks on the blank physical block chain is less than a set threshold value or not;
if the number of the partitions is less than the set threshold value, searching each partition to find out the partitions with the physical blocks occupying more than the set number;
performing garbage collection on partitions with the number of occupied physical blocks exceeding a set number;
erasing the garbage physical block generated after garbage recovery to become a blank physical block;
adding the physical block with the erasure becoming blank to a blank physical block chain of a common blank physical block management module.
The further technical scheme is as follows: and the physical blocks which are erased into blank are added into the blank physical block chain of the public blank physical block management module according to the sequence rule of PE erasing from large to small.
In a second aspect, in a wear leveling optimization apparatus for a multi-partition SSD, a plurality of partitions of the SSD have a common blank physical block management module, and blank physical blocks of all the partitions are gathered on a blank physical block chain of the common blank physical block management module; the device comprises a receiving unit, an application unit and a distribution unit;
the receiving unit is used for receiving a command of a host computer to a partition needing to be written with data;
the application unit is used for applying the blank physical block to the public blank physical block management module by the partition needing to write data;
the allocation unit is used for the public blank physical block management module to allocate the blank physical blocks from the blank physical block chain to the partitions needing to be written with data.
The further technical scheme is as follows: the device also comprises a judging unit, a searching unit, a recycling unit, an erasing unit and an adding unit;
the judging unit is used for judging whether the number of the blank physical blocks on the blank physical block chain is less than a set threshold value;
the searching unit is used for searching each partition if the number of the partitions is less than the set threshold value so as to search the partitions with the physical blocks occupying more than the set number;
the recovery unit is used for recovering garbage of the partitions with the physical block occupying more than the set number;
the erasing unit is used for erasing the garbage physical block generated after garbage recovery into a blank physical block;
and the adding unit is used for adding the physical block which is erased to be blank into a blank physical block chain of the public blank physical block management module.
In a third aspect, a computer device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the wear leveling optimization method steps of a multi-partition SSD as described above when executing the computer program.
In a fourth aspect, a computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the wear leveling optimization method steps of a multi-partition SSD as described above.
Compared with the prior art, the invention has the beneficial effects that: a plurality of partitions of the SSD have a common public blank physical block management module, blank physical blocks of all the partitions are gathered on a blank physical block chain of the public blank physical block management module, when a command of a host to the partition needing to write data is received, a plurality of blank physical blocks are distributed from the blank physical block chain to the partition needing to write data to meet the seeking of data writing, and when the number of the blank physical blocks on the blank physical block chain is less than a set threshold value, garbage collection is carried out on the partitions with the physical blocks occupying more than the set number, so that the garbage physical blocks generated after garbage collection are erased to become blank physical blocks and added into the blank physical block chain.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical means of the present invention more clearly understood, the present invention may be implemented according to the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more apparent, the following detailed description will be given of preferred embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a schematic diagram of a typical prior art multi-partition/namespace SSD in a particular host access sequence;
FIG. 2 is a block diagram of the architecture between partitions and a common white space physical management module according to the present invention;
FIG. 3 is a flowchart of a wear leveling optimization method for a multi-partition SSD, according to an embodiment of the present invention;
FIG. 4 is a schematic block diagram of a wear leveling optimization apparatus for a multi-partition SSD in accordance with a specific embodiment of the present invention;
fig. 5 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to more fully understand the technical content of the present invention, the technical solution of the present invention will be further described and illustrated with reference to the following specific embodiments, but not limited thereto.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
The invention mainly aims at the scheme of the scene mode design of the SSD with multiple partitions, namely, the multiple partitions refer to abstracting a physical disk into a plurality of virtual sub-disks, and resources among the virtual sub-disks are relatively independent (CPU, firmware management algorithm, buffer area and NAND), so that the improvement of performance is guaranteed; in addition, a plurality of namespaces need to be set in part of the SSD, and the access priority of each space needs to be guaranteed, in this scenario, in order to reduce the association dependency, a plurality of virtual subdirectories are abstracted, and the resources are separated.
In the scene mode, because the multiple partitions and the namespaces are completely independent and have no correlation, the requirements of performance improvement or independent management of the multiple namespaces can be met. However, it is noted that in this scenario, as shown in fig. 1, since the physical storage areas between the partitions are isolated, for a specific host access (such as repeatedly accessing partition 1), the number of physical block erasures of the specific partition may increase rapidly, and the maximum number of erasures may become bad blocks or the quality may decrease, resulting in abnormal access.
How the present invention solves the above-mentioned technical problems will be described below by specific embodiments.
As shown in fig. 3, in the wear leveling optimization method for a multi-partition SSD, a plurality of partitions of the SSD have a common blank physical block management module, and blank physical blocks of all the partitions are collected on a blank physical block chain of the common blank physical block management module. The method comprises the following steps:
and S10, receiving a command of the host to the partition needing to be written with data.
When a host end sends a write-in command, the SSD is required to be in a power-on state, and each partition initializes its own user data block chain, garbage data block chain, and a common blank physical block management module is also required to be initialized.
The host sends a command to which partition to write data, which may be selected or determined according to a set program.
This embodiment will be described by taking an example in which data needs to be written into the X partition.
And S20, the partition needing to write data applies for the blank physical block from the public blank physical block management module.
And when data needs to be written into the X partition, the X partition applies for a blank physical block from the public blank physical block management module.
And S30, the public blank physical block management module allocates a blank physical block to a partition needing to be written with data from the blank physical block chain.
When the X partition applies for it, the common white space physical block management module allocates a white space physical block from its white space physical block chain to the X partition.
Preferably, the physical blocks in the blank physical block chain are sorted from large to small according to the PE erasures, and after the application is made by the X partition, the common blank physical block management module allocates the blank physical block with the minimum PE erasures in the blank physical block chain to the X partition. Because the physical blocks with smaller PE erasure are distributed each time, the physical blocks with smaller PE erasure indicate that the PE erasure frequency is less, and the time for changing the PE erasure frequency to a bad block is long until the maximum erasure frequency is reached, the physical blocks with better states can be distributed to the X partition preferentially by the distribution, and the physical blocks with non-ideal PE erasure frequency are prevented from being distributed to the X partition.
In some embodiments, as shown in fig. 3, the wear leveling optimization method of a multi-partition SSD further includes the steps of:
and S40, judging whether the number of the blank physical blocks on the blank physical block chain is less than a set threshold value, if so, executing a step S50, and if not, executing a step S10.
The set threshold may be set in advance according to the requirement, for example, set to 10, and when the number of blank physical blocks on the blank physical block chain is less than 10, step S50 is performed.
And S50, searching each partition to find out the partitions with the physical block occupying more than the set number.
The blank physical blocks in the blank physical block chain are recovered from each partition, and because the number of the physical blocks in different partitions is different, the number of the partitions occupying more than the set number from the physical blocks is designed to be searched, so that the physical blocks with more garbage in the corresponding partitions can be recovered and reused.
And S60, performing garbage collection on the partitions with the physical block occupying more than the set number.
The set number may be set in advance according to a requirement, for example, a rule is set that the total number of the physical blocks is divided by the number of the partitions as the set number.
Assuming that the partition exceeding the set number is a Y partition in the present embodiment, garbage collection needs to be performed on the Y partition.
And S70, erasing the garbage physical block generated after garbage collection to obtain a blank physical block.
And S80, adding the physical block which is erased to be blank into a blank physical block chain of the public blank physical block management module.
Preferably, when erasing the physical block becoming blank is added to the blank physical block chain of the common blank physical block management module, the physical block becoming blank is also added according to the rule of ascending order of PE erasures.
As shown in fig. 2, it can be seen from fig. 2 that partition 1, partition 2, and partition 3 are all shared common blank physical block management modules, blank physical blocks on the common blank physical block management modules are recovered from partition 1, partition 2, and partition 3, and when partition 1, partition 2, and partition 3 need to write data, the common blank physical block management modules will distribute blank physical blocks to corresponding partitions from their blank physical chains, so that, by introducing the common blank physical block management modules, balance among multiple partitions can be performed when blank physical block distribution is triggered, thereby ensuring that the erase and write times of each physical block are increased in balance, improving the wear balance of the SSD, and also prolonging the service life.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Corresponding to the wear leveling optimization method for the multi-partition SSD, the specific embodiment of the invention also provides a wear leveling optimization device for the multi-partition SSD.
As shown in fig. 4, in the wear leveling optimization apparatus for a multi-partition SSD, multiple partitions of the SSD have a common blank physical block management module, and blank physical blocks of all the partitions are collected on a blank physical block chain of the common blank physical block management module; the device comprises a receiving unit 1, an application unit 2 and a distribution unit 3.
The receiving unit 1 is used for receiving a command of a host to a partition needing to write data.
When a host end sends a write command, the SSD needs to be in a power-on state, and each partition initializes its own user data block chain, garbage data block chain, and the public blank physical block management module also needs to be initialized.
The host sends a command to which partition to write data, which may be selected or determined according to a set program.
This embodiment will be described by taking an example in which data needs to be written into the X partition.
And the application unit 2 is used for applying the blank physical block to the public blank physical block management module by the partition needing to write data.
And when data needs to be written into the X partition, the X partition applies for a blank physical block from the public blank physical block management module.
And the allocation unit 3 is used for the common blank physical block management module to allocate the blank physical blocks from the blank physical block chain to the partitions needing to be written with data.
When the X partition applies for it, the common white space physical block management module allocates a white space physical block from its white space physical block chain to the X partition.
Preferably, the physical blocks in the blank physical block chain are sorted from large to small according to the PE erasures, and after the application is made by the X partition, the common blank physical block management module allocates the blank physical block with the minimum PE erasures in the blank physical block chain to the X partition. Because each time the physical block with smaller PE erasure is distributed, the physical block with smaller PE erasure indicates that the erasure frequency of the PE is less, and the time from reaching the maximum erasure frequency to becoming a bad block is long, the physical block with better state can be preferentially distributed to the X partition by the distribution, and the physical block with non-ideal erasure frequency of the PE is prevented from being distributed to the X partition.
In some embodiments, as shown in fig. 4, the wear leveling optimization apparatus of a multi-partition SSD further includes a judgment unit 4, a lookup unit 5, a recovery unit 6, an erasing unit 7, and an adding unit 8.
And the judging unit 4 is configured to judge whether the number of the blank physical blocks in the blank physical block chain is less than a set threshold.
The set threshold may be set in advance according to requirements, for example, set to 10, and when the number of blank physical blocks on the blank physical block chain is less than 10, the processing of the lookup unit 5 is entered.
And the searching unit 5 is used for searching each partition if the number of the partitions is less than the set threshold value so as to find out the partitions with the physical block occupying more than the set number.
The blank physical blocks in the blank physical block chain are recovered from each partition, and because the number of the physical blocks in different partitions is different, the number of the partitions occupying more than the set number from the physical blocks is designed to be searched, so that the physical blocks with more garbage in the corresponding partitions can be recovered and reused.
And the recovery unit 6 is used for performing garbage recovery on the partitions with the physical block occupation exceeding the set number.
The set number may be set in advance according to a requirement, for example, a rule is set that the total number of physical blocks is divided by the number of partitions as the set number.
Assuming that the partition exceeding the set number is a Y partition in the present embodiment, garbage collection needs to be performed on the Y partition.
And an erasing unit 7 configured to erase the garbage physical block generated after garbage collection into a blank physical block.
And an adding unit 8, configured to add the physical block whose erasure has become blank to a blank physical block chain of the common blank physical block management module.
Preferably, when erasing the physical block becoming blank and adding the blank physical block chain of the common blank physical block management module, the blank physical block chain is also added according to the rule of the order from large to small of PE erasures.
As shown in fig. 2, it can be seen from fig. 2 that partition 1, partition 2, and partition 3 are all shared common blank physical block management modules, blank physical blocks on the common blank physical block management modules are recovered from partition 1, partition 2, and partition 3, and when partition 1, partition 2, and partition 3 need to write data, the common blank physical block management modules will distribute blank physical blocks to corresponding partitions from their blank physical chains, so that, by introducing the common blank physical block management modules, balance among multiple partitions can be performed when blank physical block distribution is triggered, thereby ensuring that the erase and write times of each physical block are increased in balance, improving the wear balance of the SSD, and also prolonging the service life.
As shown in fig. 5, the embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the wear leveling optimization method steps of the multi-partition SSD are implemented.
The computer device 700 may be a terminal or a server. The computer device 700 includes a processor 720, memory, and a network interface 750, which are connected by a system bus 710, where the memory may include non-volatile storage media 730 and internal memory 740.
The non-volatile storage medium 730 may store an operating system 731 and computer programs 732. The computer program 732, when executed, may cause the processor 720 to perform any of a variety of wear leveling optimization methods for multi-partition SSDs.
The processor 720 is used to provide computing and control capabilities, supporting the operation of the overall computer device 700.
The internal memory 740 provides an environment for the execution of the computer program 732 in the non-volatile storage medium 730, and when the computer program 732 is executed by the processor 720, the processor 720 can be enabled to execute any one of the wear leveling optimization methods for multi-partition SSDs.
The network interface 750 is used for network communication such as sending assigned tasks and the like. Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with aspects of the present application, and is not intended to limit the computing device 700 to which aspects of the present application may be applied, and that a particular computing device 700 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components. Wherein the processor 720 is configured to execute the program code stored in the memory to perform the following steps:
receiving a command of a host computer to a partition needing to write data;
the partition needing to write data applies for a blank physical block from a public blank physical block management module;
the common empty physical block management module allocates an empty physical block from its chain of empty physical blocks to the partition to which data needs to be written.
The further technical scheme is as follows: and sorting the physical blocks on the blank physical block chain from large to small according to the PE erasing.
The further technical scheme is as follows: the public blank physical block management module distributes blank physical blocks from the blank physical block chain to the partition needing to be written with data, and distributes the blank physical blocks with the minimum PE erasure on the blank physical block chain to the partition needing to be written with data.
The further technical scheme is as follows: the method further comprises the following steps:
judging whether the number of blank physical blocks on the blank physical block chain is less than a set threshold value or not;
if the number of the partitions is less than the set threshold value, searching each partition to find out the partitions with the physical blocks occupying more than the set number;
garbage collection is carried out on partitions of which the physical blocks occupy more than a set number;
erasing the garbage physical block generated after garbage recovery into a blank physical block;
and adding the physical block which is erased to be blank into a blank physical block chain of the public blank physical block management module.
The further technical scheme is as follows: and the physical blocks which are erased into blank are added into the blank physical block chain of the public blank physical block management module according to the sequence rule of PE erasing from large to small. It should be understood that, in the embodiment of the present Application, the Processor 720 may be a Central Processing Unit (CPU), and the Processor 720 may also be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field-Programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that the configuration of computer device 700 depicted in FIG. 5 is not intended to be limiting of computer device 700 and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be implemented in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units is merely illustrated, and in practical applications, the above distribution of functions may be performed by different functional units according to needs, that is, the internal structure of the apparatus may be divided into different functional units to perform all or part of the functions described above. Each functional unit in the embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application. For the specific working process of the units in the above-mentioned apparatus, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one type of logical function division, and other division manners may be available in actual implementation, for example, a plurality of units or components may be combined or integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. The wear leveling optimization method of the multi-partition SSD is characterized in that a plurality of partitions of the SSD have a common public blank physical block management module, and blank physical blocks of all the partitions are gathered on a blank physical block chain of the public blank physical block management module; the method comprises the following steps:
receiving a command of a host to a partition needing to write data;
the partition needing to write data applies for a blank physical block from a public blank physical block management module;
the common empty physical block management module allocates an empty physical block from its chain of empty physical blocks to the partition to which data needs to be written.
2. The wear leveling optimization method of a multi-partition SSD of claim 1, wherein physical blocks on a blank physical block chain are ordered from large to small as PE erasures.
3. The wear leveling optimization method for a multi-partition SSD of claim 2, wherein the common empty physical block management module allocates an empty physical block from its empty physical block chain to the partition requiring data writing, and the common empty physical block management module allocates an empty physical block with minimum PE erasure on its empty physical block chain to the partition requiring data writing.
4. The method of wear leveling optimization for a multi-partition SSD of claim 1, further comprising:
judging whether the number of blank physical blocks on the blank physical block chain is less than a set threshold value or not;
if the number of the partitions is less than the set threshold value, searching each partition to find out the partitions with the physical blocks occupying more than the set number;
garbage collection is carried out on partitions of which the physical blocks occupy more than a set number;
erasing the garbage physical block generated after garbage recovery into a blank physical block;
adding the physical block with the erasure becoming blank to a blank physical block chain of a common blank physical block management module.
5. The wear leveling optimization method for a multi-partition SSD according to claim 4, wherein the physical blocks with erasures changed to blank are added to the blank physical block chain of the common blank physical block management module, and the physical blocks with erasures changed to blank are added to the blank physical block chain of the common blank physical block management module according to a rule that PE erasures are in descending order.
6. The wear leveling optimization device for the multi-partition SSD is characterized in that a plurality of partitions of the SSD have a common public blank physical block management module, and blank physical blocks of all the partitions are gathered on a blank physical block chain of the public blank physical block management module; the device comprises a receiving unit, an application unit and a distribution unit;
the receiving unit is used for receiving a command of a host computer to a partition needing to be written with data;
the application unit is used for applying a blank physical block to the public blank physical block management module by the partition needing to write data;
the allocation unit is used for the public blank physical block management module to allocate the blank physical blocks from the blank physical block chain to the partitions needing to be written with data.
7. The wear leveling optimization apparatus for a multi-partition SSD of claim 6, wherein the apparatus further comprises a determining unit, a searching unit, a recycling unit, an erasing unit, and an adding unit;
the judging unit is used for judging whether the number of the blank physical blocks on the blank physical block chain is less than a set threshold value;
the searching unit is used for searching the partitions if the number of the partitions is less than the set threshold value so as to find out the partitions with the physical block occupying more than the set number;
the recovery unit is used for performing garbage recovery on the partitions with the physical block occupying more than the set number;
the erasing unit is used for erasing the garbage physical block generated after garbage recovery into a blank physical block;
and the adding unit is used for adding the physical block which is erased to be blank into a blank physical block chain of the public blank physical block management module.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the wear leveling optimization method steps of a multi-partition SSD according to any of claims 1-5 when executing the computer program.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the wear leveling optimization method steps of a multi-partition SSD according to any of claims 1-5.
CN202210315025.5A 2022-03-28 2022-03-28 Wear leveling optimization method, device, equipment and medium for multi-partition SSD Pending CN115543859A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210315025.5A CN115543859A (en) 2022-03-28 2022-03-28 Wear leveling optimization method, device, equipment and medium for multi-partition SSD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210315025.5A CN115543859A (en) 2022-03-28 2022-03-28 Wear leveling optimization method, device, equipment and medium for multi-partition SSD

Publications (1)

Publication Number Publication Date
CN115543859A true CN115543859A (en) 2022-12-30

Family

ID=84724242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210315025.5A Pending CN115543859A (en) 2022-03-28 2022-03-28 Wear leveling optimization method, device, equipment and medium for multi-partition SSD

Country Status (1)

Country Link
CN (1) CN115543859A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737064A (en) * 2023-03-29 2023-09-12 深圳市领德创科技有限公司 Data management method and system for solid state disk

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737064A (en) * 2023-03-29 2023-09-12 深圳市领德创科技有限公司 Data management method and system for solid state disk
CN116737064B (en) * 2023-03-29 2024-04-05 深圳市领德创科技有限公司 Data management method and system for solid state disk

Similar Documents

Publication Publication Date Title
US8990538B2 (en) Managing memory with limited write cycles in heterogeneous memory systems
CN103597444A (en) Managing data placement on flash-based storage by use
CN108733306B (en) File merging method and device
JP2013509658A (en) Allocation of storage memory based on future usage estimates
CN110209348B (en) Data storage method and device, electronic equipment and storage medium
CN103995855A (en) Method and device for storing data
CN110069219A (en) A kind of date storage method, system and electronic equipment and storage medium
CN110543435B (en) Mixed mapping operation method, device and equipment of storage unit and storage medium
CN111324303A (en) SSD garbage recycling method and device, computer equipment and storage medium
CN114996173B (en) Method and device for managing write operation of storage equipment
CN111309267A (en) Storage space allocation method and device, storage equipment and storage medium
CN112068777A (en) Management method and system of data storage medium, terminal device and storage medium
CN115543859A (en) Wear leveling optimization method, device, equipment and medium for multi-partition SSD
GB2497172A (en) Reserving space on a storage device for new data based on predicted changes in access frequencies of storage devices
CN112199042B (en) Storage space management method, device, chip, equipment and storage medium
CN116483740B (en) Memory data migration method and device, storage medium and electronic device
US10949340B2 (en) Block mapping systems and methods for storage device
CN111837105A (en) Electronic device and control method thereof
US20160232166A1 (en) Method and Apparatus for Accessing File
CN108959517B (en) File management method and device and electronic equipment
CN116048377A (en) Data processing method of solid state disk and related equipment
CN112000289A (en) Data management method for full flash storage server system and related components
CN109144399B (en) Data storage method and device and electronic equipment
CN106708831B (en) FAT (file allocation table) image file processing method and device
CN117234435B (en) File storage method and device

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