CN114327272A - Data processing method, solid state disk controller and solid state disk - Google Patents

Data processing method, solid state disk controller and solid state disk Download PDF

Info

Publication number
CN114327272A
CN114327272A CN202111625616.4A CN202111625616A CN114327272A CN 114327272 A CN114327272 A CN 114327272A CN 202111625616 A CN202111625616 A CN 202111625616A CN 114327272 A CN114327272 A CN 114327272A
Authority
CN
China
Prior art keywords
data read
granularity
write request
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.)
Pending
Application number
CN202111625616.4A
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.)
Shenzhen Dapu Microelectronics Co Ltd
Original Assignee
Shenzhen Dapu Microelectronics 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 Shenzhen Dapu Microelectronics Co Ltd filed Critical Shenzhen Dapu Microelectronics Co Ltd
Priority to CN202111625616.4A priority Critical patent/CN114327272A/en
Publication of CN114327272A publication Critical patent/CN114327272A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to the technical field of solid state disks, in particular to a data processing method, a solid state disk controller and a solid state disk, wherein the data processing method is applied to the solid state disk and comprises the following steps: receiving at least one data read-write request; calculating target mapping granularity corresponding to the data read-write request; selecting a translation layer for transmitting and processing data read-write requests according to the target mapping granularity; performing granularity disassembly on the data read-write request according to the translation layer to generate a back-end request corresponding to the data read-write request; and executing data processing operation according to the back-end request. According to the embodiment of the application, a plurality of translation layers corresponding to different mapping granularities are arranged in parallel, so that the data reading and writing requests with different mapping granularities can be adapted, and meanwhile, the mapping granularity corresponding to a newly received request can be predicted according to the mapping granularity corresponding to the previously received request, so that a proper translation layer is selected for the request to adapt to the request issued by a host.

Description

