Management method and management device for data in solid-state nonvolatile storage equipment

文档序号:1286908 发布日期:2020-08-28 浏览:25次 中文

阅读说明:本技术 固态非易失存储设备中数据的管理方法以及管理装置 (Management method and management device for data in solid-state nonvolatile storage equipment ) 是由 向雄 于 2020-05-21 设计创作,主要内容包括:本申请提供了一种固态非易失存储设备中数据的管理方法以及管理装置,该方法包括:确定L2P表中的目标子层表是否在固态非易失存储设备中的第一缓存单元中,第一缓存单元为随机存储器;在目标子层表不在第一缓存单元中的情况下,控制将目标子层表存入第一缓存单元中;确定第一缓存单元中的目标子层表是否为编码压缩格式;在确定目标子层表为非编码压缩格式的情况下,控制至少对目标子层表进行压缩。该方法可以解决现有技术中难以在降低成本的同时保证固态非易失存储设备具有较好的存取性能的问题。(The application provides a management method and a management device for data in a solid-state nonvolatile storage device, wherein the method comprises the following steps: determining whether a target sublayer table in the L2P table is in a first cache unit in the solid-state nonvolatile storage device, wherein the first cache unit is a random access memory; under the condition that the target sublayer table is not in the first cache unit, controlling to store the target sublayer table in the first cache unit; determining whether a target sub-layer table in a first cache unit is in a coding compression format; and controlling to compress at least the target sub-layer table in the case that the target sub-layer table is determined to be in the non-coding compression format. The method can solve the problem that the solid-state nonvolatile storage device is difficult to ensure to have better access performance while the cost is reduced in the prior art.)

1. A method for managing data in a solid-state non-volatile memory device, comprising:

determining whether a target sublayer table in an L2P table is in a first cache unit in a solid-state nonvolatile storage device, wherein the first cache unit is a random access memory;

controlling to store the target sublayer table in the first cache unit if the target sublayer table is not in the first cache unit;

determining whether the target sublayer table in the first cache unit is in a coded compression format;

controlling compression of at least the target sub-layer table if the target sub-layer table is determined to be in a non-encoded compression format.

2. The method of managing of claim 1, wherein prior to storing the target sublayer table in the first cache unit, the method further comprises:

and controlling to compress the plurality of sub-layer tables including the target sub-layer table in a run-length coding mode to obtain a compression unit and/or the sub-layer tables in a non-coding compression format, wherein the compression unit comprises the plurality of sub-layer tables in the coding compression format, and the sub-layer tables which do not exist in the compression unit are the sub-layer tables in the non-coding compression format.

3. The method according to claim 2, wherein controlling the run-length encoding to compress the plurality of sub-layer tables including the target sub-layer table to obtain the sub-layer tables in compressed units and/or non-encoded compressed formats comprises:

determining whether the virtual addresses or the logical addresses of the data in the plurality of sub-layer tables are sequentially continuous;

and under the condition that the virtual addresses or the logic addresses are sequentially continuous, encoding and compressing the plurality of sub-layer tables to obtain the compression unit.

4. The method for managing according to claim 1, wherein controlling at least the target sub-layer table to be compressed in case that the sub-layer table is determined to be in a non-encoded compression format comprises:

controlling to perform primary compression on a plurality of the sub-layer tables including the target sub-layer table and output a primary compressed sub-layer table in a case where it is determined that the sub-layer table is in a non-encoded compression format;

under the control of a compression command, controlling the primary compression sublayer table to be compressed for the second time;

determining whether the capacity of the primary compressed sublayer table after the secondary compression is larger than a first threshold, wherein the first threshold is the capacity of the primary compressed sublayer table;

controlling to output the primary compressed sublayer table when the capacity of the sublayer table after the secondary compression is greater than the first threshold;

and controlling to output the secondary compressed sub-layer table when the capacity of the sub-layer table after the secondary compression is smaller than or equal to the first threshold, wherein the secondary compressed sub-layer table is the primary compressed sub-layer table after the secondary compression.

5. The method of managing of claim 1, wherein in the event that the target sub-layer table is determined to be in a non-encoded compressed format, the method further comprises:

controlling to compress the plurality of sub-layer tables including the target sub-layer table to obtain a compressed sub-layer table;

determining whether a capacity of the compressed sublayer table is greater than a second threshold, the second threshold being a capacity of a plurality of the sublayer tables including the target sublayer table;

controlling decompressing the compressed sublayer if the capacity of the compressed sublayer table is greater than the second threshold;

