Solid state disk reading method and device

文档序号:923451 发布日期:2021-03-02 浏览:6次 中文

阅读说明:本技术 一种固态硬盘读方法和装置 (Solid state disk reading method and device ) 是由 邵文豪 苏军 于 2020-11-12 设计创作,主要内容包括:本发明公开了一种固态硬盘读方法和装置,方法包括:获取两个连续的读请求,并由固态硬盘的闪存转换层确定两个读请求分别请求读取的数据块位于固态硬盘的同一逻辑层还是不同逻辑层上;响应于两个读请求分别请求读取位于不同逻辑层上的数据块而将两个读请求合并为复合读请求;由与非门闪存处理器基于复合读请求而将固态硬盘的两个对应数据块中的数据并行加载到不同逻辑层的页面寄存器;将两个逻辑层的页面寄存器中的数据串行传输到内存储器以完成固态硬盘读操作。本发明能够提高固态硬盘的读响应速度和读操作的性能。(The invention discloses a solid state disk reading method and a solid state disk reading device, wherein the method comprises the following steps: acquiring two continuous read requests, and determining whether the data blocks respectively requested to be read by the two read requests are located on the same logic layer or different logic layers of the solid state disk by a flash conversion layer of the solid state disk; merging two read requests into a composite read request in response to the two read requests respectively requesting to read data blocks located on different logical layers; loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request; and serially transmitting the data in the page registers of the two logic layers to an internal memory to complete the solid state disk reading operation. The invention can improve the read response speed and the read operation performance of the solid state disk.)

1. A solid state disk reading method is characterized by comprising the following steps:

acquiring two continuous read requests, and determining whether data blocks respectively requested to be read by the two read requests are located on the same logic layer or different logic layers of the solid state disk by a flash conversion layer of the solid state disk;

merging the two read requests into a composite read request in response to the two read requests respectively requesting to read the data blocks located on different logical layers;

loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request;

and serially transmitting the data in the page registers of the two logic layers to an internal memory to finish the reading operation of the solid state disk.

2. The method of claim 1, further comprising: sending the two read requests to the NAND gate flash memory processor to respectively execute the two read requests in response to the two read requests respectively requesting to read the data block located on the same logical layer.

3. The method of claim 1, further comprising: sending one of the two read requests to the NAND gate flash memory processor to execute the read request in response to the two read requests respectively requesting to read the data block located on the same logical layer.

4. The method of claim 3, further comprising: after one of the two read requests is sent to the nand gate flash memory processor to execute the read request, a next new read request is also obtained to iteratively determine whether the data blocks requested to be read by the other of the two read requests and the next new read request are located on the same logical layer or different logical layers of the solid state disk respectively.

5. The method of claim 1, wherein each of the data blocks in the solid state disk is assigned to a different logical layer based on its identity.

6. The method of claim 1, wherein loading the data in the data block into the page register occupies a first duration of the page register; and transmitting the data in the page register to a second time length of the internal memory occupied by the internal memory, wherein the second time length is less than the first time length.

7. The method of claim 1, wherein serially transferring data in the page registers of two logical layers to an internal memory comprises: and sequentially transmitting the data in the page registers of the two logic layers to the internal memory according to the sequence of finishing the loading to the page registers based on the direct memory access.

8. A solid state disk reading device, comprising:

a processor; and

a memory storing program code executable by the processor, the program code when executed performing the steps of:

acquiring two continuous read requests, and determining whether data blocks respectively requested to be read by the two read requests are located on the same logic layer or different logic layers of the solid state disk by a flash conversion layer of the solid state disk;

merging the two read requests into a composite read request in response to the two read requests respectively requesting to read the data blocks located on different logical layers;

loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request;

and serially transmitting the data in the page registers of the two logic layers to an internal memory to finish the reading operation of the solid state disk.

9. The apparatus of claim 8, wherein the steps further comprise: sending the two read requests to the NAND gate flash memory processor to execute the two read requests, respectively, or sending one of the two read requests to the NAND gate flash memory processor to execute the read request, in response to the two read requests requesting to read the data block located on the same logical layer, respectively.

10. The apparatus of claim 8, wherein loading the data in the data block into the page register occupies a first duration of the page register; and transmitting the data in the page register to a second time length of the internal memory occupied by the internal memory, wherein the second time length is less than the first time length.

Technical Field

The present invention relates to the field of data storage, and in particular, to a method and an apparatus for reading a solid state disk.

Background

In the big data era, the storage of mass data is more and more important, and the storage and reading speed of data is always the system bottleneck when the speed of computing components such as a CPU (central processing unit) is higher and higher. At present, with the gradual decline of the price of NAND flash (flash memory medium), the use amount of solid state disks also rises year by year.

Different from a traditional hard disk, a storage unit of a solid state hard disk is NAND, and the reading of the NAND is divided into two steps: 1. reading a page register (page register) inside the NAND from a physical unit (data block) of the NAND; 2. transfer from page register to DDR. The whole process takes about 70us of time, with about 50us required for reading from a physical cell to a page register and about 10us required for DMA to DDR from a NAND page register. It can be seen that the time spent from the cell to the page register is a large overhead, resulting in a slow read response speed.