Data processing method, solid state disk controller and solid state disk
Technical Field
The application relates to the technical field of solid state disks, in particular to a data processing method, a solid state disk controller and a solid state disk.
Background
In an existing solid state disk system, an upper Layer application accesses a storage device (i.e., a solid state disk) through a logical address, a Flash Translation Layer (FTL) maps different logical addresses to different positions in a Nand Flash of the solid state disk, and the FTL is simply referred to as mapping management. The existing solid state disk mostly adopts a single FTL, and adopts fixed granularity mapping, and the mapping granularity is usually small, so that the dispersion is large and the mapping cost is too high; in the process of processing a data read/write request with a large data volume, a single FTL generally has a long processing path, resulting in high latency and poor service quality, and cannot adapt to the characteristics of a host request. In the existing double-FTL arrangement, the double FTLs are in series connection, that is, FTL1 adopts coarse granularity, FTL2 adopts fine granularity, the output of FTL1 is used as the input of FTL2, and the action of FTL2 depends on FTL1, so that on the whole, after series connection, the FTL still equals to a single FTL, and the above disadvantages also exist.
Disclosure of Invention
The technical problem mainly solved by the embodiments of the present application is to provide a data processing method, a solid state disk controller and a solid state disk, so as to solve at least the problems of large dispersion and too high mapping cost caused by adopting single fixed granularity mapping in the prior art.
In order to solve the above technical problem, one technical solution adopted by the embodiments of the present application is: there is provided a data processing method, the method comprising: receiving at least one data read-write request; calculating the target mapping granularity corresponding to the data read-write request; selecting a translation layer for transmitting and processing the data read-write request according to the target mapping granularity; performing granularity disassembly on the data reading and writing request according to the translation layer to generate a back-end request corresponding to the data reading and writing request; and executing data processing operation according to the back-end request.
Optionally, the calculating the target mapping granularity corresponding to the data read-write request includes: determining a target area corresponding to the data read-write request; acquiring a first historical data read-write request in the target area, and calculating the data read-write request quantity of the first historical data read-write request and the data total quantity of the first historical data read-write request; calculating a first quotient of the total data amount and the data read-write request amount, wherein the first quotient is a granularity judgment value; and determining the granularity of the target mapping according to the granularity judgment value.
Optionally, the calculating the target mapping granularity corresponding to the data read-write request further includes: acquiring a second historical data read-write request corresponding to the solid state disk, and calculating the data read-write request quantity of the second historical data read-write request and the data total quantity of the second historical data read-write request; calculating a second quotient value of the total data amount and the data read-write request amount; calculating the sum of the weight of the first quotient and the weight of the second quotient, wherein the sum is a granularity judgment value; and determining the granularity of the target mapping according to the granularity judgment value.
Optionally, the translation layers include a plurality of translation layers, the plurality of translation layers are arranged in parallel, and the determining the target mapping granularity according to the granularity judgment value includes: obtaining mapping granularity corresponding to the translation layers respectively; and acquiring the mapping granularity which is larger than the granularity judgment value and has the minimum difference with the granularity judgment value, wherein the mapping granularity is the target mapping granularity.
Optionally, the method further includes: and acquiring the mapping granularity corresponding to the sending end of the data read-write request so that the translation layer accesses the sending end according to the mapping granularity corresponding to the sending end.
Optionally, the method further includes: and recording the target mapping granularity and the mapping granularity corresponding to the sending end through a bitmap.
Optionally, the method further includes: after the data processing operation corresponding to the data read-write request is completed, updating a historical data read-write request, wherein the updating of the historical data read-write request comprises: and updating the data in the historical data read-write request and a corresponding timestamp, wherein the timestamp is used for determining a time period corresponding to the historical data read-write request.
In order to solve the above technical problem, another technical solution adopted by the embodiments of the present application is: providing a firmware system, the firmware system comprising: the request receiving module is used for receiving at least one data read-write request; the granularity calculation module is used for calculating the optimal mapping granularity corresponding to the data read-write request; the translation layer selection module is used for selecting a translation layer for transmitting and processing the data read-write request according to the optimal mapping granularity; the translation module is used for performing granularity resolution on the data read-write request according to the translation layer so as to generate a back-end request corresponding to the data read-write request; and the request processing module is used for executing data processing operation according to the back-end request.
In order to solve the above technical problem, another technical solution adopted by the embodiments of the present application is: provided is a solid state hard disk controller including: the firmware system described above; the system comprises at least one processor, a data processing unit and a data processing unit, wherein the processor is provided with a detector which is used for calculating a data reading and writing request; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the data processing method based on the detector.
In order to solve the above technical problem, another technical solution adopted by the embodiment of the present application is: provided is a solid state disk including: the solid state hard disk controller and at least one flash memory medium in communication connection with the solid state hard disk controller.
In order to solve the above technical problem, another technical solution adopted by the embodiment of the present application is: there is provided a non-transitory computer-readable storage medium having stored thereon computer-executable instructions for enabling a solid state disk to perform the data processing method as described above.
Different from the related art, the data processing method provided by the embodiment of the present application is applied to a solid state disk, and the method includes: receiving at least one data read-write request; calculating the target mapping granularity corresponding to the data read-write request; selecting a translation layer for transmitting and processing the data read-write request according to the target mapping granularity; performing granularity disassembly on the data reading and writing request according to the translation layer to generate a back-end request corresponding to the data reading and writing request; and executing data processing operation according to the back-end request. By arranging a plurality of translation layers corresponding to different mapping granularities in parallel, the embodiment of the application can adapt to data reading and writing requests with different mapping granularities, and can predict the mapping granularity corresponding to a newly received data reading and writing request according to the mapping granularity corresponding to a previously received data reading and writing request, so that a proper translation layer is selected for the data reading and writing request to adapt to the mapping granularity corresponding to a Host (Host) view angle.
Drawings
One or more embodiments are illustrated in drawings corresponding to, and not limiting to, the embodiments, in which elements having the same reference number designation may be represented as similar elements, unless specifically noted, the drawings in the figures are not to scale.
Fig. 1 is a schematic structural diagram of a solid state disk provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a method for calculating target mapping granularity corresponding to a data read-write request according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a method for selecting a target mapping granularity according to a granularity determination value according to an embodiment of the present application;
fig. 5 is a schematic diagram of another method for calculating target mapping granularity corresponding to a data write-only request according to an embodiment of the present application;
FIG. 6 is a schematic diagram of data transmission provided by an embodiment of the present application;
FIG. 7a is an end-to-end view after 4K mapping, FIG. 7b is an end-to-end view after 8K mapping, and FIG. 7c is an end-to-end view after 16K mapping;
fig. 8 is a schematic structural diagram of a firmware system according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that, if not conflicted, the individual features of the embodiments of the present application can be combined with one another within the scope of protection of the present application. Additionally, while a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in an order different than in the flowcharts. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The use of the terms "first," "second," and the like, in the description of the present application, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance, as the terms "first," "second," and the like are used herein to include any and all combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a solid state disk according to an embodiment of the present disclosure.
As shown in fig. 1, the solid state disk 100 includes a flash memory medium 110 and a solid state disk controller 120 connected to the flash memory medium 110. The solid state disk 100 is in communication connection with the host 200 in a wired or wireless manner, so as to implement data interaction.
The Flash memory medium 110, which is a storage medium of the solid state disk 100 and is also called a Flash memory, a Flash memory or a Flash granule, belongs to one of storage devices, and is a nonvolatile memory, which can store data for a long time without current supply, and the storage characteristics of the Flash memory medium 110 are equivalent to those of a hard disk, so that the Flash memory medium 110 can become a basis of storage media of various portable digital devices.
The solid state hard disk controller 120 includes a data converter 121, a processor 122, a memory 123, a flash memory controller 124, and an interface 125.
And a data converter 121 respectively connected to the processor 122 and the flash controller 124, wherein the data converter 121 can convert binary data into hexadecimal data and convert the hexadecimal data into binary data. Specifically, when the flash memory controller 124 writes data to the flash memory medium 110, the binary data to be written may be converted into hexadecimal data by the data converter 121 and then written to the flash memory medium 110. When the flash controller 124 reads data from the flash medium 110, hexadecimal data stored in the flash medium 110 may be converted into binary data by the data converter 121, and then the converted data may be read from a binary data page register. The data converter 121 may include a binary data register and a hexadecimal data register. The binary data register may be used to store data converted from hexadecimal to binary, and the hexadecimal data register may be used to store data converted from binary to hexadecimal.
The processor 122 is connected to the data converter 121, the memory 123, the flash memory controller 124, and the interface 125, respectively, wherein the processor 122 and the data converter 121, the memory 123, the flash memory controller 124, and the interface 125 may be connected by a bus or other methods, a detector is disposed in the processor 122, the detector is configured to perform calculation of data read/write requests, and the processor 122 is configured to run a nonvolatile software program, instructions, and modules stored in the memory 123 based on the detector, so as to implement any method embodiment of the present application.
The memory 123 is mainly used for buffering read/write commands sent by the host 200 and read data or write data acquired from the flash memory 110 according to the read/write commands sent by the host 200. The memory 32 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function. Further, the memory 123 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
A flash controller 124 connected to the flash medium 110, the data converter 121, the processor 122 and the memory 123, for accessing the flash medium 110 at the back end and managing various parameters and data I/O of the flash medium 110; or, an interface and a protocol for providing access, implementing a corresponding SAS/SATA target protocol end or NVMe protocol end, acquiring an I/O instruction sent by the host 200, decoding, and generating an internal private data result to wait for execution; or, the core processing module is used for taking charge of the FTL (Flash translation layer).
The interface 125 is connected to the host 200, the data converter 121, the processor 122 and the memory 123, and configured to receive data sent by the host 200, or receive data sent by the processor 122, so as to implement data transmission between the host 200 and the processor 122, where the interface 125 may be a SATA-2 interface, a SATA-3 interface, a SAS interface, a MSATA interface, a PCI-E interface, a NGFF interface, a CFast interface, a SFF-8639 interface, and a m.2nvme/SATA protocol.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a data processing method according to an embodiment of the present disclosure. The data processing method is applied to the solid state disk, and comprises the following steps:
and S11, receiving at least one data read-write request. Taking the Host (Host) command as an example, the command issued by the Host may include different numbers of data read-write requests for reading data from the solid state disk or writing data into the solid state disk. For example, a user searches for certain data through the host, and the host may issue a command including one or more data reading requests, which may read data required by the user from the solid state disk. For another example, a user stores a document through a host, and the host may issue a command, where the command includes a plurality of data storage requests, and the requests may store data corresponding to the document to the solid state disk. In other embodiments, the received data read/write request may not be issued by the host, but may also be a data read/write request sent autonomously by the solid state disk, such as a GC request (garbage collection request).
And S12, calculating the target mapping granularity corresponding to the data read-write request. Referring to fig. 3, fig. 3 is a schematic diagram of a method for calculating target mapping granularity corresponding to a data read-write request according to an embodiment of the present application, specifically, the calculating the target mapping granularity corresponding to the data read-write request includes:
and S121, determining a target area corresponding to the data read-write request.
S122, obtaining a first historical data read-write request in the target area, and calculating the data read-write request quantity of the first historical data read-write request and the data total quantity of the first historical data read-write request.
In general, a solid state disk divides an area for storing data into a plurality of zones (zones) for storing data more orderly, determines a target zone corresponding to a data read-write request when the data read-write request is received, analyzes the first historical data read-write request in the target zone, i.e., analyzes the data read-write request received by the target zone in a past period of time, and analyzes the number of the data read-write requests received in the past period of time and the total data amount contained in the data read-write requests, for example, in the past period of time, the first historical data read-write request corresponding to the target zone includes 100 data read requests, of which 90 data read requests require to read 16K data, 8 data read requests require to read 8K data, and 2 data read requests require to read 4K data, then the total amount of data for the first historical data read-write request is 1512K.
And S123, calculating a first quotient of the total data amount and the data read-write request amount, wherein the first quotient is a granularity judgment value. Taking the above 100 data read requests as an example, the first quotient of the total data amount and the number of data read/write requests is calculated as 1512K total data amount/100 request amount, which is 15.12, and the obtained 15.12 is a granularity determination value. It should be noted that the first historical data read-write request is not limited to be determined or selected according to time, and in some other embodiments, the first historical data read-write request may also be selected according to other conditions, for example, 100 data read-write requests received before the current data read-write request is received are used as the first historical data read-write request, and the like.
And S124, determining the granularity of the target mapping according to the granularity judgment value. Referring to fig. 4, fig. 4 is a schematic diagram illustrating a method for selecting a target mapping granularity according to a granularity determination value according to an embodiment of the present application, where a plurality of Translation layers ftl (flash Translation layer) are disposed in a solid state disk, and the Translation layers are disposed in parallel. Specifically, the determining the target mapping granularity according to the granularity judgment value includes:
s1241, obtaining mapping granularities corresponding to the translation layers respectively;
s1242, obtaining the mapping granularity which is larger than the granularity judgment value and has the smallest difference with the granularity judgment value, wherein the mapping granularity is the target mapping granularity. The mapping granularities corresponding to the plurality of translation layers are different, for example, the number of the translation layers is 3, the mapping granularity corresponding to the translation layer 1 is 4K, the mapping granularity corresponding to the translation layer 2 is 8K, and the mapping granularity corresponding to the translation layer 3 is 16K. Still taking the above 100 data reading requests as an example, the calculated granularity determination value is 15.12, and if 16K of the above 4K, 8K and 16K satisfies that the difference value with 15.12 is the minimum, the mapping granularity 16K corresponding to the translation layer 3 is selected as the target mapping granularity. It should be noted that if the mapping granularities corresponding to the plurality of translation layers do not satisfy the above condition, a relatively better mapping granularity is selected as the target mapping granularity, for example, also the translation layers 1 to 3, and if the calculated granularity determination value is 17 and none of the 4K, 8K, and 16K satisfies more than 17, a relatively better mapping granularity 16K corresponding to the translation layer 3 is selected as the target mapping granularity.
The method for calculating the granularity judgment value is only an example, and is not limited to calculating the granularity judgment value only by the method, and in some other embodiments, there may be another method for calculating the granularity judgment value, for example, based on the method for calculating the granularity judgment value, please refer to fig. 5, where the calculating the target mapping granularity corresponding to the data read-write request includes:
s1201, obtaining a second historical data read-write request corresponding to the solid state disk, and calculating the data read-write request quantity of the second historical data read-write request and the data total quantity of the second historical data read-write request. The second historical data read-write request may be data read-write requests received by all regions including the target region in the solid state disk within a past period of time, and similarly, the number of data read-write requests corresponding to the second historical data read-write request and the total data volume included in the data read-write requests are analyzed. For example, in the past period of time, the second historical data read-write request corresponding to the solid state disk includes 500 data read requests, including 200 data read requests that require 16K of data to be read, 200 data read requests that require 8K of data to be read, and 100 data read requests that require 4K of data to be read, so that the total data amount of the second historical data read-write request is 5200K. Meanwhile, following some of the example data in steps S121-S123 described above: the total amount of 100 data read requests and 1512K data in the first historical data read/write request, and the first quotient 15.12, where 15.12 is only the first quotient and not the granularity judgment value.
S1202, calculating a second quotient value of the total data amount and the data read-write request amount; taking the above 500 data reading requests as an example, a second quotient is calculated, that is, the total data amount 5200K/the request number 500 is 10.4, and the obtained 10.4 is the second quotient.
S1203, calculating the sum of the weight of the first quotient and the weight of the second quotient, wherein the sum is a granularity judgment value. The weight of the first quotient and the weight of the second quotient can be set by a worker in advance, for example, the weight of the first quotient is 70%, the weight of the second quotient is 30%, the sum of the weight of the first quotient and the weight of the second quotient, that is, (15.12 × 70%) + (10.4 × 30%) + is 13.70 (two bits after the decimal point can be set), and the obtained 13.70 is the granularity judgment value. It should be noted that the data in this embodiment are all assumed, and in an actual situation, the calculated data can be made to better fit the current scene by adjusting the weight, so as to better predict the target mapping granularity corresponding to the data read-write request received next.
And S1204, determining the target mapping granularity according to the granularity judgment value. The manner of determining the granularity of the target map according to the granularity determination value may be the same as that of step S124, and please refer to the description of step S124.
And S13, selecting a translation layer for transmitting and processing the data read-write request according to the target mapping granularity. Still taking the above 100 data read requests as an example, the translation layer 3 is selected to process the data read request according to the target mapping granularity of 16K.
It should be noted that the target mapping granularity is a value estimated by the solid state disk according to the historical data, and is estimated to be the mapping granularity suitable for the request, and it cannot be guaranteed that the target mapping granularity is definitely the most suitable mapping granularity for the request, for example, in some continuous reading scenes, the host issues a data reading request every 0.1 second and reads 32K data, so that it can be estimated according to the historical data that the next request issued by the host is most probable to be read as the 32K data, the mapping granularity suitable for reading the 32K data can be selected as the target mapping granularity, and a corresponding translation layer is selected, but it cannot be guaranteed that the host issues a data reading request for reading the 32K data.
And S14, performing granularity disassembly on the data read-write request according to the translation layer to generate a back-end request corresponding to the data read-write request.
And S15, executing data processing operation according to the back-end request.
Referring to fig. 6, fig. 6 is a schematic diagram of data transmission provided in the embodiment of the present application, in which a solid state disk includes front end firmware FE (front end), a middle end module, and a back end firmware (back end), and in order to correspond to the front end, the middle end, and the back end of the solid state disk, a flash memory medium and a back end fastener for storing data are shown in the drawing at one location. As shown in fig. 6, there is a Detector (IO Detector) in the middle-end module, where the Detector may record a historical data read-write request, and track and adapt to a read-write rule of the host according to the historical data request, for example, if it is analyzed that the host tends to issue a data read-write request with continuous large data volume based on the historical data request, the output of the Detector tends to target mapping granularity with large granularity; if the fact that the host tends to issue the data read-write request with the discrete data and small data volume is analyzed, the output of the detector tends to be the target mapping granularity of the small granularity. The calculated relationship of the detector reference may be defined as: the output mapping granularity is the total data amount of the data read-write request in a certain time/the number of the data read-write requests in the certain time, and the specific output rule may refer to the content of the calculated granularity judgment value and the calculated target mapping granularity, which is not described herein again. The host issues a data read-write request, the front-end fixed part is used for receiving the data read-write request and analyzing a corresponding target area, the detector calculates target mapping granularity according to the calculation method, then a corresponding translation layer is selected according to the target mapping granularity, granularity disassembly is performed through the translation layer, the data read-write request is subjected to granularity disassembly to generate a back-end request corresponding to the data read-write request, and the back-end fixed part can perform data processing operation according to the back-end request.
For the translation layers with different mapping granularities, please refer to fig. 7a-7c, it is assumed that at a certain time in a certain scene, the host issues three data read requests, which are CTAG X, CTAG Y, and CTAG Z, respectively, wherein the key information in the CTAG includes SLBA (Start LBA, Start address) and NLBA (Number of LBAs, Number of addresses), and the address Range LBA Range corresponding to the data read request can be known according to the SLBA and the NLBA. Suppose that:
CTAG X:
SLBA:24
NLBA:8
LBA Range:24,25,26,27,28,29,30,31。
CTAG Y:
SLBA:0
NLBA:4
LBA Range:0,1,2,3。
CTAG Z:
SLBA:32
NLBA:8
LBA Range:32,33,34,35,36,37,38,39。
the parsing results of the three data read and write requests with different mapping granularities are different, please refer to fig. 7a-7c, fig. 7a is an end-to-end view after 4K mapping, fig. 7b is an end-to-end view after 8K mapping, and fig. 7c is an end-to-end view after 16K mapping.
As can be seen from the figure, under the respective Mapping granularities of 4K-8K-16K-NK, the Mapping tables (Mapping tables) of the translation layers finally formed have proportional differences, and the differences of the Mapping tables are expressed as the granularity and the times of command splitting/aggregation during the data processing process, so as to affect the delay size during the data processing process and the end-to-end processing performance.
Taking writing data as an example, a front-end fixed element of a solid-state disk receives a host command, analyzes that the command contains a plurality of data writing requests and data to be written in each data writing request, and stores the data to be written in a storage medium of the solid-state disk through a rear-end fixed element, wherein the position of the data required to be written by the host in the solid-state disk is recorded in a mapping table, after the data is stored, the rear-end fixed element notifies a translation layer, and the translation layer updates the mapping table according to the data writing process. In this process, the front end firmware receives the host command and then caches the data in the write units of the memory, the granularity of the write units is determined according to the mapping granularity of the translation layer and the boundary of the NAND memory, usually the NAND is a Triple Level Cell (Triple Level Cell), 2-planes (page 2), and 16K is the boundary, so the granularity of one write unit is 16K × 3 — 96K. With the arrangement of a single translation layer in the prior art, if the mapping granularity of the translation layer is 4K, since the mapping granularity of the translation layer is 4K, and the number of updated entries in the mapping table is 96K/4K ═ 16, the mapping table gradually evolves to a very complex and unordered state as the solid state disk continuously reads and writes data. According to the method provided by the embodiment of the present application, if a translation layer with a more suitable mapping granularity can be selected in the process, for example, a translation layer with a mapping granularity of 16K is selected, the number of the updated entries in the mapping table is 96K/16-4, which greatly reduces the complexity of the mapping table.
Taking reading data as an example, a front-end fixed element of a solid state disk receives a host command, analyzes that the command contains a plurality of data reading requests, obtains LBA (Logical Block Address) information and LBA length information of the data reading requests, submits the data reading requests and the information to a translation layer, the translation layer splits the data reading requests according to a mapping table and mapping granularity, indexes the mapping table to obtain NPA (NAND Physical Address, Physical location) of the data to be read, and generates a corresponding back-end request according to the NPA. With the single translation layer configuration in the prior art, if a data read request needs to read data of LBA0-7 with 4K × 8 being 32K, the mapping granularity of the translation layer is 4K, and if the 32K logically continuous data is extremely dispersed in physical location, for example, LBA0,2,4,6 is located at Page 0(Page0), LBA1,3,5,7 is located at Page 1(Page1), so that 8 backend requests are generated in 8 indexes of the translation layer sequence to read these eight data. In the method provided by the embodiment of the application, if the translation layer with the mapping granularity of 16K is selected for the data reading request according to the history request, under the optimal condition, only 2 back-end requests need to be generated to read the 32K data, so that the processing performance of the solid state disk is improved.
The data processing method provided by the embodiment of the application further comprises the following steps: and S16, obtaining mapping granularity corresponding to the sending end of the data read-write request, so that the translation layer accesses the sending end according to the mapping granularity corresponding to the sending end. The sending end may be other host devices that send commands, or may be the solid state disk itself. Specifically, after the mapping granularity corresponding to the sending end of the data read-write request is obtained, the target mapping granularity and the mapping granularity corresponding to the sending end are recorded through a bitmap, and the bitmap is recorded in front-end firmware. For example, the target mapping granularity corresponding to a certain data read/write request is M granularity, and the mapping granularity corresponding to the sending end of the data read/write request is N granularity, the bitmap is used to support accessing the translation layer with M granularity (for example, the back-end firmware accesses the translation layer with M granularity), and access the sending end with N granularity (for example, the translation layer/the front-end firmware returns the data processing result to the host with N granularity).
In some other embodiments, the data processing method provided in the embodiments of the present application further includes: s17, after completing the data processing operation corresponding to the data read-write request, updating the historical data read-write request, where specifically, the updating the historical data read-write request includes: and updating the data in the historical data read-write request and a corresponding timestamp, wherein the timestamp is used for determining a time period corresponding to the historical data read-write request. After the solid state disk processes the currently received data read-write request, the data read-write request is added into the historical data read-write request corresponding to the target area, and the timestamp corresponding to the historical data read-write request is modified, so that the target mapping granularity of the next data read-write request is calculated.
According to the data processing method provided by the embodiment of the application, a plurality of translation layers corresponding to different mapping granularities are arranged in parallel, so that the data processing method can adapt to data reading and writing requests with different target mapping granularities, and meanwhile, the target mapping granularity corresponding to a newly received data reading and writing request can be predicted according to the mapping granularity corresponding to the previously received data reading and writing request, so that the translation layer with the proper mapping granularity is selected for the data reading and writing request. In addition, because a plurality of translation layers with different mapping granularities are arranged in parallel, the data processing method provided by the application can enable the solid state disk to process different data read-write requests at the same time, for example, one data read-write request e is distributed to the translation layer 5 with the 4K mapping granularity at the current time, another data read-write request h is distributed to the translation layer 6 with the 16K mapping granularity, and the data read-write request e and the data read-write request h can be processed at the same time. In the prior art, no matter the arrangement of a single translation layer or the arrangement of a serial double translation layer, only one data read-write request can be processed at the same time.
The differences between the present application and the prior art are also reflected in: in the prior art, a scheme of providing a single translation layer or a serial dual translation layer is a scheme adapted to a solid state disk view, that is, a translation layer with fixed mapping granularity is set according to a storage property of a solid state disk, generally, the granularity corresponding to NAND is greater than the granularity corresponding to a host command, and no matter a host issues a data read-write request with large data volume or a data read-write request with small data volume, data can only be stored in the solid state disk or read from the solid state disk through the translation layer. The scheme for adapting to the view angle of the host selects the mapping granularity according to the habit of the host, namely, the behavior of the host is concerned, the scheme adapts to the host by adjusting the granularity of the translation layer in the solid state disk, can adapt to various scenes of issuing data read-write requests with large data volume and/or data read-write requests with small data volume by the host, and better utilizes the characteristic (such as a mapping table) of the mapping granularity to improve the processing performance of the solid state disk.
The embodiment of the present application provides a firmware system 300 of a solid state hard disk controller, where the firmware system 300 includes:
a request receiving module 31, where the request receiving module 31 is configured to receive at least one data read-write request; taking receiving a host command as an example, the command issued by the host may include different numbers of data read-write requests to read data from the solid state disk or write data into the solid state disk.
The granularity calculating module 32, where the granularity calculating module 32 is configured to calculate an optimal mapping granularity corresponding to the data read-write request; the target mapping granularity is a value which is estimated by the solid state disk according to historical data, the mapping granularity which is suitable for the request is estimated, and a translation layer corresponding to the target mapping granularity is selected to translate the data read-write request, so that the solid state disk has higher read-write performance.
A translation layer selection module 33, wherein the translation layer selection module 33 is configured to select a translation layer for transmitting and processing the data read/write request according to the optimal mapping granularity; the solid state disk comprises a solid state disk and a plurality of translation layers, wherein the translation layers are arranged in the solid state disk in parallel.
The translation module 34 is configured to perform granularity parsing on the data read-write request according to the translation layer to generate a back-end request corresponding to the data read-write request; when a plurality of data read-write requests with different target mapping granularities are received in the same scene, the data read-write requests can be simultaneously processed by a plurality of parallel translation layers respectively so as to improve the read-write performance of the solid state disk.
A request processing module 35, wherein the request processing module 35 is configured to perform a data processing operation according to the backend request.
It should be noted that the firmware system can execute the data processing method provided by the embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method. For technical details that are not described in detail in the firmware system embodiment, reference may be made to the data processing method provided in the embodiment of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; within the context of the present application, where technical features in the above embodiments or in different embodiments can also be combined, the steps can be implemented in any order and there are many other variations of the different aspects of the present application as described above, which are not provided in detail for the sake of brevity; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method of data processing, the method comprising:
receiving at least one data read-write request;
calculating the target mapping granularity corresponding to the data read-write request;
selecting a translation layer for transmitting and processing the data read-write request according to the target mapping granularity;
performing granularity disassembly on the data reading and writing request according to the translation layer to generate a back-end request corresponding to the data reading and writing request;
and executing data processing operation according to the back-end request.
2. The method of claim 1, wherein the calculating the target mapping granularity corresponding to the data read/write request comprises:
determining a target area corresponding to the data read-write request;
acquiring a first historical data read-write request in the target area, and calculating the data read-write request quantity of the first historical data read-write request and the data total quantity of the first historical data read-write request;
calculating a first quotient of the total data amount and the data read-write request amount, wherein the first quotient is a granularity judgment value;
and determining the granularity of the target mapping according to the granularity judgment value.
3. The method of claim 2, wherein the calculating the target mapping granularity corresponding to the data read/write request further comprises:
acquiring a second historical data read-write request corresponding to the solid state disk, and calculating the data read-write request quantity of the second historical data read-write request and the data total quantity of the second historical data read-write request;
calculating a second quotient value of the total data amount and the data read-write request amount;
calculating the sum of the weight of the first quotient and the weight of the second quotient, wherein the sum is a granularity judgment value;
and determining the granularity of the target mapping according to the granularity judgment value.
4. The method according to claim 2 or 3, wherein the translation layers include a plurality of translation layers, the plurality of translation layers are arranged in parallel, and the determining the target mapping granularity according to the granularity determination value includes:
obtaining mapping granularity corresponding to the translation layers respectively;
and acquiring the mapping granularity which is larger than the granularity judgment value and has the minimum difference with the granularity judgment value, wherein the mapping granularity is the target mapping granularity.
5. The method of claim 1, further comprising:
and acquiring the mapping granularity corresponding to the sending end of the data read-write request so that the translation layer accesses the sending end according to the mapping granularity corresponding to the sending end.
6. The method of claim 5, further comprising:
and recording the target mapping granularity and the mapping granularity corresponding to the sending end through a bitmap.
7. The method of claim 2, further comprising:
after the data processing operation corresponding to the data read-write request is completed, updating a historical data read-write request, wherein the updating of the historical data read-write request comprises:
and updating the data in the historical data read-write request and a corresponding timestamp, wherein the timestamp is used for determining a time period corresponding to the historical data read-write request.
8. A firmware system, comprising:
the request receiving module is used for receiving at least one data read-write request;
the granularity calculation module is used for calculating the optimal mapping granularity corresponding to the data read-write request;
the translation layer selection module is used for selecting a translation layer for transmitting and processing the data read-write request according to the optimal mapping granularity;
the translation module is used for performing granularity resolution on the data read-write request according to the translation layer so as to generate a back-end request corresponding to the data read-write request;
and the request processing module is used for executing data processing operation according to the back-end request.
9. A solid state hard disk controller, comprising:
the firmware system of claim 8;
the system comprises at least one processor, a data processing unit and a data processing unit, wherein the processor is provided with a detector which is used for calculating a data reading and writing request; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the data processing method of any one of claims 1-7 based on the detector.
10. A solid state disk, comprising: the solid state hard disk controller of claim 9, and at least one flash media communicatively coupled to the solid state hard disk controller.
CN202111625616.4A 2021-12-28 2021-12-28 Data processing method, solid state disk controller and solid state disk Pending CN114327272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111625616.4A CN114327272A (en) 2021-12-28 2021-12-28 Data processing method, solid state disk controller and solid state disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111625616.4A CN114327272A (en) 2021-12-28 2021-12-28 Data processing method, solid state disk controller and solid state disk