controlling to output the compressed sublayer table when the capacity of the compressed sublayer table is less than or equal to the second threshold.

6. The management method according to any one of claims 1 to 5, characterized in that the method further comprises:

receiving a write command;

determining whether the sub-layer table corresponding to the write command is in a compressed format;

controlling to store the write command into a second cache unit of the solid-state nonvolatile storage device under the condition that the sub-layer table is in the compressed format;

when the sum of the occupied capacities of all the write commands in the second cache unit is larger than a preset capacity, controlling the decompression of the sub-layer table of the compression format corresponding to each write command;

and controlling to modify the corresponding decompressed data in each sub-layer table according to the write command.

7. The method of claim 6, wherein the predetermined capacity is equal to a maximum storage capacity of the second cache unit.

8. The method of managing according to claim 7, further comprising:

and under the condition that the sub-layer table is not in the compressed format, controlling to modify the data of the corresponding sub-layer table according to the write command.

9. An apparatus for managing data in a solid-state non-volatile memory device, comprising:

a first determining unit, configured to determine whether a target sublayer table in an L2P table is in a first cache unit, where the first cache unit is a random access memory;

a first control unit, configured to store the target sublayer table into the first cache unit if the target sublayer table is not in the first cache unit;

a second determining unit, configured to determine whether the target sublayer table in the first cache unit is in a coded compression format;

a second control unit, configured to control to compress at least the target sublayer table if it is determined that the target sublayer table is in a non-encoded compression format.

10. A storage medium characterized by comprising a stored program, wherein the program executes the management method of any one of claims 1 to 8.

11. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the management method of any one of claims 1 to 8.

12. A solid state non-volatile memory device, comprising: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the management method of any of claims 1-8.

13. The solid state non-volatile memory device of claim 12, wherein the solid state non-volatile memory device comprises at least one of a solid state disk, a universal flash memory device, an embedded multimedia memory card, and a usb disk.

Technical Field

The present application relates to the field of data storage, and in particular, to a method and an apparatus for managing data in a solid-state nonvolatile memory device, a storage medium, a processor, and a solid-state nonvolatile memory device.

Background

Solid-State non-volatile storage devices such as Solid-State drives (SSD) are widely used as basic storage. Since the file system of the OS is logical address-based access, the NAND Flash is virtual address-based management. Thus, Firmware (FW) of an SSD needs to maintain a mapping table from logical addresses to virtual addresses. This table needs to occupy a small capacity, for example, an SSD of 1TB capacity needs 1GB of a Logical-to-Physical (L2P) table. Furthermore, to increase the number of IO per Second (IO per Second, IOPS for short) of the SSD, the L2P table generally needs to be placed in a high-speed RAM. The resources of Random Access Memory (RAM) are limited, and the unit cost is high.

To reduce RAM overhead, the L2P table is typically hierarchically processed. For example, the method comprises the following steps of 2 layers: a parent layer table and a child layer table; the parent layer table resides in the RAM, and the parent layer stores the information of each unit of the sub-layer; the sub-layer table unit dynamically calls in/out the RAM according to whether the sub-layer table unit is called or not. Practice shows that the problem of RAM overhead can be solved basically by the layer 2, but the performance of the corresponding solid-state nonvolatile storage devices such as SSD and the like can also be reduced, and the specific principle is as follows: host sends command and FW resolves to obtain logical address, if the L2P sub-layer table corresponding to the logical address is just in RAM, FW can be used directly, this case is called Hit. Otherwise called miss, FW needs to read the sublayer table from flash to RAM for reuse. If the RAM is full, the FW also needs to evict some of the other sub-layer tables that are not temporarily used in the RAM to the flash memory before reading the sub-layer tables. Flash memory performs much worse than RAM, approaching a 5000X relationship. If hit occurs for an instruction, it is clear that the performance of FW access L2P is not affected at all; and miss occurs, the performance of access to L2P is nearly 5000 times slower. The specific calculation process is as follows:

the average time for FW access to L2P can be calculated by the following equation:

Avg_Time=Racc_Time*Hit_Rate+Facc_Time*(1-Hit_Rate),

avg _ Time is the Average acquisition Time (Average Access Unit Time),

racc _ Time is the RAM data acquisition Time (RAM Access Unit Time),

facc _ Time is NANDFLASH data acquisition Time (Flash Access Unit Time),

the Hit _ Rate represents the Hit Rate,

for example, Racc _ Time is 0.02 μ s, Facc _ Time is 100 μ s,

