CN110688325B - Garbage recycling method, device and equipment for solid state disk and storage medium - Google Patents

Garbage recycling method, device and equipment for solid state disk and storage medium Download PDF

Info

Publication number
CN110688325B
CN110688325B CN201910838332.XA CN201910838332A CN110688325B CN 110688325 B CN110688325 B CN 110688325B CN 201910838332 A CN201910838332 A CN 201910838332A CN 110688325 B CN110688325 B CN 110688325B
Authority
CN
China
Prior art keywords
reading
task
read
unit data
tasks
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
CN201910838332.XA
Other languages
Chinese (zh)
Other versions
CN110688325A (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 Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur 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 Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910838332.XA priority Critical patent/CN110688325B/en
Publication of CN110688325A publication Critical patent/CN110688325A/en
Application granted granted Critical
Publication of CN110688325B publication Critical patent/CN110688325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0253Garbage collection, i.e. reclamation of unreferenced memory
    • 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

Abstract

The invention discloses a garbage recycling method, a garbage recycling device, garbage recycling equipment and a computer readable storage medium of a solid state disk, wherein the method comprises the following steps: reading the L2P table, and acquiring a reading task corresponding to unit data to be read; wherein, the unit data is data with a preset unit size; judging whether the same batch of reading tasks corresponding to the current reading task exist in the n reading tasks after the current reading task; the unit data corresponding to the same batch of reading tasks and the unit data corresponding to the current reading tasks belong to the same storage page; if so, initiating a common reading operation of the current reading task and the unit data corresponding to the same batch of reading tasks; the invention promotes the unit of the read operation in the garbage recovery of the solid state disk from one unit data to a plurality of unit data by initiating the common read operation of a plurality of unit data belonging to one storage page, can reduce the number of the read operation and increase the probability of hitting cache, thereby promoting the garbage recovery efficiency and improving the random write performance of the solid state disk.

Description

Garbage recycling method, device and equipment for solid state disk and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a garbage recycling method, a garbage recycling device, garbage recycling equipment and a computer readable storage medium for a solid state disk.
Background
With the development of modern society science and technology, solid state disks are increasingly used in computers for data storage.
In the prior art, since the l2p table (logical-physical mapping table) in the solid state disk is 4k, the corresponding garbage collection (gc) is also 4k to execute a flash read (or nand read) operation, and the actual flash read operation is performed in page. When a flash read operation is executed, data of 1 page (memory page, such as 16k) is read to a local cache (cache memory) of the flash read operation, and then 4k of data actually needed is selected from the cache and provided. Each lun (logical unit number) has an independent cache for read/write/erase operations, and when the operation type is changed, write- > read is performed, and cache emptying action is performed. If the read operation is finished and the write/erase operation is not performed, the data in the cache is always reserved, if the read operation is performed subsequently, the check (checking) data is checked to be in the cache, if the check (checking) data is in the cache, the data is directly fetched from the cache, if the check (checking) data is not in the cache, and if the check (checking) data is not in the cache, the flash read is executed to the cache, namely, the data in the cache is refreshed into new page data. The read operation (gc read) of the current garbage collection takes 4k as a unit, if the 2 nd read operation and the 1 st read operation belong to the same page, if no write/erase operation exists in the period, the cache is hit, namely data is read from the cache, and the time (such as 100us) of the flash read is saved.
From the efficiency of each stage of garbage collection of the solid state disk, the efficiency of the flash read is lower than that of the flash write, that is, the time of a gc strip is longer, and the overall efficiency of garbage collection is affected. Therefore, how to improve the garbage collection efficiency of the solid state disk, so as to improve the random writing performance of the solid state disk, is a problem that needs to be solved urgently nowadays.
Disclosure of Invention
The invention aims to provide a garbage collection method, a garbage collection device, garbage collection equipment and a computer readable storage medium for solid state disk, so that the probability of hitting cache is improved and the garbage collection efficiency of the solid state disk is improved by increasing the data volume of read operation of garbage collection.
In order to solve the technical problem, the invention provides a garbage recycling method for a solid state disk, which comprises the following steps:
reading the L2P table, and acquiring a reading task corresponding to unit data to be read; wherein the unit data is data of a preset unit size;
judging whether the same batch of reading tasks corresponding to the current reading task exist in the n reading tasks after the current reading task; the unit data corresponding to the same batch of reading tasks and the unit data corresponding to the current reading tasks belong to the same storage page; n is greater than or equal to 1 and less than or equal to the difference of m minus 1; m is the quotient of the size of the storage page divided by the size of the preset unit;
if so, initiating a common reading operation of the current reading task and the unit data corresponding to the same batch of reading tasks;
if not, initiating the reading operation of the unit data corresponding to the current reading task.
Optionally, the reading the L2P table to obtain a read task corresponding to the unit data to be read includes:
reading the L2P table, and sequentially judging whether each unit data needs to be read;
and generating a reading task corresponding to the unit data to be read, and hanging the reading task to a linked list to be processed.
Optionally, when the current read task is the first read task in the to-be-processed linked list, the determining whether the same batch of read tasks corresponding to the current read task exists in the read tasks of a first preset number after the current read task includes:
judging whether the same batch of read tasks corresponding to the first read task exist from the second read task to the (n + 1) th read task in the linked list to be processed;
if yes, executing a step of reading operation common to the current reading task and the unit data corresponding to the same batch of reading tasks, and updating the to-be-processed linked list;
if not, executing the step of initiating the reading operation of the unit data corresponding to the current reading task, and updating the to-be-processed linked list.
Optionally, the determining whether there is a same batch of read tasks corresponding to the first read task from the second read task to the (n + 1) th read task in the to-be-processed linked list further includes:
judging whether the number of the reading tasks in the to-be-processed linked list is greater than or equal to n + 1;
and if so, executing the step of judging whether the same batch of reading tasks corresponding to the first reading task exist from the second reading task to the (n + 1) th reading task in the to-be-processed linked list.
Optionally, the preset unit size is 4K, and the storage page size is 16K.
Optionally, n is 3.
The invention also provides a garbage recycling device of the solid state disk, which comprises:
the reading module is used for reading the L2P table and acquiring a reading task corresponding to unit data to be read; wherein the unit data is data of a preset unit size;
the judging module is used for judging whether the same batch of reading tasks corresponding to the current reading task exist in the n reading tasks after the current reading task; the unit data corresponding to the same batch of reading tasks and the unit data corresponding to the current reading tasks belong to the same storage page; n is greater than or equal to 1 and less than or equal to the difference of m minus 1; m is the quotient of the size of the storage page divided by the size of the preset unit;
the reading operation module is used for initiating the common reading operation of the current reading task and unit data corresponding to the same batch of reading tasks if the same batch of reading tasks corresponding to the current reading task exist; and if the same batch of reading tasks corresponding to the current reading task does not exist, initiating the reading operation of the unit data corresponding to the current reading task.
The invention also provides a garbage recycling device of the solid state disk, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the garbage collection method of the solid state disk according to any one of the above items when the computer program is executed.
Furthermore, the present invention also provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the garbage collection method for a solid state disk according to any one of the above items.
The invention provides a garbage recycling method of a solid state disk, which comprises the following steps: reading the L2P table, and acquiring a reading task corresponding to unit data to be read; wherein, the unit data is data with a preset unit size; judging whether the same batch of reading tasks corresponding to the current reading task exist in the n reading tasks after the current reading task; the unit data corresponding to the same batch of reading tasks and the unit data corresponding to the current reading tasks belong to the same storage page; n is greater than or equal to 1 and less than or equal to the difference of m minus 1; m is the quotient of the size of the storage page divided by the size of a preset unit; if so, initiating a common reading operation of the current reading task and the unit data corresponding to the same batch of reading tasks; if not, initiating the reading operation of unit data corresponding to the current reading task;
therefore, the read operation common to the plurality of unit data belonging to the same storage page is initiated, so that the unit of the read operation in the garbage collection of the solid state disk is promoted to the plurality of unit data from one unit data, the number of the read operation can be reduced, the probability of hitting cache is increased, the gc stripe time of the group is shortened, the garbage collection efficiency is improved, and the random write performance of the solid state disk is improved. In addition, the invention also provides a garbage recycling device and equipment of the solid state disk and a computer readable storage medium, and the garbage recycling device and equipment also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a garbage collection method for a solid state disk according to an embodiment of the present invention;
fig. 2 is a block diagram of a garbage recycling device for a solid state disk according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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.
Referring to fig. 1, fig. 1 is a flowchart illustrating a garbage collection method for a solid state disk according to an embodiment of the present invention. The method can comprise the following steps:
step 101: reading the L2P table, and acquiring a reading task corresponding to unit data to be read; the unit data is data of a preset unit size.
In this step, in the garbage collection process of the solid state disk, the processor reads the L2P table (logical physical mapping table) in the solid state disk, and determines the unit data to be read, so as to obtain the corresponding read task, that is, in this embodiment, the read task may be processed to perform a read operation on the unit data to be read. Specifically, the specific content of the read task in this embodiment may be set by a designer, so long as it is ensured that the processor can search the corresponding unit data to be read through the read task, and thus perform a read operation on the unit data, which is not limited in this embodiment.
Specifically, the unit data to be read in this step may be data of a preset unit size that needs to be read (gc read) in the garbage collection process. The specific size of the unit data, that is, the specific value setting of the preset unit size, can be set by a designer according to practical scenarios and user requirements, for example, the unit size can be set according to the L2P table, for example, when the L2P table uses 4K as a unit, the unit data can be 4K data, that is, the preset unit size is 4K. The preset unit size may also be other sizes, such as 2K or 512 bytes, and the embodiment does not limit this.
It should be noted that, for the specific manner in which the processor reads the L2P table in this step to obtain the read task corresponding to the unit data that needs to be read, the specific manner may be set by the designer, for example, for convenience of subsequent processing of the read task, the read task may be hung to a pending linked list (pending _ list), that is, in this step, the processor may read the L2P table during the garbage collection process, and sequentially determine whether each unit data needs to be read; and generating a reading task corresponding to the unit data to be read, and hanging the reading task to the to-be-processed linked list, namely, the storage sequence of the reading task in the to-be-processed linked list corresponds to the generation sequence and the subsequent processing sequence of the reading task.
Step 102: judging whether the same batch of reading tasks corresponding to the current reading task exist in the n reading tasks after the current reading task; if yes, go to step 103; if not, go to step 104; the unit data corresponding to the same batch of reading tasks and the unit data corresponding to the current reading task belong to the same storage page.
It is understood that n in this step may be a positive integer greater than or equal to 1 and less than or equal to m-1; m is a quotient of a memory page size divided by a preset unit size, for example, when the memory page (page) size is 16K and the preset unit size is 4K, m is 4, and n is a positive integer greater than or equal to 1 and less than or equal to 3. The current read task in this step may be a read task that needs to be processed at the current time.
Correspondingly, since the unit data needing to be read is determined by reading the L2P table in the garbage collection process, if a plurality of unit data needing to be read belong to one storage page, a plurality of corresponding read tasks are necessarily continuous. That is to say, in this step, whether the same batch of read tasks corresponding to the current read task exists in n read tasks after the current read task is judged, and whether read tasks (same batch of read tasks) capable of being processed together with the current read task exist in n read tasks after the current read task can be determined, so that unit data corresponding to the current read task and unit data corresponding to the same batch of read tasks and belonging to one memory page together with the unit data can be read together, and data (page data) of the size of the memory page can be cached into the cache only by one flash read, so that the unit data corresponding to the current read task and the same batch of read tasks can be read, the number of read operations is reduced, the situation that data in the cache is refreshed after one flash read in the prior art is reduced, and the probability of cache hit is improved.
Specifically, the specific value setting of n in this step, that is, the size of the maximum data volume read in each reading operation, may be set by a designer according to a practical scenario and a user requirement, and if n may be set to m-1, that is, the maximum data volume read in each reading operation is the size of a storage page, it is ensured that all unit data belonging to one storage page may be read in one reading operation, for example, the size of a storage page is 16K, and when the preset unit size is 4K, n may be set to 3. n may also be data smaller than m-1 and greater than or equal to 1, that is, the maximum data amount read in each reading operation is the size of n +1 unit data, for example, the size of the storage page is 16K, and when the preset unit size is 4K, n may be set to 1.
It should be noted that, for the specific manner of determining whether the same batch of read tasks corresponding to the current read task exists in the n read tasks after the current read task in this step, the specific manner may be set by a designer according to a practical scenario and a user requirement, for example, when the processor processes the first read task in the to-be-processed linked list each time, that is, when the current read task is the first read task in the to-be-processed linked list, this step may determine whether the same batch of read tasks corresponding to the first read task exists from the second read task to the (n + 1) th read task in the to-be-processed linked list; for example, when the size of the storage page is 16K, the preset unit size is 4K, and n is 3, the processor may determine whether the same batch of read tasks corresponding to the 1 st read task exists from the 2 nd read task to the 4 th read task in the to-be-processed linked list.
Correspondingly, the specific starting time of the step can be set by a designer, and if the step is carried out, the step of judging that the number of the acquired unprocessed reading tasks is greater than or equal to a preset value can be included; if yes, entering the step; the preset value is greater than or equal to n +1, namely the number of the acquired unprocessed read tasks is greater than or equal to n +1 through the setting of the preset value, so that the step can be smoothly carried out; for example, when the read tasks are stored in the to-be-processed linked list, whether the number of the read tasks in the to-be-processed linked list is greater than or equal to n +1 can be judged before the step; if yes, executing the step to judge whether the same batch of reading tasks corresponding to the first reading task exist from the second reading task to the (n + 1) th reading task in the linked list to be processed; if not, the step 101 may be continued or the generation of the read task in the step 101 may be waited. The step may also be performed at preset time intervals, that is, specific value setting of the preset time intervals ensures that the number of unprocessed read tasks that have been acquired before the step is performed is greater than or equal to n + 1. The present embodiment does not set any limit to this.
Specifically, the present embodiment does not limit the sequence of the step and the step 101, and the step 101 may be performed first and then, for example, after each read task is hooked to the to-be-processed linked list, it may be determined whether the number of read tasks in the to-be-processed linked list is greater than or equal to n + 1; if yes, entering the step; if not, returning to the step 101 to hang the next reading task to the linked list to be processed. Or, the step 101 and the step 101 can be performed simultaneously, for example, the step 101 continuously links the reading task to the linked list to be processed; when the number of the reading tasks in the chain table to be processed is more than or equal to n +1, the step is carried out; and when the number of the reading tasks in the to-be-processed linked list is less than n +1, waiting for the step 101 to be performed.
Step 103: and initiating the common read operation of the current read task and the unit data corresponding to the same batch read task.
It can be understood that the purpose of this step may be to initiate a read operation that is common to unit data corresponding to the current read task and the same batch of read tasks, so that one read operation may read a plurality of unit data corresponding to the current read task and the same batch of read tasks, and complete processing of the current read task and the same batch of read tasks at the same time, thereby increasing the number of read operations and increasing the probability of hitting the cache. For example, when the memory page size is 16K, the preset unit size is 4K, and n is 3, the read operation (gc read) for garbage collection can be in 16K units, that is, the read operation can read 4K data (as if the number of batch read tasks is 3) at most at one time, that is, 16K data.
Specifically, when the current read task in this step is the 1 st read task in the to-be-processed linked list, if the number of the same batch of read tasks is 3, in this step, a common read operation of unit data corresponding to the 1 st read task to the 4 th read task in the to-be-processed linked list can be initiated; and removing the first 4 read tasks from the chain table to be processed, and updating the chain table to be processed by the operation of forwarding the subsequent read tasks, namely forwarding the original 5 th read task to the 1 st read task so as to process the next read task.
Step 104: and initiating the reading operation of the unit data corresponding to the current reading task.
Specifically, when the current read task is the 1 st read task in the to-be-processed linked list, the read operation of unit data corresponding to the 1 st read task in the to-be-processed linked list can be initiated in this step; and the 1 st reading task is removed from the chain table to be processed, the chain table to be processed is updated by the operation of forwarding the subsequent reading task, namely, the original 2 nd reading task is forwarded to the 1 st reading task, so that the next reading task processing is carried out.
It can be understood that, in this embodiment, in order to increase the number of unit data read by the read operation in the garbage collection process of the solid state disk and belonging to one storage page, the garbage collection process after the step and the step 103 initiate the read operation may be performed in the same or similar manner as the garbage collection process of the solid state disk in the prior art, and this embodiment does not limit this.
In this embodiment, by initiating a read operation common to multiple unit data belonging to one storage page, the unit of the read operation in garbage collection of the solid state disk is promoted from one unit data to multiple unit data, so that the number of read operations can be reduced, the probability of cache hit is increased, the gc stripe time of the group is shortened, the garbage collection efficiency is improved, and the random write performance of the solid state disk is improved.
Referring to fig. 2, fig. 2 is a block diagram of a garbage recycling device for a solid state disk according to an embodiment of the present invention. The apparatus may include:
the reading module 10 is configured to read the L2P table, and obtain a reading task corresponding to unit data to be read; wherein, the unit data is data with a preset unit size;
the judging module 20 is configured to judge whether there is a same batch of read tasks corresponding to the current read task in n read tasks after the current read task; the unit data corresponding to the same batch of reading tasks and the unit data corresponding to the current reading tasks belong to the same storage page; n is greater than or equal to 1 and less than or equal to the difference of m minus 1; m is the quotient of the size of the storage page divided by the size of a preset unit;
the read operation module 30 is configured to initiate a common read operation for the current read task and the unit data corresponding to the same batch of read tasks if the same batch of read tasks corresponding to the current read task exists; and if the same batch of reading tasks corresponding to the current reading task does not exist, initiating the reading operation of the unit data corresponding to the current reading task.
Optionally, the reading module 10 includes:
the reading submodule is used for reading the L2P table and sequentially judging whether each unit data needs to be read;
and the hooking submodule is used for generating a reading task corresponding to the unit data to be read and hooking the reading task to the linked list to be processed.
Optionally, the determining module 20 includes:
and the judging submodule is used for judging whether the same batch of reading tasks corresponding to the first reading task exists from the second reading task to the (n + 1) th reading task in the to-be-processed linked list.
Optionally, the apparatus further comprises:
the quantity judging module is used for judging whether the quantity of the reading tasks in the linked list to be processed is larger than or equal to n + 1; if yes, a start signal is sent to the determination module 20.
In this embodiment, the read operation module 30 initiates a read operation common to multiple unit data belonging to one storage page, so that the unit of the read operation in garbage collection of the solid state disk is increased from one unit data to multiple unit data, the number of the read operations can be reduced, and the probability of hitting cache is increased, thereby shortening the gc stripe time of the group, improving the garbage collection efficiency, and improving the random write performance of the solid state disk.
An embodiment of the present invention further provides a garbage recycling apparatus for a solid state disk, including:
a memory for storing a computer program;
and the processor is used for implementing the steps of the garbage collection method for the solid state disk provided by the embodiment when executing the computer program.
The memory in this embodiment includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory may in some embodiments be an internal storage unit of a garbage collection device of the solid state disk, for example a hard disk of a garbage collection device of the solid state disk. The memory may also be an external storage device of the garbage collection device of the solid state disk in other embodiments, such as a plug-in hard disk provided on the garbage collection device of the solid state disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory may also include both an internal storage unit and an external storage device of the garbage collection device of the solid state disk. The memory can be used for storing application software and various data of the garbage recycling device installed on the solid state disk, for example: the code of the program or the like that executes the garbage collection method of the solid state disk may also be used to temporarily store data that has been output or is to be output.
The processor in this embodiment may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is configured to run program codes stored in a memory or process data, for example, codes of a program for executing a garbage collection method of a solid state disk, and the like.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the garbage collection method for a solid state disk provided in the foregoing embodiment are implemented.
Wherein the computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device, the apparatus and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The method, the apparatus, the device and the computer readable storage medium for garbage collection of a solid state disk provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (9)

1. A garbage recycling method of a solid state disk is characterized by comprising the following steps:
reading the L2P table, and acquiring a reading task corresponding to unit data to be read; wherein the unit data is data of a preset unit size;
judging whether the same batch of reading tasks corresponding to the current reading task exist in the n reading tasks after the current reading task; the unit data corresponding to the same batch of reading tasks and the unit data corresponding to the current reading tasks belong to the same storage page; n is greater than or equal to 1 and less than or equal to the difference of m minus 1; m is the quotient of the size of the storage page divided by the size of the preset unit;
if so, initiating a common reading operation of the current reading task and the unit data corresponding to the same batch of reading tasks;
if not, initiating the reading operation of the unit data corresponding to the current reading task.
2. The garbage collection method of claim 1, wherein the reading the L2P table to obtain a read task corresponding to the unit data to be read includes:
reading the L2P table, and sequentially judging whether each unit data needs to be read;
and generating a reading task corresponding to the unit data to be read, and hanging the reading task to a linked list to be processed.
3. The garbage collection method of claim 2, wherein when the current read task is the first read task in the to-be-processed linked list, the determining whether there is a same batch of read tasks corresponding to the current read task in a first preset number of read tasks after the current read task comprises:
judging whether the same batch of read tasks corresponding to the first read task exist from the second read task to the (n + 1) th read task in the linked list to be processed;
if yes, executing a step of reading operation common to the current reading task and the unit data corresponding to the same batch of reading tasks, and updating the to-be-processed linked list;
if not, executing the step of initiating the reading operation of the unit data corresponding to the current reading task, and updating the to-be-processed linked list.
4. The garbage collection method of claim 3, wherein before determining whether there is a read task in the same batch corresponding to the first read task from the second read task to the (n + 1) th read task in the to-be-processed linked list, the method further comprises:
judging whether the number of the reading tasks in the to-be-processed linked list is greater than or equal to n + 1;
and if so, executing the step of judging whether the same batch of reading tasks corresponding to the first reading task exist from the second reading task to the (n + 1) th reading task in the to-be-processed linked list.
5. The garbage collection method of the solid state disk of claim 1, wherein the preset unit size is 4K, and the storage page size is 16K.
6. The garbage collection method for the solid state disk according to claim 5, wherein n is 3.
7. The utility model provides a rubbish recovery unit of solid state hard drives which characterized in that includes:
the reading module is used for reading the L2P table and acquiring a reading task corresponding to unit data to be read; wherein the unit data is data of a preset unit size;
the judging module is used for judging whether the same batch of reading tasks corresponding to the current reading task exist in the n reading tasks after the current reading task; the unit data corresponding to the same batch of reading tasks and the unit data corresponding to the current reading tasks belong to the same storage page; n is greater than or equal to 1 and less than or equal to the difference of m minus 1; m is the quotient of the size of the storage page divided by the size of the preset unit;
the reading operation module is used for initiating the common reading operation of the current reading task and unit data corresponding to the same batch of reading tasks if the same batch of reading tasks corresponding to the current reading task exist; and if the same batch of reading tasks corresponding to the current reading task does not exist, initiating the reading operation of the unit data corresponding to the current reading task.
8. The utility model provides a garbage recycling equipment of solid state hard drives which characterized in that includes:
a memory for storing a computer program;
a processor for implementing the steps of the garbage collection method of the solid state disk according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, having a computer program stored thereon, which, when being executed by a processor, implements the steps of the garbage collection method for solid state disks according to any one of claims 1 to 6.
CN201910838332.XA 2019-09-05 2019-09-05 Garbage recycling method, device and equipment for solid state disk and storage medium Active CN110688325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910838332.XA CN110688325B (en) 2019-09-05 2019-09-05 Garbage recycling method, device and equipment for solid state disk and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910838332.XA CN110688325B (en) 2019-09-05 2019-09-05 Garbage recycling method, device and equipment for solid state disk and storage medium

Publications (2)

Publication Number Publication Date
CN110688325A CN110688325A (en) 2020-01-14
CN110688325B true CN110688325B (en) 2021-12-03

Family

ID=69108756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910838332.XA Active CN110688325B (en) 2019-09-05 2019-09-05 Garbage recycling method, device and equipment for solid state disk and storage medium

Country Status (1)

Country Link
CN (1) CN110688325B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136121A (en) * 2013-03-25 2013-06-05 中国人民解放军国防科学技术大学 Cache management method for solid-state disc
CN107423229A (en) * 2017-03-16 2017-12-01 杭州电子科技大学 A kind of buffering area improved method towards page level FTL
CN109086008A (en) * 2018-07-26 2018-12-25 浪潮电子信息产业股份有限公司 The data processing method and solid state hard disk of solid state hard disk
CN109697170A (en) * 2017-10-20 2019-04-30 慧荣科技股份有限公司 The method of access flash memory module and relevant flash controller and electronic device
CN109783398A (en) * 2019-01-18 2019-05-21 上海海事大学 One kind is based on related perception page-level FTL solid state hard disk performance optimization method
CN109800178A (en) * 2017-11-17 2019-05-24 爱思开海力士有限公司 Garbage collection method and the storage system mapped for combined address
CN110058796A (en) * 2018-01-18 2019-07-26 慧荣科技股份有限公司 Data memory device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103336672B (en) * 2013-06-28 2016-10-05 华为技术有限公司 Method for reading data, device and computing device
US9582204B2 (en) * 2014-01-07 2017-02-28 Apple Inc. Speculative prefetching of data stored in flash memory
US10860536B2 (en) * 2017-01-05 2020-12-08 Portworx, Inc. Graph driver layer management
CN109766055A (en) * 2017-11-09 2019-05-17 深圳大心电子科技有限公司 Storage management method and storage control
CN108595110B (en) * 2018-03-07 2021-12-14 深圳忆联信息系统有限公司 Method for improving reading performance by using Nand characteristic and solid state disk

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136121A (en) * 2013-03-25 2013-06-05 中国人民解放军国防科学技术大学 Cache management method for solid-state disc
CN107423229A (en) * 2017-03-16 2017-12-01 杭州电子科技大学 A kind of buffering area improved method towards page level FTL
CN109697170A (en) * 2017-10-20 2019-04-30 慧荣科技股份有限公司 The method of access flash memory module and relevant flash controller and electronic device
CN109800178A (en) * 2017-11-17 2019-05-24 爱思开海力士有限公司 Garbage collection method and the storage system mapped for combined address
CN110058796A (en) * 2018-01-18 2019-07-26 慧荣科技股份有限公司 Data memory device
CN109086008A (en) * 2018-07-26 2018-12-25 浪潮电子信息产业股份有限公司 The data processing method and solid state hard disk of solid state hard disk
CN109783398A (en) * 2019-01-18 2019-05-21 上海海事大学 One kind is based on related perception page-level FTL solid state hard disk performance optimization method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于非易失存储器的事务存储系统综述;石伟; 汪东升;《计算机研究与发展》;20160228;第53卷(第02期);399-415 *

Also Published As

Publication number Publication date
CN110688325A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
TWI515561B (en) Data tree storage methods, systems and computer program products using page structure of flash memory
US8856469B2 (en) Apparatus and method for logging optimization using non-volatile memory
CN107481762B (en) Trim processing method and device of solid state disk
US20150378888A1 (en) Controller, flash memory apparatus, and method for writing data into flash memory apparatus
CN110765031B (en) Data storage method and device, mobile terminal and storage medium
TWI693518B (en) Data storage devices and methods for firmware failure prevention
CN111880731B (en) Data processing method and device and related components
CN104750620A (en) Memory migration method and device
CN110888843A (en) Cross-host sparse file copying method, device, equipment and storage medium
CN115756312A (en) Data access system, data access method, and storage medium
CN104035822A (en) Low-cost efficient internal storage redundancy removing method and system
CN109213450B (en) Associated metadata deleting method, device and equipment based on flash memory array
CN107741968B (en) Method, system and device for file retrieval and computer readable storage medium
CN111061429B (en) Data access method, device, equipment and medium
CN110688325B (en) Garbage recycling method, device and equipment for solid state disk and storage medium
CN110955388A (en) Storage server, data storage method and device thereof and storage medium
CN115587050A (en) Mapping table garbage recovery efficiency method and device, computer equipment and medium
CN111562983B (en) Memory optimization method and device, electronic equipment and storage medium
CN109284237B (en) Garbage recovery method and system in full flash memory array
TW202242664A (en) Method of performing garbage collection with partial clean operation and related controller and storage system
CN110888588B (en) Flash memory controller and related access method and electronic device
CN107301073B (en) Configuration information retrieval method and device based on solid state disk system
CN113625953B (en) Data processing method, device, equipment and storage medium
CN113806107B (en) Object copying method, device, equipment and storage medium
CN111880743B (en) Data storage method, device, equipment and storage medium

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