Publications (1)

Publication Number Publication Date
CN114327272A true CN114327272A (en) 2022-04-12

Family

ID=81015076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111625616.4A Pending CN114327272A (en) 2021-12-28 2021-12-28 Data processing method, solid state disk controller and solid state disk

Country Status (1)

Country Link
CN (1) CN114327272A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061957A (en) * 2022-05-17 2022-09-16 苏州浪潮智能科技有限公司 Storage device and access method

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060179212A1 (en) * 2005-02-07 2006-08-10 Kim Jin-Hyuk Flash memory control devices that support multiple memory mapping schemes and methods of operating same
US20120317377A1 (en) * 2011-06-09 2012-12-13 Alexander Palay Dual flash translation layer
US20140208003A1 (en) * 2013-01-22 2014-07-24 Lsi Corporation Variable-size flash translation layer
CN104375956A (en) * 2013-08-16 2015-02-25 Lsi公司 A method for using a variable-size flash translation layer and a device
CN106293521A (en) * 2016-08-02 2017-01-04 华中科技大学 A kind of mapping granule adaptive flash translation layer (FTL) management method
CN109086008A (en) * 2018-07-26 2018-12-25 浪潮电子信息产业股份有限公司 The data processing method and solid state hard disk of solid state hard disk
US10222984B1 (en) * 2015-12-31 2019-03-05 EMC IP Holding Company LLC Managing multi-granularity flash translation layers in solid state drives
CN109992203A (en) * 2017-12-28 2019-07-09 英特尔公司 It is able to carry out the high-capacity storage of fine granularity reading and/or write operation
KR20190121265A (en) * 2018-04-17 2019-10-25 한국과학기술원 Apparatus and method for managing ftl
CN110399312A (en) * 2019-07-30 2019-11-01 深圳大普微电子科技有限公司 Improve method, solid state hard disk and the storage medium of solid state hard disk reading performance
CN110471861A (en) * 2019-07-10 2019-11-19 华为技术有限公司 Date storage method and flash memory device in a kind of flash memory device
CN111797029A (en) * 2019-04-03 2020-10-20 爱思开海力士有限公司 Controller, memory system including the same, and method of operating the memory system
US20200379643A1 (en) * 2019-05-29 2020-12-03 Western Digital Technologies, Inc. Storage System and Method for Storage System Calibration
CN112650441A (en) * 2019-10-11 2021-04-13 杭州海康威视数字技术股份有限公司 Stripe cache allocation method and device, electronic equipment and storage medium
CN113704140A (en) * 2021-08-27 2021-11-26 锐掣(杭州)科技有限公司 Solid state disk address mapping method and device

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060179212A1 (en) * 2005-02-07 2006-08-10 Kim Jin-Hyuk Flash memory control devices that support multiple memory mapping schemes and methods of operating same
US20120317377A1 (en) * 2011-06-09 2012-12-13 Alexander Palay Dual flash translation layer
US20140208003A1 (en) * 2013-01-22 2014-07-24 Lsi Corporation Variable-size flash translation layer
CN104375956A (en) * 2013-08-16 2015-02-25 Lsi公司 A method for using a variable-size flash translation layer and a device
US10222984B1 (en) * 2015-12-31 2019-03-05 EMC IP Holding Company LLC Managing multi-granularity flash translation layers in solid state drives
CN106293521A (en) * 2016-08-02 2017-01-04 华中科技大学 A kind of mapping granule adaptive flash translation layer (FTL) management method
CN109992203A (en) * 2017-12-28 2019-07-09 英特尔公司 It is able to carry out the high-capacity storage of fine granularity reading and/or write operation
KR20190121265A (en) * 2018-04-17 2019-10-25 한국과학기술원 Apparatus and method for managing ftl
CN109086008A (en) * 2018-07-26 2018-12-25 浪潮电子信息产业股份有限公司 The data processing method and solid state hard disk of solid state hard disk
CN111797029A (en) * 2019-04-03 2020-10-20 爱思开海力士有限公司 Controller, memory system including the same, and method of operating the memory system
US20200379643A1 (en) * 2019-05-29 2020-12-03 Western Digital Technologies, Inc. Storage System and Method for Storage System Calibration
CN110471861A (en) * 2019-07-10 2019-11-19 华为技术有限公司 Date storage method and flash memory device in a kind of flash memory device
CN110399312A (en) * 2019-07-30 2019-11-01 深圳大普微电子科技有限公司 Improve method, solid state hard disk and the storage medium of solid state hard disk reading performance
CN112650441A (en) * 2019-10-11 2021-04-13 杭州海康威视数字技术股份有限公司 Stripe cache allocation method and device, electronic equipment and storage medium
CN113704140A (en) * 2021-08-27 2021-11-26 锐掣(杭州)科技有限公司 Solid state disk address mapping method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YAZHI FENG ET AL.: "Multiple Subpage Writing FTL in MLC by Exploiting Dual Mode Operations", IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 31 March 2020 (2020-03-31), pages 599 - 611 *
常恒: "一种基于压缩页的固态存储FTL性能优化算法的研究", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 06, 15 June 2019 (2019-06-15), pages 3 - 4 *
樊进 等: "一种变粒度的闪存地址映射方案", 中国科学技术大学学报, no. 10, 15 October 2017 (2017-10-15), pages 869 - 877 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061957A (en) * 2022-05-17 2022-09-16 苏州浪潮智能科技有限公司 Storage device and access method
CN115061957B (en) * 2022-05-17 2023-07-11 苏州浪潮智能科技有限公司 Storage device access method