correspondingly, if Hit _ Rate is 0.90, Avg _ Time is 10.02 μ s; (Avg _ Time ≈ 10.02. mu.s;)

If Hit _ Rate ≈ 0.97, Avg _ Time ≈ 3.02 μ s.

The above information disclosed in this background section is only for enhancement of understanding of the background of the technology described herein and, therefore, certain information may be included in the background that does not form the prior art that is already known in this country to a person of ordinary skill in the art.

Disclosure of Invention

The present application mainly aims to provide a management method, a management apparatus, a storage medium, a processor, and a solid-state nonvolatile memory device for data in the solid-state nonvolatile memory device, so as to solve the problem that it is difficult to ensure that the solid-state nonvolatile memory device has good access performance while reducing cost in the prior art.

According to an aspect of the embodiments of the present invention, there is provided a method for managing data in a solid-state nonvolatile memory device, including: determining whether a target sublayer table in an L2P table is in a first cache unit in a solid-state nonvolatile storage device, wherein the first cache unit is a random access memory; controlling to store the target sublayer table in the first cache unit if the target sublayer table is not in the first cache unit; determining whether the target sublayer table in the first cache unit is in a coded compression format; controlling compression of at least the target sub-layer table if the target sub-layer table is determined to be in a non-encoded compression format.

Optionally, before storing the target sublayer table in the first cache unit, the method further includes: and controlling to compress the plurality of sub-layer tables including the target sub-layer table in a run-length coding mode to obtain a compression unit and/or the sub-layer tables in a non-coding compression format, wherein the compression unit comprises the plurality of sub-layer tables in the coding compression format, and the sub-layer tables which do not exist in the compression unit are the sub-layer tables in the non-coding compression format.

Optionally, controlling to compress the plurality of sub-layer tables including the target sub-layer table in a run-length coding manner to obtain the sub-layer table in a compression unit and/or a non-coding compression format, including: determining whether the virtual addresses or the logical addresses of the data in the plurality of sub-layer tables are sequentially continuous; and under the condition that the virtual addresses or the logic addresses are sequentially continuous, encoding and compressing the plurality of sub-layer tables to obtain the compression unit.

Optionally, in a case that it is determined that the sub-layer table is in a non-coding compression format, at least controlling compression of the target sub-layer table includes: controlling to perform primary compression on a plurality of the sub-layer tables including the target sub-layer table and output a primary compressed sub-layer table in a case where it is determined that the sub-layer table is in a non-encoded compression format; under the control of a compression command, controlling the primary compression sublayer table to be compressed for the second time; determining whether the capacity of the primary compressed sublayer table after the secondary compression is larger than a first threshold, wherein the first threshold is the capacity of the primary compressed sublayer table; controlling to output the primary compressed sublayer table when the capacity of the sublayer table after the secondary compression is greater than the first threshold; and controlling to output the secondary compressed sub-layer table when the capacity of the sub-layer table after the secondary compression is smaller than or equal to the first threshold, wherein the secondary compressed sub-layer table is the primary compressed sub-layer table after the secondary compression.

Optionally, in a case that it is determined that the target sublayer table is in a non-encoded compression format, the method further includes: controlling to compress the plurality of sub-layer tables including the target sub-layer table to obtain a compressed sub-layer table; determining whether a capacity of the compressed sublayer table is greater than a second threshold, the second threshold being a capacity of a plurality of the sublayer tables including the target sublayer table; controlling decompressing the compressed sublayer if the capacity of the compressed sublayer table is greater than the second threshold; controlling to output the compressed sublayer table when the capacity of the compressed sublayer table is less than or equal to the second threshold.

Optionally, the method further comprises: receiving a write command; determining whether the sub-layer table corresponding to the write command is in a compressed format; controlling to store the write command into a second cache unit of the solid-state nonvolatile storage device under the condition that the sub-layer table is in the compressed format; when the sum of the occupied capacities of all the write commands in the second cache unit is larger than a preset capacity, controlling the decompression of the sub-layer table of the compression format corresponding to each write command; and controlling to modify the corresponding decompressed data in each sub-layer table according to the write command.

Optionally, the predetermined capacity is equal to a maximum storage capacity of the second cache unit.

Optionally, the method further comprises: and under the condition that the sub-layer table is not in the compressed format, controlling to modify the data of the corresponding sub-layer table according to the write command.

