Nothing Special   »   [go: up one dir, main page]

CN110647476B - Method, device and equipment for writing data in solid state disk and storage medium - Google Patents

Method, device and equipment for writing data in solid state disk and storage medium Download PDF

Info

Publication number
CN110647476B
CN110647476B CN201910931714.7A CN201910931714A CN110647476B CN 110647476 B CN110647476 B CN 110647476B CN 201910931714 A CN201910931714 A CN 201910931714A CN 110647476 B CN110647476 B CN 110647476B
Authority
CN
China
Prior art keywords
write data
lba
unit
writing
data request
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
CN201910931714.7A
Other languages
Chinese (zh)
Other versions
CN110647476A (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 CN201910931714.7A priority Critical patent/CN110647476B/en
Publication of CN110647476A publication Critical patent/CN110647476A/en
Application granted granted Critical
Publication of CN110647476B publication Critical patent/CN110647476B/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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0868Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
    • 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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/21Employing a record carrier using a specific recording technology
    • G06F2212/214Solid state disk

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for writing data in a solid state disk, wherein the method comprises the following steps: receiving a write data request, and writing write data corresponding to the write data request into the DDR; applying for a cache unit for the write data request in a local memory, if the application is successful, determining the applied cache unit as a target unit, and writing the LBA corresponding to the write data request into the target unit; if the application fails, mounting the write data request into a list to be processed, and returning to execute the step of applying for the cache unit for the write data request until the application is successful; and when the LBA in the target unit reaches a preset moving amount, moving the LBA of the preset moving amount in the target unit to the DDR, and writing the write data and the corresponding LBA into a solid state disk. The method and the device reduce the moving times of the LBA and improve the performance of the solid state disk.

Description

Method, device and equipment for writing data in solid state disk and storage medium
Technical Field
The present invention relates to the technical field of solid state disks, and more particularly, to a method, an apparatus, a device, and a storage medium for writing data in a solid state disk.
Background
In the process of writing data to a Solid State Disk (SSD), the performance of writing data and the correctness of the written data are important characteristics of the solid state disk, and therefore, the process of writing data is generally required to have better performance.
In a technical scheme for implementing data writing of a solid state disk, not only user data needs to be operated, but also existing internal management data of the solid state disk needs to be supported, and specifically, after a data writing request is received, a DMA controller (direct memory access controller, hereinafter, referred to as DMA) is used to move the data to a DDR memory (double data rate memory, hereinafter, referred to as DDR), corresponding reverse table data is added, and then the data in the DDR is dropped. In order to implement operations such as garbage collection, not only the L2P table but also a corresponding reverse table needs to be maintained, where L2P represents mapping of PBA (physical block address) corresponding to LBA (logical block address), and the reverse table represents mapping of LBA corresponding to PBA, so that not only data corresponding to a write data request needs to be moved to DDR, but also LBA corresponding to data needs to be moved to DDR.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for writing data in a solid state disk, which can reduce the moving times of LBA and improve the performance of writing data in the solid state disk.
In order to achieve the above purpose, the invention provides the following technical scheme:
a method for writing data by a solid state disk comprises the following steps:
receiving a write data request, and writing write data corresponding to the write data request into the DDR;
applying for a cache unit for the write data request in a local memory, if the application is successful, determining the applied cache unit as a target unit, and writing the LBA corresponding to the write data request into the target unit; if the application fails, mounting the write data request into a list to be processed, and returning to execute the step of applying for the cache unit for the write data request until the application is successful;
and when the LBA in the target unit reaches a preset moving amount, moving the LBA of the preset moving amount in the target unit to the DDR, and writing the write data and the corresponding LBA into a solid state disk.
Preferably, applying for a cache unit for the write data request in the local memory includes:
detecting whether an idle cache unit exists in a local memory, if so, determining that the application is successful, otherwise, determining that the application is failed; the local memory is provided with a plurality of cache units;
correspondingly, determining the applied cache unit as a destination unit includes:
if the total storage space of the idle cache units is larger than the storage space required to be occupied by the LBA corresponding to the write request, determining that the cache units with the total storage space equal to the number of the storage space required to be occupied by the LBA corresponding to the write request are the target units, and otherwise, determining that the idle cache units are all the target units.
Preferably, the determining whether the LBA in the destination unit reaches a preset transfer amount includes:
and if the LBA in any destination unit occupies the storage space of any destination unit, determining that the LBA in any destination unit reaches a preset transfer amount, otherwise, determining that the LBA in any destination unit does not reach the preset transfer amount.
Preferably, the transferring the LBA of the preset transfer amount in the destination unit to the DDR includes:
transferring the LBA with a preset transfer amount in the target unit to the DDR by using a transfer unit; the preset moving amount is equal to the maximum amount of the LBAs which can be moved by the moving unit at a time.
Preferably, before writing the write data and the corresponding LBA in the solid state disk, the method further includes:
detecting whether the data volume of the write data stored in the DDR reaches the data volume of the data to be stored in a single strip, and if so, writing the write data and the corresponding LBA into the solid state disk; otherwise, returning to the step of detecting whether the data volume of the write data stored in the DDR reaches the data volume of the data to be stored in a single strip or not until the detection result is yes.
Preferably, before writing the write data corresponding to the write data request into the DDR, the method further includes:
and applying for a write cache corresponding to the write data request in the DDR, if the application is successful, executing the step of writing the write data corresponding to the write data request into the DDR, and if the application is failed, returning to execute the step of applying for the write cache corresponding to the write data request in the DDR until the application is successful.
Preferably, the method further comprises the following steps:
and if the number of times of applying for the write cache or the cache unit reaches a preset number of times and the application result is application failure, stopping continuing application and outputting corresponding prompt information.
An apparatus for writing data on a solid state disk, comprising:
a receiving module to: receiving a write data request, and writing write data corresponding to the write data request into the DDR;
an application module to: applying for a cache unit for the write data request in a local memory, if the application is successful, determining the applied cache unit as a target unit, and writing the LBA corresponding to the write data request into the target unit; if the application fails, mounting the write data request into a list to be processed, and returning to execute the step of applying for the cache unit for the write data request until the application is successful;
a moving module for: and when the LBA in the target unit reaches a preset moving amount, moving the LBA of the preset moving amount in the target unit to the DDR, and writing the write data and the corresponding LBA into a solid state disk.
An apparatus for writing data by a solid state disk, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for writing data in the solid state disk as described in any one of the above items when the computer program is executed.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a method of writing data by a solid state disk as described in any one of the above.
The invention provides a method, a device, equipment and a storage medium for writing data in a solid state disk, wherein the method comprises the following steps: receiving a write data request, and writing write data corresponding to the write data request into the DDR; applying for a cache unit for the write data request in a local memory, if the application is successful, determining the applied cache unit as a target unit, and writing the LBA corresponding to the write data request into the target unit; if the application fails, mounting the write data request into a list to be processed, and returning to execute the step of applying for the cache unit for the write data request until the application is successful; and when the LBA in the target unit reaches a preset moving amount, moving the LBA of the preset moving amount in the target unit to the DDR, and writing the write data and the corresponding LBA into a solid state disk. In the technical features disclosed in the present application, when transferring the LBA, that is, the reverse table data to the DDR, a corresponding cache unit is first applied for the LBA in the memory, so that the LBA is cached in the cache unit first, and when the LBA in the cache unit reaches a certain transfer amount, the LBA of the certain transfer amount is transferred to the DDR at one time, so that the LBA is transferred in a concentrated manner, which is different from the case where only one LBA is transferred in the prior art, thereby reducing the transfer frequency of the LBA, and improving the performance of the solid state disk.
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 method for writing data in a solid state disk according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a device for writing data in a solid state disk according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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, a flowchart of a method for writing data in a solid state disk according to an embodiment of the present invention is shown, where the method includes:
s11: and receiving a write data request, and writing write data corresponding to the write data request into the DDR.
The execution main body of the method for writing data in the solid state disk provided by the embodiment of the invention can be a corresponding device, and the device can be arranged in the processor, so that the execution main body of the method can be the processor. Specifically, the write data request is a request for writing corresponding data into the solid state disk, and after the write data request is received, the data corresponding to the write data request may be determined to be write data, and then the write data is stored in the DDR.
S12: applying for a cache unit for the write data request in the local memory, if the application is successful, determining the applied cache unit as a target unit, and writing the LBA corresponding to the write data request into the target unit; and if the application fails, mounting the write data request into the list to be processed, and returning to execute the step of applying for the cache unit for the write data request until the application is successful.
The local buffer of the reverse table may be set in the local memory in advance, or may be referred to as a cache unit, where the cache unit is used to store the LBA, and then the LBA stored in the cache unit is located. Specifically, if the cache unit is successfully applied, the LBA corresponding to the write data request may be written into the cache unit applied, otherwise, the write data request may be mounted in a preset pending list (pending list), and the step of mounting the write data request in the pending list is directly executed or executed after a preset time interval set according to actual needs is returned, and the step of applying the cache unit for the write data request is executed in return, so as to ensure that the cache unit for storing the LBA can be applied in a normal condition in this way.
S13: when the LBA in the destination unit reaches the preset transfer amount, the LBA of the preset transfer amount in the destination unit is transferred to the DDR, and the write data and the corresponding LBA are written into the solid state disk.
It should be noted that, unlike the prior art, when the LBA is moved to the DDR, if the LBA is moved to a data block of write data in the DDR, the corresponding LBA is moved to the DDR; in this embodiment, a preset moving amount needs to be set according to actual needs, where the preset moving amount is greater than the LBA corresponding to a single data block, that is, in this embodiment, after the LBAs in the destination unit reach a certain number, the certain number of LBAs are moved to the DDR at one time, so that the moving times of the LBAs are reduced, and the performance of the solid state disk is improved.
In the technical features disclosed in the present application, when transferring the LBA, that is, the reverse table data to the DDR, a corresponding cache unit is first applied for the LBA in the memory, so that the LBA is cached in the cache unit first, and when the LBA in the cache unit reaches a certain transfer amount, the LBA of the certain transfer amount is transferred to the DDR at one time, so that the LBA is transferred in a concentrated manner, which is different from the case where only one LBA is transferred in the prior art, thereby reducing the transfer frequency of the LBA, and improving the performance of the solid state disk.
The method for writing data in a solid state disk provided in the embodiments of the present invention applies for a cache unit for a data writing request in a local memory, and may include:
detecting whether an idle cache unit exists in a local memory, if so, determining that the application is successful, otherwise, determining that the application is failed; the local memory is provided with a plurality of cache units;
correspondingly, determining the applied cache unit as a destination unit may include:
if the total storage space of the idle cache units is larger than the storage space occupied by the LBA corresponding to the write request, determining that the cache units with the total storage space equal to the number of the storage space occupied by the LBA corresponding to the write request are the target units, and otherwise, determining that the idle cache units are all the target units.
It should be noted that, in this embodiment, multiple cache units may be set, and each cache unit may be multiplexed, specifically, applying for a cache unit in the local memory is to detect whether there is an idle cache unit in the local memory (the idle cache unit is a blank cache unit that does not store any data), if there is an idle cache unit, the idle cache unit may be directly used to implement LBA storage, otherwise, the cache unit needs to wait until there is an idle cache unit to implement LBA storage by using the idle cache unit. Therefore, the cache of the LBAs corresponding to the multiple write data requests can be realized conveniently through the setting and multiplexing of the multiple cache units. In addition, in consideration of limited memory capacity of the processor, in this embodiment, 4 cache units may be provided, each cache unit may hold 64 LBAs, and a single stripe (super page) includes 384 LBAs, so that the 4 cache units may store all LBAs corresponding to the single stripe and may be multiplexed if necessary.
It should be noted that, when determining the destination unit, the storage space that the LBA corresponding to the write request needs to occupy needs to be considered, if the sum of the storage spaces of the idle cache units is not greater than the storage space that the LBA corresponding to the write request needs to occupy, it is indicated that all the idle cache units need to be used for performing the cache of the LBA, at this time, it is determined that all the idle cache units are the destination unit, otherwise, it is indicated that the cache unit has redundant storage space, at this time, it is only necessary to determine, as the destination unit, the cache units whose sum of the storage spaces is equal to the number of the storage spaces that the write request needs to occupy, so that a surge in space caused after applying for the redundant cache units is avoided. If the storage space of the idle cache units is less than the storage space occupied by the LBAs corresponding to the write requests, all the idle cache units can be used for caching the LBAs corresponding to the write requests, and the LBAs corresponding to the remaining write requests wait for the new idle cache units and then are cached by the new idle cache units, so that the multiplexing of the cache units is realized, and meanwhile, the smooth caching of all the LBAs corresponding to the write requests is ensured.
In addition, under the condition that a plurality of cache units exist, after the cache unit application for the write data request in the local memory fails and the write data request is mounted in the to-be-processed list, whether a free cache unit exists can be detected in real time, so that the write data request in the to-be-processed list is processed after the free cache unit is detected, that is, the free cache unit is allocated to the LBA corresponding to the write data request cache.
The method for writing data in a solid state disk according to the embodiment of the present invention determines whether the LBA in the destination unit reaches the preset migration amount, and may include:
and if the LBA in any destination unit occupies the storage space of any destination unit, determining that the LBA in any destination unit reaches the preset transfer amount, otherwise, determining that the LBA in any destination unit does not reach the preset transfer amount.
It should be noted that, in this embodiment, the storage space of each cache unit may be set to be equal to the preset transfer amount, so that as long as the destination unit is occupied, it is determined that the LBA in the destination unit reaches the preset transfer amount, and then the LBA in the destination unit is transferred by data, which facilitates quick implementation of the step of whether the LBA in the cache unit can be transferred. Moreover, after a cache unit is full, the stored LBA is immediately moved to the DDR, and the next idle cache unit can be used in the moving process, so that the waiting time is covered, and the LBA moving efficiency is further improved.
The method for writing data in a solid state disk according to the embodiment of the present invention is to transfer an LBA with a preset transfer amount in a destination unit to a DDR, and may include:
transferring the LBA with the preset transfer amount in the target unit to the DDR by using the transfer unit; the preset moving amount is equal to the maximum amount of LBAs which can be moved by the moving unit at a time.
It should be noted that, in this embodiment, the preset transfer amount may be set to the maximum amount of the LBAs that the transfer unit can transfer, so that the transfer unit can transfer the largest LBAs each time, thereby implementing full utilization of the transfer unit during LBA transfer, and facilitating improvement of performance of writing data in the solid state disk.
Before writing the write data and the corresponding LBA in the solid state disk, the method for writing data in the solid state disk according to the embodiment of the present invention may further include:
detecting whether the data volume of the write data stored in the DDR reaches the data volume of the data to be stored in a single strip, and if so, writing the write data and the corresponding LBA into the solid state disk; otherwise, returning to the step of detecting whether the data volume of the write data stored in the DDR reaches the data volume of the data to be stored in the single stripe or not until the detection result is yes.
The strip is a storage unit in the solid state disk, and when the data volume of the write data stored in the DDR is detected to reach the data volume of the data required to be stored in a single strip, the write data and the corresponding LBA are written into the solid state disk, so that the data writing of the whole strip can be realized during the data writing, the method is different from the multiple writing of the same strip, and the data writing efficiency is greatly improved. Further, after receiving the write data request, the DDR allocates a corresponding address to the write data request, and the write data and the corresponding LBA may be written to the allocated address.
The method for writing data in the solid state disk provided in the embodiment of the present invention may further include, before writing the write data corresponding to the write data request into the DDR:
and applying for a corresponding write cache for the write data request in the DDR, if the application is successful, executing the step of writing the write data corresponding to the write data request into the DDR, and if the application is failed, returning to execute the step of applying for the corresponding write cache for the write data request in the DDR until the application is successful.
If the write cache has enough free storage space for storing the write data, the application is successful, otherwise, partial data in the write data needs to be cached in the DDR firstly, and the rest data in the write data is cached in the released storage space after the released storage space exists, so that all the write data is cached in the DDR through multiple cycles, and the write data can be stored in the DDR at the highest speed. In addition, in order to avoid the situation of data confusion, in this embodiment, when there is no sufficient free storage space for storing write data in the write cache, the write data may be cached in the DDR after waiting until there is sufficient free storage space for storing write data.
The method for writing data in the solid state disk provided by the embodiment of the invention can further comprise the following steps:
and if the number of times of applying for writing the cache or applying for the cache unit reaches the preset number of times and the application result is application failure, stopping continuously applying and outputting corresponding prompt information.
The preset times can be set according to actual needs, and when the times of applying for writing the cache or applying for the cache unit reach the preset times but the application is not successful, other abnormal conditions may exist, and at this time, the corresponding application step is not executed again, but prompt information is output to inform a worker of the abnormal conditions and the abnormal conditions are processed by the worker.
According to the technical characteristics disclosed by the application, a double-cache mechanism is adopted, a write cache is arranged in a DDR to realize the cache of write data corresponding to a write data request, a cache unit is arranged in a local memory to realize the cache of LBAs corresponding to the write data request, and the LBAs in the cache unit are moved when the number of the LBAs reaches a preset moving amount, which is different from the single moving of the LBAs in the prior art, so that the times and frequency of LBA moving are greatly reduced.
An embodiment of the present invention further provides a device for writing data in a solid state disk, as shown in fig. 2, the device may include:
a receiving module 11, configured to: receiving a write data request, and writing write data corresponding to the write data request into the DDR;
an application module 12 for: applying for a cache unit for the write data request in the local memory, if the application is successful, determining the applied cache unit as a target unit, and writing the LBA corresponding to the write data request into the target unit; if the application fails, mounting the write data request into a list to be processed, and returning to execute the step of applying for the cache unit for the write data request until the application is successful;
a moving module 13 for: when the LBA in the destination unit reaches the preset transfer amount, the LBA of the preset transfer amount in the destination unit is transferred to the DDR, and the write data and the corresponding LBA are written into the solid state disk.
In an apparatus for writing data in a solid state disk provided in an embodiment of the present invention, an application module may include:
a detection unit to: detecting whether an idle cache unit exists in a local memory, if so, determining that the application is successful, otherwise, determining that the application is failed; the local memory is provided with a plurality of cache units;
a determination unit configured to: if the total storage space of the idle cache units is larger than the storage space occupied by the LBA corresponding to the write request, determining that the cache units with the total storage space equal to the number of the storage space occupied by the LBA corresponding to the write request are the target units, and otherwise, determining that the idle cache units are all the target units.
In the apparatus for writing data in a solid state disk provided in an embodiment of the present invention, the moving module may include:
a determination unit configured to: and if the LBA in any destination unit occupies the storage space of any destination unit, determining that the LBA in any destination unit reaches the preset transfer amount, otherwise, determining that the LBA in any destination unit does not reach the preset transfer amount.
In the apparatus for writing data in a solid state disk provided in an embodiment of the present invention, the moving module may include:
a moving unit for: transferring the LBA with the preset transfer amount in the target unit to the DDR by using the transfer unit; the preset moving amount is equal to the maximum amount of LBAs which can be moved by the moving unit at a time.
The apparatus for writing data in a solid state disk provided in the embodiments of the present invention may further include:
a detection module to: before writing the write data and the corresponding LBA into the solid state disk, detecting whether the data volume of the write data stored in the DDR reaches the data volume of the data required to be stored in a single strip, if so, writing the write data and the corresponding LBA into the solid state disk; otherwise, returning to the step of detecting whether the data volume of the write data stored in the DDR reaches the data volume of the data to be stored in the single stripe or not until the detection result is yes.
The apparatus for writing data in a solid state disk provided in the embodiments of the present invention may further include:
a data caching module to: before writing the write data corresponding to the write data request into the DDR, applying for a corresponding write cache for the write data request in the DDR, if the application is successful, executing the step of writing the write data corresponding to the write data request into the DDR, and if the application is failed, returning to execute the step of applying for the write cache corresponding to the write data request in the DDR until the application is successful.
The apparatus for writing data in a solid state disk provided in the embodiments of the present invention may further include:
a prompt module to: and if the number of times of applying for writing the cache or applying for the cache unit reaches the preset number of times and the application result is application failure, stopping continuously applying and outputting corresponding prompt information.
An embodiment of the present invention further provides a device for writing data in a solid state disk, where the device may include:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for writing data in the solid state disk as described in any one of the above when executing the computer program.
The embodiment of the invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for writing data in the solid state disk as described above are implemented.
It should be noted that for descriptions of relevant parts in the apparatus, the device, and the storage medium for writing data in the solid state disk provided in the embodiment of the present invention, reference is made to detailed descriptions of corresponding parts in the method for writing data in the solid state disk provided in the embodiment of the present invention, and details are not described herein again. In addition, parts of the technical solutions provided in the embodiments of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail, so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for writing data in a solid state disk is characterized by comprising the following steps:
receiving a write data request, and writing write data corresponding to the write data request into the DDR;
applying for a cache unit for the write data request in a local memory, if the application is successful, determining the applied cache unit as a target unit, and writing the LBA corresponding to the write data request into the target unit; if the application fails, mounting the write data request into a list to be processed, and returning to execute the step of applying for the cache unit for the write data request until the application is successful;
and when the LBA in the target unit reaches a preset moving amount, moving the LBA of the preset moving amount in the target unit to the DDR, and writing the write data and the corresponding LBA into a solid state disk.
2. The method of claim 1, wherein applying for a cache unit in a local memory for the write data request comprises:
detecting whether an idle cache unit exists in a local memory, if so, determining that the application is successful, otherwise, determining that the application is failed; the local memory is provided with a plurality of cache units;
correspondingly, determining the applied cache unit as a destination unit includes:
if the total storage space of the idle cache units is larger than the storage space required to be occupied by the LBA corresponding to the write data request, determining that the cache units with the total storage space equal to the number of the storage space required to be occupied by the LBA corresponding to the write data request are the target units, and otherwise, determining that the idle cache units are all the target units.
3. The method of claim 2, wherein determining whether the LBA in the destination unit reaches a predetermined shift amount comprises:
and if the LBA in any destination unit occupies the storage space of any destination unit, determining that the LBA in any destination unit reaches a preset transfer amount, otherwise, determining that the LBA in any destination unit does not reach the preset transfer amount.
4. The method according to claim 3, wherein transferring the LBA of the predetermined transfer amount in the destination unit to the DDR comprises:
transferring the LBA with a preset transfer amount in the target unit to the DDR by using a transfer unit; the preset moving amount is equal to the maximum amount of the LBAs which can be moved by the moving unit at a time.
5. The method of claim 4, wherein before writing the write data and the corresponding LBAs to the solid state disk, the method further comprises:
detecting whether the data volume of the write data stored in the DDR reaches the data volume of the data to be stored in a single strip, and if so, writing the write data and the corresponding LBA into the solid state disk; otherwise, returning to the step of detecting whether the data volume of the write data stored in the DDR reaches the data volume of the data to be stored in a single strip or not until the detection result is yes.
6. The method of claim 5, wherein before writing write data corresponding to the write data request into the DDR, the method further comprises:
and applying for a write cache corresponding to the write data request in the DDR, if the application is successful, executing the step of writing the write data corresponding to the write data request into the DDR, and if the application is failed, returning to execute the step of applying for the write cache corresponding to the write data request in the DDR until the application is successful.
7. The method of claim 6, further comprising:
and if the number of times of applying for the write cache or the cache unit reaches a preset number of times and the application result is application failure, stopping continuing application and outputting corresponding prompt information.
8. An apparatus for writing data on a solid state disk, comprising:
a receiving module to: receiving a write data request, and writing write data corresponding to the write data request into the DDR;
an application module to: applying for a cache unit for the write data request in a local memory, if the application is successful, determining the applied cache unit as a target unit, and writing the LBA corresponding to the write data request into the target unit; if the application fails, mounting the write data request into a list to be processed, and returning to execute the step of applying for the cache unit for the write data request until the application is successful;
a moving module for: and when the LBA in the target unit reaches a preset moving amount, moving the LBA of the preset moving amount in the target unit to the DDR, and writing the write data and the corresponding LBA into a solid state disk.
9. An apparatus for writing data on a solid state disk, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for writing data on the solid state disk according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having a computer program stored thereon, which, when being executed by a processor, implements the steps of the method for writing data by a solid state disk according to any one of claims 1 to 7.
CN201910931714.7A 2019-09-29 2019-09-29 Method, device and equipment for writing data in solid state disk and storage medium Active CN110647476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910931714.7A CN110647476B (en) 2019-09-29 2019-09-29 Method, device and equipment for writing data in solid state disk and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910931714.7A CN110647476B (en) 2019-09-29 2019-09-29 Method, device and equipment for writing data in solid state disk and storage medium

Publications (2)

Publication Number Publication Date
CN110647476A CN110647476A (en) 2020-01-03
CN110647476B true CN110647476B (en) 2021-10-15

Family

ID=68993089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910931714.7A Active CN110647476B (en) 2019-09-29 2019-09-29 Method, device and equipment for writing data in solid state disk and storage medium

Country Status (1)

Country Link
CN (1) CN110647476B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448517B (en) * 2021-06-04 2022-08-09 山东英信计算机技术有限公司 Solid state disk big data writing processing method, device, equipment and medium
CN113625948B (en) * 2021-06-28 2023-08-18 苏州浪潮智能科技有限公司 Method, device and equipment for filling dummy into solid state disk and readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488431A (en) * 2013-09-10 2014-01-01 华为技术有限公司 Data-writing method and storage device
CN103631755A (en) * 2011-06-29 2014-03-12 北京奇虎科技有限公司 Installing configuration list generation method and device
CN107422992A (en) * 2017-07-31 2017-12-01 郑州云海信息技术有限公司 Journal store methods and system during a kind of SSD operations

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7979667B2 (en) * 2007-12-10 2011-07-12 Spansion Llc Memory array search engine
US8397080B2 (en) * 2010-07-29 2013-03-12 Industrial Technology Research Institute Scalable segment-based data de-duplication system and method for incremental backups
US8756458B2 (en) * 2011-12-12 2014-06-17 Apple Inc. Mount-time reconciliation of data availability

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631755A (en) * 2011-06-29 2014-03-12 北京奇虎科技有限公司 Installing configuration list generation method and device
CN103488431A (en) * 2013-09-10 2014-01-01 华为技术有限公司 Data-writing method and storage device
CN107422992A (en) * 2017-07-31 2017-12-01 郑州云海信息技术有限公司 Journal store methods and system during a kind of SSD operations

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
On-the-Fly Automated Storage Tiering with Caching and both Proactive and Observational Migration;Kazuichi Oe;;《2015 Third International Symposium on Computing and Networking (CANDAR)》;20151103;371-377 *
高速大容量固态存储系统设计与实现;范晓星;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160315(第 03 期);I137-315 *

Also Published As

Publication number Publication date
CN110647476A (en) 2020-01-03

Similar Documents

Publication Publication Date Title
US9256384B2 (en) Method and system for reducing write latency in a data storage system by using a command-push model
US10853268B2 (en) Parity generating information processing system
US10860494B2 (en) Flushing pages from solid-state storage device
US10795599B2 (en) Data migration method, host and solid state disk
JP5922740B2 (en) Apparatus for memory device, memory device and method for control of memory device
US10635356B2 (en) Data management method and storage controller using the same
US8694563B1 (en) Space recovery for thin-provisioned storage volumes
EP2927779B1 (en) Disk writing method for disk arrays and disk writing device for disk arrays
CN108319430B (en) Method and device for processing IO (input/output) request
US8341348B2 (en) Computer system and load equalization control method for the same where cache memory is allocated to controllers
EP2784683B1 (en) Storage control program, storage control method, storage system and hierarchy control apparatus thereof
BR112016019305B1 (en) ARRANGEMENT CONTROLLER, SOLID STATE DISK, AND METHOD FOR CONTROLLING SOLID STATE DISK TO WRITE DATA
CN107066202B (en) Storage device with multiple solid state disks
KR20240049262A (en) Memory System and Operation Method thereof
CN109213693B (en) Storage management method, storage system and computer program product
US20190243578A1 (en) Memory buffer management for solid state drives
CN110647476B (en) Method, device and equipment for writing data in solid state disk and storage medium
US20140344503A1 (en) Methods and apparatus for atomic write processing
CN110119245B (en) Method and system for operating NAND flash memory physical space to expand memory capacity
US20210224002A1 (en) Storage control apparatus and storage medium
US8683161B2 (en) Method and apparatus for increasing file copy performance on solid state mass storage devices
CN109739688B (en) Snapshot resource space management method and device and electronic equipment
CN108334457B (en) IO processing method and device
CN111831589B (en) Method and device for improving IO command processing parallelism
JP2008192020A (en) Raid control unit and its 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