Aiming at the problem of low read response speed of the solid state disk in the prior art, no effective solution is available at present.

Disclosure of Invention

In view of this, an embodiment of the present invention provides a method and an apparatus for reading a solid state disk, which can improve the read response speed and the performance of a read operation of the solid state disk.

Based on the above purpose, a first aspect of the embodiments of the present invention provides a method for reading a solid state disk, including the following steps:

acquiring two continuous read requests, and determining whether the data blocks respectively requested to be read by the two read requests are located on the same logic layer or different logic layers of the solid state disk by a flash conversion layer of the solid state disk;

merging two read requests into a composite read request in response to the two read requests respectively requesting to read data blocks located on different logical layers;

loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request;

and serially transmitting the data in the page registers of the two logic layers to an internal memory to complete the solid state disk reading operation.

In some embodiments, the method further comprises: in response to two read requests respectively requesting to read data blocks located on the same logical layer, the two read requests are sent to the nand gate flash memory processor to respectively perform the two read requests.

In some embodiments, the method further comprises: one of the two read requests is sent to the nand gate flash memory processor to execute the read request in response to the two read requests respectively requesting to read the data block located on the same logical layer.

In some embodiments, the method further comprises: after one of the two read requests is sent to the nand gate flash memory processor to execute the read request, a next new read request is also obtained to iteratively determine whether the data blocks requested to be read by the other of the two read requests and the next new read request are located on the same logical layer or different logical layers of the solid state disk respectively.

In some embodiments, each data block in the solid state disk is assigned to a different logical layer based on its identification.

In some embodiments, loading data in the data block into the page register occupies a first duration of the page register; and transmitting the data in the page register to a second time length of the internal memory occupied by the internal memory, wherein the second time length is less than the first time length.

In some embodiments, serially transferring data in the page registers of both logical layers to the internal memory comprises: and sequentially transmitting the data in the page registers of the two logic layers to the internal memory according to the sequence of finishing the loading to the page registers based on the direct memory access.

A second aspect of the embodiments of the present invention provides a solid state disk reading apparatus, including:

a processor; and

a memory storing program code executable by the processor, the program code when executed performing the steps of:

acquiring two continuous read requests, and determining whether the data blocks respectively requested to be read by the two read requests are located on the same logic layer or different logic layers of the solid state disk by a flash conversion layer of the solid state disk;

merging two read requests into a composite read request in response to the two read requests respectively requesting to read data blocks located on different logical layers;

loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request;

and serially transmitting the data in the page registers of the two logic layers to an internal memory to complete the solid state disk reading operation.

In some embodiments, the steps further comprise: in response to two read requests respectively requesting to read data blocks located on the same logical layer, the two read requests are sent to the nand gate flash memory processor to respectively execute the two read requests, or one of the two read requests is sent to the nand gate flash memory processor to execute the read request.

In some embodiments, loading data in the data block into the page register occupies a first duration of the page register; and transmitting the data in the page register to a second time length of the internal memory occupied by the internal memory, wherein the second time length is less than the first time length.

The invention has the following beneficial technical effects: according to the solid state disk reading method and device provided by the embodiment of the invention, two continuous reading requests are obtained, and the flash memory conversion layer of the solid state disk determines whether the data blocks respectively requested to be read by the two reading requests are located on the same logic layer or different logic layers of the solid state disk; merging two read requests into a composite read request in response to the two read requests respectively requesting to read data blocks located on different logical layers; loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request; the technical scheme of serially transmitting the data in the page registers of the two logic layers to the internal memory to complete the reading operation of the solid state disk can improve the reading response speed and the performance of the reading operation 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 some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

Fig. 1 is a schematic flow chart of a solid state disk reading method provided by the present invention;

fig. 2 is a read flow-time diagram of the solid state disk reading method provided by the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.

It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.

In view of the foregoing, a first aspect of the embodiments of the present invention provides an embodiment of a solid state disk reading method for improving read response speed and read operation performance. Fig. 1 is a schematic flow chart of a solid state disk reading method provided by the present invention.

The solid state disk reading method, as shown in fig. 1, includes the following steps:

step S101, two continuous reading requests are obtained, and a flash conversion layer of the solid state disk determines whether data blocks which are respectively requested to be read by the two reading requests are located on the same logic layer or different logic layers of the solid state disk;

step S103, responding to the two read requests respectively requesting to read the data blocks on different logic layers and combining the two read requests into a composite read request;

step S105, the NAND gate flash memory processor loads the data in the two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel based on the composite read request;

step S107, serially transmitting the data in the page registers of the two logic layers to the internal memory to complete the solid state disk reading operation.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the preceding method embodiments to which it corresponds.

In some embodiments, the method further comprises: in response to two read requests respectively requesting to read data blocks located on the same logical layer, the two read requests are sent to the nand gate flash memory processor to respectively perform the two read requests.

In some embodiments, the method further comprises: one of the two read requests is sent to the nand gate flash memory processor to execute the read request in response to the two read requests respectively requesting to read the data block located on the same logical layer.