According to another aspect of the embodiments of the present invention, there is also provided an apparatus for managing data in a solid-state nonvolatile memory device, including: a first determining unit, configured to determine whether a target sublayer table in an L2P table is in a first cache unit, where the first cache unit is a random access memory; a first control unit, configured to store the target sublayer table into the first cache unit if the target sublayer table is not in the first cache unit; a second determining unit, configured to determine whether the target sublayer table in the first cache unit is in a coded compression format; a second control unit, configured to control to compress at least the target sublayer table if it is determined that the target sublayer table is in a non-encoded compression format.

According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program, wherein the program executes any one of the management methods.

According to another aspect of the embodiments of the present invention, there is also provided a processor, where the processor is configured to execute a program, where the program executes any one of the management methods.

According to another aspect of the embodiments of the present invention, there is also provided a solid-state nonvolatile memory device including: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the management methods.

Optionally, the solid-state nonvolatile memory device includes at least one of a solid-state hard disk, a universal flash memory device, an embedded multimedia memory card, and a usb disk.

In the embodiment of the present invention, in the method described above, first, it is determined whether a target sublayer table in the L2P table is in a first cache unit in the solid-state nonvolatile memory device; controlling to store the target sublayer table in the first cache unit if the target sublayer table is not in the first cache unit; determining whether the target sublayer table in the first cache unit is in a coded compression format, where the target sublayer table in this step may be stored after determining that the target sublayer table is not in the first cache unit, or may be in the first cache unit itself; and controlling to compress at least the target sub-layer table when the target sub-layer table is determined to be in a non-coding compression format. According to the method, the target sub-layer table in the first cache unit is ensured to be in a compressed state, so that the first cache unit can cache more sub-layer tables at the same time under the same cache capacity, the hit rate can be obviously improved, and the purpose of improving the access performance of the solid-state nonvolatile storage device system is achieved.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:

FIG. 1 shows a schematic flow diagram of an embodiment of a method of managing a solid-state non-volatile memory device according to the application;

FIG. 2 illustrates a block diagram of an embodiment of a management apparatus of a solid state non-volatile memory device according to the present application; and

FIG. 3 shows a block diagram of a solid state non-volatile memory device according to the present application.

Wherein the figures include the following reference numerals:

50. a request input interface; 60. a firmware operation interface; 70. the result returns to the interface; 80. a read-write interface; 90. a compression/decompression unit; 100. a cache management module; 110. a management device; 200. a solid state non-volatile memory device.

Detailed Description

It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.

In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.

It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

It will be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" another element, it can be directly on the other element or intervening elements may also be present. Also, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element or "connected" to the other element through a third element.

As mentioned in the background, in the prior art, by dividing the L2P table into two layers, one layer resides in RAM and the other layer dynamically calls in or calls out RAM, which can solve the problem of RAM overhead, but the performance of the corresponding solid-state nonvolatile memory device is poor, in order to solve the above problem, in an exemplary embodiment of the present application, a management method, a management apparatus, a storage medium, a processor and a solid-state nonvolatile memory device for data in the solid-state nonvolatile memory device are provided.

According to an embodiment of the present application, a method for managing data in a solid-state nonvolatile memory device is provided.

Fig. 1 is a flowchart of a method for managing data in a solid-state nonvolatile memory device according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:

step S101, determining whether a target sub-layer table in an L2P table is in a first cache unit in a solid-state nonvolatile storage device, wherein the first cache unit is a random access memory;

step S102, controlling to store the target sublayer table into the first cache unit when the target sublayer table is not in the first cache unit;

step S103, determining whether the target sublayer table in the first cache unit is in a coding compression format;

and step S104, controlling to compress at least the target sub-layer table under the condition that the target sub-layer table is determined to be in a non-coding compression format.

In the above method, first, it is determined whether the target sublayer table in the L2P table is in the first cache location in the solid-state nonvolatile memory device; controlling to store the target sublayer table in the first cache unit if the target sublayer table is not in the first cache unit; determining whether the target sublayer table in the first cache unit is in a coded compression format, where the target sublayer table in this step may be stored after determining that the target sublayer table is not in the first cache unit, or may be in the first cache unit itself; and controlling to compress at least the target sub-layer table when the target sub-layer table is determined to be in a non-coding compression format. According to the method, the target sub-layer table in the first cache unit is ensured to be in a compressed state, so that the first cache unit can cache more sub-layer tables at the same time under the same cache capacity, the hit rate can be obviously improved, and the purpose of improving the access performance of the solid-state nonvolatile storage device system is achieved.

It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.

It should also be noted that the sub-layer tables exist for both compressed and uncompressed formats. The format information is maintained by a parent layer table.