Similar Documents

Publication Publication Date Title
US11893238B2 (en) Method of controlling nonvolatile semiconductor memory
US10474397B2 (en) Unified indirection in a multi-device hybrid storage unit
US20210165737A1 (en) Namespace mapping optimization in non-volatile memory devices
US9665485B2 (en) Logical and physical block addressing for efficiently storing data to improve access speed in a data deduplication system
US10037161B2 (en) Tiered storage system, storage controller, and method for deduplication and storage tiering
US11199974B2 (en) Allocation of memory regions of a nonvolatile semiconductor memory for stream-based data writing
US8954658B1 (en) Method of LUN management in a solid state disk array
KR20130043445A (en) Interface management method and method for processing mapping in storage device using the same
US11093134B2 (en) Storage device, management method, and program in tiered storage system
KR20180086120A (en) Tail latency aware foreground garbage collection algorithm
US20190243758A1 (en) Storage control device and storage control method
US20170344269A1 (en) Storage system, control apparatus, and method of transmitting data
JP6402557B2 (en) Storage apparatus, storage control method, and storage control program
US10235071B2 (en) Tiered storage system, storage controller and tiering control method
CN114327272A (en) Data processing method, solid state disk controller and solid state disk
US9524236B1 (en) Systems and methods for performing memory management based on data access properties
US11048432B2 (en) Deduplication of data on distributed storage system involving receiving and modifying metadata from local object store
US20240126433A1 (en) Method of controlling nonvolatile semiconductor memory
US11429531B2 (en) Changing page size in an address-based data storage system
US20230384968A1 (en) Storage device, storage control method, and computer-readable recording medium storing storage control program
US20210011859A1 (en) Method and computer program product and apparatus for controlling data access of a flash memory device
KR20230096359A (en) Ssd device and operating method of the same using ftl based on lsm-tree and approximate indexing
JP5638022B2 (en) Disk array 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