In some embodiments, the method further comprises: after one of the two read requests is sent to the nand gate flash memory processor to execute the read request, a next new read request is also obtained to iteratively determine whether the data blocks requested to be read by the other of the two read requests and the next new read request are located on the same logical layer or different logical layers of the solid state disk respectively.

In some embodiments, each data block in the solid state disk is assigned to a different logical layer based on its identification.

In some embodiments, loading data in the data block into the page register occupies a first duration of the page register; and transmitting the data in the page register to a second time length of the internal memory occupied by the internal memory, wherein the second time length is less than the first time length.

In some embodiments, serially transferring data in the page registers of both logical layers to the internal memory comprises: and sequentially transmitting the data in the page registers of the two logic layers to the internal memory according to the sequence of finishing the loading to the page registers based on the direct memory access.

The following further illustrates embodiments of the invention in terms of specific examples.

The invention determines two read operations in different planes (logic layers) as two read operations in different planes by an FTL (flash translation layer), combines the two read operations into a read request and sends the read request to a back-end NAND processing module, the NAND processing module adopts a combined mode to read the read operations in two different planes by occupying a time from a data block to a page register, and then serially completes DMA (direct memory access) operation. This can improve the efficiency of the NAND processing module, reduce the read operation occupation time, and finally improve the read performance.

As shown in fig. 2, first, the FTL determines whether two consecutive read requests are located in different planes; if so, the two read requests are combined into one request and sent to the NAND processing module. And when the NAND processing module judges that the two planes are read, the read commands are sent to the NAND according to the sequence of the plane-0/plane-1. Probabilistically, the probability of two consecutive read operations on different planes is 50%, on the basis of which the FCC processing time can be reduced by about 40%.

As can be seen from the foregoing embodiments, in the solid state disk reading method provided in the embodiments of the present invention, two consecutive read requests are obtained, and the flash translation layer of the solid state disk determines whether the data blocks requested to be read by the two read requests are located on the same logic layer or different logic layers of the solid state disk, respectively; merging two read requests into a composite read request in response to the two read requests respectively requesting to read data blocks located on different logical layers; loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request; the technical scheme of serially transmitting the data in the page registers of the two logic layers to the internal memory to complete the reading operation of the solid state disk can improve the reading response speed and the performance of the reading operation of the solid state disk.

It should be particularly noted that, the steps in the embodiments of the solid state disk reading method described above may be mutually intersected, replaced, added, or deleted, and therefore, the solid state disk reading method based on these reasonable permutation and combination transformations shall also belong to the scope of the present invention, and shall not limit the scope of the present invention to the described embodiments.

In view of the above-mentioned objects, a second aspect of the embodiments of the present invention provides an embodiment of a solid state disk reading apparatus for improving a read response speed and a read operation performance. Solid state hard drives read the device and include:

a processor; and

a memory storing program code executable by the processor, the program code when executed performing the steps of:

acquiring two continuous read requests, and determining whether the data blocks respectively requested to be read by the two read requests are located on the same logic layer or different logic layers of the solid state disk by a flash conversion layer of the solid state disk;

merging two read requests into a composite read request in response to the two read requests respectively requesting to read data blocks located on different logical layers;

loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request;

and serially transmitting the data in the page registers of the two logic layers to an internal memory to complete the solid state disk reading operation.

In some embodiments, the steps further comprise: in response to two read requests respectively requesting to read data blocks located on the same logical layer, the two read requests are sent to the nand gate flash memory processor to respectively execute the two read requests, or one of the two read requests is sent to the nand gate flash memory processor to execute the read request.

In some embodiments, loading data in the data block into the page register occupies a first duration of the page register; and transmitting the data in the page register to a second time length of the internal memory occupied by the internal memory, wherein the second time length is less than the first time length.

As can be seen from the foregoing embodiments, in the solid state disk reading apparatus provided in the embodiments of the present invention, two consecutive read requests are obtained, and the flash translation layer of the solid state disk determines whether the data blocks requested to be read by the two read requests are located on the same logic layer or different logic layers of the solid state disk, respectively; merging two read requests into a composite read request in response to the two read requests respectively requesting to read data blocks located on different logical layers; loading data in two corresponding data blocks of the solid state disk to page registers of different logic layers in parallel by the NAND gate flash memory processor based on the composite read request; the technical scheme of serially transmitting the data in the page registers of the two logic layers to the internal memory to complete the reading operation of the solid state disk can improve the reading response speed and the performance of the reading operation of the solid state disk.

It should be particularly noted that, the above embodiment of the solid state disk reading apparatus employs the embodiment of the solid state disk reading method to specifically describe the working process of each module, and those skilled in the art can easily think that these modules are applied to other embodiments of the solid state disk reading method. Of course, since the steps in the embodiment of the solid state disk reading method may be mutually intersected, replaced, added, and deleted, these reasonable permutations and combinations should also belong to the scope of the present invention, and should not limit the scope of the present invention to the embodiment.

The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.

Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种固态硬盘存储数据的方法和设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类