In an actual application process, data of some sub-layer tables can obtain a high compression ratio, and the compressed data of some sub-layer tables occupy a larger storage space. In order to compress the sub-layer table reasonably, that is, to make the capacity occupied by the compressed sub-layer table smaller than the capacity of the sub-layer table before compression, so as to further ensure that the first cache unit can cache more sub-layer tables, in an embodiment of the present application, before storing the target sub-layer table in the first cache unit, the method further includes: and controlling to compress the plurality of sub-layer tables including the target sub-layer table by a run-length coding method to obtain a compression unit and/or the sub-layer table in a non-coding compression format, wherein the compression unit includes the plurality of sub-layer tables in the coding compression format, and the sub-layer table not existing in the compression unit is the sub-layer table in the non-coding compression format.

In a specific embodiment, the controlling of compressing the plurality of sub-layer tables including the target sub-layer table by using run-length coding to obtain the sub-layer table in a compression unit and/or non-coding compression format includes: determining whether the virtual addresses or the logical addresses of the data in the plurality of sub-layer tables are sequentially continuous; and a compression unit for obtaining the compression unit by performing encoding compression on the plurality of sub-layer tables when the virtual addresses or the logical addresses are consecutive. Therefore, the capacity occupied by the plurality of sub-layer tables after compression can be further ensured to be smaller than the capacity occupied before compression, so that the first cache unit can cache more sub-layer tables, the hit rate can be improved, and the system performance of the solid-state nonvolatile storage device can be improved. For example, in the case that the logical addresses and the virtual addresses of the four 32-bit sublayer tables are sequentially consecutive, for example, if the sector is 512, then 4 consecutive addresses are sequentially incremented by 512, and if the sector is 4096, then 4 consecutive addresses are sequentially incremented by 4096, and the four sublayer tables are compressed to form a compression unit, the capacity occupied by the compression unit is 64 bits, and obviously, the capacity occupied by the formed compression unit is smaller than the sum of the capacities of the four sublayer tables before compression.

In order to further ensure that the first cache unit can cache more sub-layer tables, in an embodiment of the present application, in a case that it is determined that the sub-layer table is in a non-encoded compression format, at least controlling to compress the target sub-layer table includes: controlling to perform primary compression on a plurality of the sub-layer tables including the target sub-layer table and output a primary compressed sub-layer table, in case that it is determined that the sub-layer table is in a non-encoded compression format; under the control of a compression command, controlling the secondary compression of the primary compression sublayer table; determining whether the capacity of the primary compressed sublayer table after the secondary compression is greater than a first threshold value, wherein the first threshold value is the capacity of the primary compressed sublayer table; controlling to output the primary compressed sublayer table when the capacity of the sublayer table after the secondary compression is greater than the first threshold; and controlling to output the secondary compressed sublayer table when the capacity of the sublayer table after the secondary compression is less than or equal to the first threshold, wherein the secondary compressed sublayer table is the primary compressed sublayer table after the secondary compression.

Of course, instead of compressing the target sub-layer table only when the target sub-layer table is in the non-encoded compressed format, in another embodiment of the present application, when the target sub-layer table is determined to be in the non-encoded compressed format, the method further includes: controlling to compress a plurality of the sub-layer tables including the target sub-layer table to obtain a compressed sub-layer table; determining whether a size of the compressed sublayer table is greater than a second threshold, the second threshold being a size of a plurality of the sublayer tables including the target sublayer table; controlling decompression of the compressed sublayer when the capacity of the compressed sublayer table is greater than the second threshold; and controlling to output the compressed sublayer table when the capacity of the compressed sublayer table is less than or equal to the second threshold. The method can further compress the target sublayer table, so that the storage quantity of the sublayer table in the first cache unit can be further increased, and the hit rate is further improved.

It should be noted that, the target sub-layer table in the present application may be one or more, and those skilled in the art may select one or more sub-layer tables as the target sub-layer table according to actual situations.

When a write command is received, the data in the L2P table needs to be modified. For the sub-layer table in the uncompressed format, the modification can be directly carried out after positioning, but for the sub-layer table in the compressed format, the modification cannot be directly carried out, and decompression operation needs to be carried out firstly. The decompression operation is time-consuming, and may result in an increase in the number of sub-layer tables in the first cache unit, which occupies more space. In order to further increase the hit rate, in a specific embodiment of the present application, the method further includes: receiving a write command; determining whether the sub-layer table corresponding to the write command is in a compressed format, where the compressed format is not limited to the above-mentioned encoding compressed format, but also includes any other compressed format; controlling to store the write command into a second cache unit of the solid-state nonvolatile memory device when the sub-layer table is in the compressed format; when the sum of the capacities of all the write commands in the second buffer unit is larger than a predetermined capacity, controlling the decompression of the sub-layer table of the compression format corresponding to each write command; and controlling to modify the corresponding decompressed data in each sub-layer table according to the write command.

The predetermined capacity may be any value smaller than or equal to the capacity of the second buffer unit, and in practical applications, a person skilled in the art may select an appropriate value as the predetermined capacity according to practical situations. In a specific embodiment, the predetermined capacity is equal to the maximum storage capacity of the second cache unit, which further ensures that the first cache unit can store more sublayer tables for a longer time, thereby further improving the hit rate.

In an actual application process, of course, there is also a case where the sub-layer table is not in a compressed format, in which case, the method further includes: the modification of the data of the corresponding sub-layer table according to the write command can be controlled.

In practical application, the method further includes: receiving a read command (which may be issued by a host); and if not, determining whether the corresponding sublayer table exists in the on-chip part of the first cache unit, if so, hitting, and returning a corresponding virtual address, and if not, returning failure information.

The embodiment of the present application further provides a management apparatus for data in a solid-state nonvolatile memory device, and it should be noted that the management apparatus for data in a solid-state nonvolatile memory device in the embodiment of the present application may be used to execute the management method for data in a solid-state nonvolatile memory device provided in the embodiment of the present application. The following describes a management apparatus for data in a solid-state nonvolatile memory device according to an embodiment of the present application.

Fig. 2 is a schematic diagram of an apparatus for managing data in a solid-state nonvolatile memory device according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:

a first determining unit 10, configured to determine whether a target sublayer table in the L2P table is in a first cache unit in the solid-state nonvolatile memory device, where the first cache unit is a random access memory;

a first control unit 20 configured to control the target sublayer table to be stored in the first buffer unit if the target sublayer table is not in the first buffer unit;

a second determining unit 30, configured to determine whether the target sublayer table in the first cache unit is in a coded compression format;

and a second control unit 40 configured to control at least the target sublayer table to be compressed when the target sublayer table is determined to be in a non-encoded compression format.

In the above apparatus, the first determination unit determines whether the target sublayer table in the L2P table is in the first cache unit in the solid-state nonvolatile memory device; the first control unit controls the target sublayer table to be stored in the first cache unit when the target sublayer table is not in the first cache unit; a second determining unit determines whether the target sublayer table in the first cache unit is in a coded compression format, wherein the target sublayer table determined in the second determining unit may be stored after the target sublayer table is determined not to be in the first cache unit, or may be in the first cache unit; the second control unit controls at least the target sub-layer table to be compressed when the target sub-layer table is determined to be in a non-encoded compression format. In the device, the target sublayer table in the first cache unit is ensured to be in a compressed state, so that the first cache unit can cache more sublayer tables at the same time under the same cache capacity, the hit rate can be obviously improved, and the purpose of improving the access performance of the solid-state nonvolatile storage device system is achieved.

In an actual application process, data of some sub-layer tables can obtain a high compression ratio, and the compressed data of some sub-layer tables occupy a larger storage space. In order to compress the sub-layer table reasonably, i.e. the capacity of the compressed sub-layer table is smaller than the capacity of the sub-layer table before compression, so as to further ensure that the first buffer unit can buffer more sub-layer tables, in an embodiment of the present application, the apparatus further includes a third control unit, configured to control, before storing the target sub-layer table in the first buffer unit, to compress the plurality of sub-layer tables including the target sub-layer table in a run-length coding manner, so as to obtain the sub-layer table in a compressed unit and/or a non-encoded compressed format, where the compressed unit includes the plurality of sub-layer tables in the encoded compressed format, and the sub-layer table not existing in the compressed unit is the sub-layer table in the non-encoded compressed format.

In a specific embodiment, the third control unit is further configured to: determining whether the virtual addresses or the logical addresses of the data in the plurality of sub-layer tables are sequentially continuous; and a compression unit for obtaining the compression unit by performing encoding compression on the plurality of sub-layer tables when the virtual addresses or the logical addresses are consecutive. Therefore, the capacity occupied by the plurality of sub-layer tables after compression can be further ensured to be smaller than the capacity occupied before compression, so that the first cache unit can cache more sub-layer tables, the hit rate can be improved, and the system performance of the solid-state nonvolatile storage device can be improved. For example, in the case that the logical addresses and the virtual addresses of the four 32-bit sublayer tables are sequentially consecutive, for example, if the sector is 512, then 4 consecutive addresses are sequentially incremented by 512, and if the sector is 4096, then 4 consecutive addresses are sequentially incremented by 4096, and the four sublayer tables are compressed to form a compression unit, the capacity occupied by the compression unit is 64 bits, and obviously, the capacity occupied by the formed compression unit is smaller than the sum of the capacities of the four sublayer tables before compression.

In order to further ensure that the first cache unit can cache more sub-layer tables, in an embodiment of the present application, the second control unit is further configured to: controlling to perform primary compression on a plurality of the sub-layer tables including the target sub-layer table and output a primary compressed sub-layer table, in case that it is determined that the sub-layer table is in a non-encoded compression format; under the control of a compression command, controlling the secondary compression of the primary compression sublayer table; determining whether the capacity of the primary compressed sublayer table after the secondary compression is greater than a first threshold value, wherein the first threshold value is the capacity of the primary compressed sublayer table; controlling to output the primary compressed sublayer table when the capacity of the sublayer table after the secondary compression is greater than the first threshold; and controlling to output the secondary compressed sublayer table when the capacity of the sublayer table after the secondary compression is less than or equal to the first threshold, wherein the secondary compressed sublayer table is the primary compressed sublayer table after the secondary compression.

Of course, rather than compressing the target sub-layer table only if the target sub-layer table is in a non-encoded compressed format, in another embodiment of the present application, the second control unit is further configured to: controlling to compress a plurality of the sub-layer tables including the target sub-layer table to obtain a compressed sub-layer table; determining whether a size of the compressed sublayer table is greater than a second threshold, the second threshold being a size of a plurality of the sublayer tables including the target sublayer table; controlling decompression of the compressed sublayer when the capacity of the compressed sublayer table is greater than the second threshold; and controlling to output the compressed sublayer table when the capacity of the compressed sublayer table is less than or equal to the second threshold. The device can further compress the target sublayer table, so that the storage quantity of the sublayer table in the first cache unit can be further increased, and the hit rate is further improved.

It should be noted that, the target sub-layer table in the present application may be one or more, and those skilled in the art may select one or more sub-layer tables as the target sub-layer table according to actual situations.

When a write command is received, the data in the L2P table needs to be modified. For the sub-layer table in the uncompressed format, the modification can be directly carried out after positioning, but for the sub-layer table in the compressed format, the modification cannot be directly carried out, and decompression operation needs to be carried out firstly. The decompression operation is time-consuming, and may result in an increase in the number of sub-layer tables in the first cache unit, which occupies more space. In order to improve the hit rate, in a specific embodiment of the present application, the apparatus further includes a receiving unit, a determining unit, and a fourth control unit, where the receiving unit is configured to receive a write command. The determining unit is configured to determine whether the sub-layer table corresponding to the write command is in a compressed format, where the compressed format is not limited to the above-mentioned encoding compressed format, and may also include any other compressed format. The fourth control unit is configured to: controlling to store the write command into a second cache unit of the solid-state nonvolatile memory device when the sub-layer table is in the compressed format; when the sum of the capacities of all the write commands in the second buffer unit is larger than a predetermined capacity, controlling the decompression of the sub-layer table of the compression format corresponding to each write command; and controlling to modify the corresponding decompressed data in each sub-layer table according to the write command.

The predetermined capacity may be any value smaller than or equal to the capacity of the second buffer unit, and in practical applications, a person skilled in the art may select an appropriate value as the predetermined capacity according to practical situations. In a specific embodiment, the predetermined capacity is equal to the maximum storage capacity of the second cache unit, which further ensures that the first cache unit can store more sublayer tables for a longer time, thereby further improving the hit rate.

In an actual application process, of course, there is a case that the sub-layer table is not in a compressed format, in which case, the apparatus further includes a fifth control unit, configured to control, when the sub-layer table is not in the compressed format, to modify data of the corresponding sub-layer table according to the write command.

In an actual application process, the device is further configured to perform: receiving a read command (which may be issued by a host); and if not, determining whether the corresponding sublayer table exists in the on-chip part of the first cache unit, if so, hitting, and returning a corresponding virtual address, and if not, returning failure information.

The management device of the data in the solid-state nonvolatile storage device comprises a processor and a memory, wherein the first determining unit, the second determining unit, the first control unit, the second control unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.

The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the solid-state nonvolatile storage device is ensured to have better access performance under the condition of ensuring that the RAM expense is smaller by adjusting kernel parameters.

The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.

An embodiment of the present invention provides a storage medium on which a program is stored, which when executed by a processor implements the method for managing data in the solid-state nonvolatile memory device described above.

The embodiment of the invention provides a processor, wherein the processor is used for running a program, and the program executes a management method of data in the solid-state nonvolatile storage device when running.

The embodiment of the invention provides a solid-state nonvolatile storage device, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor at least realizes the following steps when executing the program:

step S101, determining whether a target sub-layer table in an L2P table is in a first cache unit in a solid-state nonvolatile storage device, wherein the first cache unit is a random access memory;

step S102, controlling to store the target sublayer table into the first cache unit when the target sublayer table is not in the first cache unit;

step S103, determining whether the target sublayer table in the first cache unit is in a coding compression format;

and step S104, controlling to compress at least the target sub-layer table under the condition that the target sub-layer table is determined to be in a non-coding compression format.

The present application further provides a computer program product adapted to perform a program of initializing at least the following method steps when executed on a data processing device:

step S101, determining whether a target sub-layer table in an L2P table is in a first cache unit in a solid-state nonvolatile storage device, wherein the first cache unit is a random access memory;

step S102, controlling to store the target sublayer table into the first cache unit when the target sublayer table is not in the first cache unit;

step S103, determining whether the target sublayer table in the first cache unit is in a coding compression format;

and step S104, controlling to compress at least the target sub-layer table under the condition that the target sub-layer table is determined to be in a non-coding compression format.

In practical applications, as shown in fig. 3, the solid-state nonvolatile memory device 200 further includes: the management apparatus 110 may communicate with the firmware operation interface 60, the first cache unit, the second cache unit, and the compression/decompression unit 90, so as to execute corresponding steps, where the request input interface 50, the firmware operation interface 60, the result return interface 70, the read/write interface 80, the compression/decompression unit 90, and the cache management module 100 (including the first cache unit and the second cache unit).

The FW controls various operations of the present module through the FW operation interface, for example, start initialization, start a merge operation for a specific sublayer table, monitor a hardware operation state, and the like.

The large batch of LBA request information enters through the request input interface, and the read command only has LBA (logical address) information and no VBA (virtual address) information. The write command contains LBA and VBA information pairs. For the read command, the main control logic finds out corresponding VBA information through searching, and fills a result return interface; for the write command, the (LBA, VBA) information is temporarily stored in the first buffer unit.

The solid-state nonvolatile memory device includes at least one of a solid-state hard disk, a Universal Flash Storage (UFS), an embedded multimedia memory Card (eMMC), and a usb disk.

Of course, in practical applications, the storage device is not limited to the specific storage device, and the solid-state nonvolatile storage device may also include other corresponding devices.

In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.

From the above description, it can be seen that the above-described embodiments of the present application achieve the following technical effects:

1) in the management method, firstly, whether a target sub-layer table in an L2P table is in a first cache unit in a solid-state nonvolatile storage device is determined; controlling to store the target sublayer table in the first cache unit if the target sublayer table is not in the first cache unit; determining whether the target sublayer table in the first cache unit is in a coded compression format, where the target sublayer table in this step may be stored after determining that the target sublayer table is not in the first cache unit, or may be in the first cache unit itself; and controlling to compress at least the target sub-layer table when the target sub-layer table is determined to be in a non-coding compression format. According to the method, the target sub-layer table in the first cache unit is ensured to be in a compressed state, so that the first cache unit can cache more sub-layer tables at the same time under the same cache capacity, the hit rate can be obviously improved, and the purpose of improving the access performance of the solid-state nonvolatile storage device system is achieved.

2) In the management apparatus of the present application, a first determination unit determines whether a target sublayer table in an L2P table is in a first cache unit in a solid-state nonvolatile storage device; the first control unit controls the target sublayer table to be stored in the first cache unit when the target sublayer table is not in the first cache unit; a second determining unit determines whether the target sublayer table in the first cache unit is in a coded compression format, wherein the target sublayer table determined in the second determining unit may be stored after the target sublayer table is determined not to be in the first cache unit, or may be in the first cache unit; the second control unit controls at least the target sub-layer table to be compressed when the target sub-layer table is determined to be in a non-encoded compression format. In the device, the target sublayer table in the first cache unit is ensured to be in a compressed state, so that the first cache unit can cache more sublayer tables at the same time under the same cache capacity, the hit rate can be obviously improved, and the purpose of improving the access performance of the solid-state nonvolatile storage device system is achieved.

The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:缓存管理方法、装置、存储介质和固态非易失存储设备

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类