Address mapping table manager, address mapping table management method, and computer device

By expanding the hardware of the address mapping table manager, and utilizing the table processor, offset calculator, and heat manager, the problem of high computing power and power consumption in address mapping table management in solid-state drives is solved. This enables efficient address heat statistics and data hot and cold management, and optimizes resource utilization and wear leveling.

CN119807086BActive Publication Date: 2026-05-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2024-12-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, address mapping table management for solid-state drives still consumes a significant amount of computing power and power from the central processing unit core, especially in address heat statistics and data hot/cold management.

Method used

An address mapping table manager, including a table processor, offset calculator, and heat manager, is used to implement address heat statistics and data hot/cold management through hardware, thereby reducing the computing power and power consumption of the central processing unit core.

Benefits of technology

It achieves accuracy and resource utilization optimization when modifying the address mapping table, reduces the computing power and power consumption of the central processing unit core, and optimizes the wear leveling of data blocks on the solid-state drive.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807086B_ABST
    Figure CN119807086B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computers and discloses an address mapping table manager, an address mapping table management method and a computer device.The address mapping table manager comprises a table changing processor, a displacement calculator and a heat manager.The table changing processor is used for receiving a table changing command, acquiring a comparison address and a logical address in the table changing command, determining the source of the table changing command based on the comparison address, and sending the logical address to the displacement calculator if the source is a host.The displacement calculator is used for determining a target partition based on the logical address and a preset partition granularity, and sending the target partition to the heat manager.The heat manager is used for determining a first destination address based on the target partition and a start address of a heat histogram, increasing the heat of a corresponding partition of the heat histogram based on the first destination address, acquiring the heat of each partition in the heat histogram every interval of a preset time period, and determining a hot area and a cold area based on the heat of each partition.The application reduces the computing power and power consumption of a processor core.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to an address mapping table manager, an address mapping table management method, and a computer device. Background Technology

[0002] Solid-state drives (SSDs) require a mapping between the physical addresses of their internal NAND flash memory and the logical addresses of the host computer. To achieve efficient read and write operations, SSDs need to maintain an address mapping table that records the correspondence between logical and physical addresses. However, the maintenance and management of this address mapping table has a significant impact on the performance and power consumption of the SSD.

[0003] In related technologies, SSDs typically use hardware to manage the address mapping table to reduce the computational power consumption of the central processing unit (CPU) cores. To further reduce the CPU core's computational power consumption, hardware is used to uniformly manage the address mapping table and the number of valid data fragments (VDFC) in data blocks.

[0004] However, although hardware-managed address mapping tables and VDFC have improved the performance and power consumption of the CPU core, address hot statistics and data hot and cold management are still computationally intensive processes, and the CPU core still consumes a lot of computing power and power when performing these processes. Summary of the Invention

[0005] In view of this, the present invention provides an address mapping table manager to solve the problem that address hotness statistics and data hot / cold management are still computationally intensive processes, and the central processing unit core still consumes a lot of computing power and power when performing these processes.

[0006] In a first aspect, the present invention provides an address mapping table manager, the address mapping table manager comprising:

[0007] A table modification processor is used to receive a table modification command, obtain the comparison address and logical address in the table modification command, determine the source of the table modification command based on the comparison address, and send the logical address to the offset calculator if the source of the table modification command is a host.

[0008] Offset calculator, used to receive the logical address, determine the target partition based on the logical address and preset partition granularity, and send the target partition to the heat manager;

[0009] A heat manager is used to receive the target partition, determine a first destination address based on the target partition and the starting address of the heat histogram, increase the heat of the corresponding partition in the heat histogram based on the first destination address, obtain the heat of each partition in the heat histogram at preset time intervals, and determine hot and cold zones based on the heat of each partition.

[0010] The address mapping table manager provided in this embodiment expands upon existing address mapping table managers in related technologies. When modifying the address mapping table using a table modification processor, if the source of the modification command is a host, an offset calculator determines the target partition based on the logical address and preset partition granularity in the modification command. The target partition is then sent to a heat manager. The heat manager increases the heat of the corresponding partition in the heat histogram based on the target partition and the starting address of the heat histogram. At preset time intervals, the heat of each partition in the heat histogram is obtained, and hot and cold zones are determined based on the heat of each partition. This achieves hardware-based address heat statistics and data hot / cold management, reducing the computing power and power consumption of the central processing unit core.

[0011] In one optional implementation, the modified table processor is specifically used for:

[0012] If the comparison address is a preset value, the source of the table modification command is determined to be a host;

[0013] If the comparison address is not a preset value, it is determined that the source of the table modification command is not a host.

[0014] The address mapping table manager provided in this embodiment can accurately determine the source of the table modification command by checking and comparing whether the address is a preset value, thereby achieving accurate modification of the address mapping table.

[0015] In one alternative implementation, the address mapping table manager further includes a mask calculator and a valid data frame processor;

[0016] The table modification processor is also used to obtain the physical address in the table modification command. When the source of the table modification command is a host, it determines the second destination address based on the starting address of the address mapping table and the logical address, and writes the physical address into the address mapping table based on the second destination address.

[0017] The table modification processor is further configured to, when the source of the table modification command is not a host, obtain the original physical address corresponding to the logical address from the address mapping table based on the second destination address, compare the original physical address with the comparison address to obtain a comparison result, and if the comparison result is a successful comparison, write the physical address into the address mapping table based on the second destination address; and if the comparison result is a failed comparison, generate a first scrap request based on the physical address and send the first scrap request to the mask calculator.

[0018] The mask calculator is used to receive the first scrap request, obtain the physical address in the first scrap request, determine the first target data block based on the data block mask and the physical address, and send the first target data block to the valid data frame processor.

[0019] The valid data frame processor is used to receive the first target data block, determine the third destination address based on the starting address of the valid data frame processing table and the first target data block, and reduce the valid data frame count value of the data block corresponding to the third destination address.

[0020] The address mapping table manager provided in this embodiment ensures the accuracy of the table and the security of the data by generating a first discard request when the comparison between the original physical address and the comparison address fails. When the table processor sends a discard request, the number of valid data frames in the data block is reduced using a mask calculator and a valid data frame processor, effectively reclaiming invalid data frames, optimizing resource utilization, and avoiding memory waste.

[0021] In an optional implementation, the modified table processor is further configured to, after writing the physical address into the address mapping table, determine the type of the original physical address based on the original physical address and the memory mask, and if the type of the original physical address is a flash physical address, generate a second scrap request based on the original physical address and send the second scrap request to the mask calculator.

[0022] The mask calculator is also used to receive the second scrap request, obtain the original physical address in the second scrap request, determine the second target data block based on the data block mask and the original physical address, and send the second target data block to the valid data frame processor.

[0023] The valid data frame processor is used to receive the second target data block, determine the fourth destination address based on the starting address of the valid data frame processing table and the second target data block, and reduce the valid data frame count value of the data block corresponding to the fourth destination address.

[0024] The address mapping table manager provided in this embodiment processes the second discard request jointly through a mask calculator and a valid data frame processor. It determines the second target data block using the data block mask and the original physical address, and reduces the number of valid data frames for the corresponding data block. This effectively reclaims unused flash memory data blocks, optimizes storage resource management, and avoids resource waste.

[0025] In one alternative implementation, the heat manager is specifically used for:

[0026] The partitions are sorted from highest to lowest popularity to obtain the sorting results;

[0027] Based on the sorting results, the heat difference between adjacent sorted partitions is determined;

[0028] If the heat difference is greater than the average heat difference, the two partitions corresponding to the heat difference are determined as the target partition combination;

[0029] Based on the target partition combination, determine the hot and cold segmentation zones;

[0030] For any given partition, if the partition is ranked higher than the hot / cold partition ranking, the partition is determined to be a hot partition.

[0031] If the ranking of the partition is not higher than the ranking of the hot and cold partitions, the partition is determined to be a cold partition.

[0032] The address mapping table manager provided in this embodiment determines the heat difference between adjacent partitions based on the sorting results, and determines the target partition combination when the heat difference is greater than the average heat difference. This accurately divides cold and hot zones, so that when the system performs data block reclamation, it can reclaim data from hot zones to data blocks with lower erase counts, and reclaim data from cold zones to data blocks with higher erase counts, thereby achieving wear leveling of solid-state drive data blocks.

[0033] In one alternative implementation, the heat manager is further configured to:

[0034] The average difference in heat intensity is determined using the following formula:

[0035] (heat_max–heat_min) / (column_num–1)

[0036] Where heat_max is the heat of the partition with the highest ranking, heat_min is the heat of the partition with the lowest ranking, and column_num is the total number of partitions.

[0037] The address mapping table manager provided in this embodiment determines the average heat difference. When the heat difference is greater than the average heat difference, it determines the target partition combination. Then, it accurately divides cold and hot areas through the target partition combination. This allows the system to reclaim data blocks during data block reclamation based on the heat of different areas. Data blocks belonging to hot areas are reclaimed to data blocks with fewer erase cycles, while data blocks belonging to cold areas are reclaimed to data blocks with more erase cycles, thus achieving wear leveling of solid-state drive data blocks.

[0038] In one alternative implementation, the heat manager is specifically used for:

[0039] The target partition combinations are sorted from highest to lowest popularity.

[0040] Select the target partition combination that is in the middle position from the sorting results of the target partition combination;

[0041] The target partition with the lowest ranking among the proposed target partition combinations is determined as the hot and cold segmentation area.

[0042] The address mapping table manager provided in this embodiment filters out the target partition combination in the middle position from the sorting results of the target partition combination, and determines the target partition with the lowest sorting in the target partition combination as the cold and hot partition. This enables the heat manager to determine the cold and hot partition more accurately, thereby achieving the accuracy of the determined cold and hot areas.

[0043] In a second aspect, the present invention provides an address mapping table management method, applied to an address mapping table manager of the first aspect above or any corresponding embodiment thereof, the method comprising:

[0044] Based on the table modification processor, a table modification command is received, the comparison address and logical address in the table modification command are obtained, the source of the table modification command is determined based on the comparison address, and if the source of the table modification command is a host, the logical address is sent to the offset calculator.

[0045] Based on the offset calculator, the logical address is received, and based on the logical address and the preset partition granularity, the target partition is determined and sent to the heat manager;

[0046] Based on the heat manager, the target partition is received. Based on the target partition and the starting address of the heat histogram, a first destination address is determined. Based on the first destination address, the heat of the corresponding partition in the heat histogram is increased. At preset time intervals, the heat of each partition in the heat histogram is obtained. Based on the heat of each partition, hot zones and cold zones are determined.

[0047] The address mapping table management method provided in this embodiment expands the address mapping table manager in related technologies. When modifying the address mapping table using the table modification processor, if the source of the table modification command is the host, the offset calculator and the heat manager are used to realize the hot statistics of the address and the hot and cold management of the data, thereby reducing the computing power and power consumption of the processor core.

[0048] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the address mapping table management method of the second aspect above by executing the computer instructions.

[0049] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the address mapping table management method of the second aspect described above.

[0050] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the address mapping table management method described in the second aspect above. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of the present invention, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0052] Figure 1 This is a structural block diagram of an address mapping table manager according to an embodiment of the present invention;

[0053] Figure 2 This is a structural block diagram of another address mapping table manager according to an embodiment of the present invention;

[0054] Figure 3 This is a flowchart illustrating the address mapping table management method according to an embodiment of the present invention;

[0055] Figure 4 This is a flowchart illustrating another address mapping table management method according to an embodiment of the present invention;

[0056] Figure 5 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] The physical characteristics of solid-state drives (SSDs) require that the physical addresses of their internal NAND flash memory cannot be directly mapped to the logical addresses of the host. To accommodate the host's read and write needs, SSDs need to maintain an address mapping table. This table records the correspondence between logical addresses and physical addresses, enabling fast data read and write operations. The addresses provided by the host are logical addresses, while the addresses of the NAND flash memory within the SSD are physical addresses.

[0059] In related technologies, address mapping tables occupy a large amount of space, and SSDs operate on them very frequently. If the CPU core operates directly on these tables, the address mapping table is difficult to cache, and using the cache to map the address mapping table would consume too much of the chip's bus bandwidth. If the memory containing the address mapping table is set to non-cached memory, the core will directly access the memory, which will consume a lot of time and affect the core's computing power and power consumption.

[0060] To reduce core computational power and power consumption, SSD technologies tend to use hardware to manage the address mapping table. Since register operations are highly efficient, they do not consume core computational power, and hardware memory operations can also reduce core power consumption. Initially, general-purpose memory operation hardware was used to modify the address mapping table and VDFC. However, due to the strong correlation between the address mapping table and VDFC, the management method was relatively fixed. Gradually, the technology evolved to utilize unified, automatic hardware management of the address mapping table and VDFC. This means that a single instruction simultaneously operates on the source address, destination address, and VDFC, significantly reducing core involvement, saving core computational power, and lowering core power consumption.

[0061] However, despite improvements in core performance and power consumption brought about by hardware-managed address mapping tables and VDFC, read counts and hot / cold data management remain the most computationally intensive aspects of core operation. Read counts can be quantified through address popularity statistics.

[0062] To achieve wear leveling of data blocks on a solid-state drive (SSD), data hotness / coldness management is required. Histogram management divides logical addresses into multiple partitions. Whenever the host operates on data, the core needs to calculate the host's operating area and, either manually or by calling general hardware tools, determine the hotness / coldness of each partition. Then, based on the current partition's hotness / coldness and the total number of SSD operations, it determines the hotness / coldness of the currently operating logical address. This series of operations requires frequent context switching, which not only consumes the core's computing power but also increases its power consumption.

[0063] It is evident that the core still consumes relatively high computing power and power consumption when performing tasks such as address heat statistics and data hot / cold management.

[0064] This invention provides an address mapping table manager. By expanding upon the address mapping table manager in related technologies, when modifying the address mapping table using a table modification processor, if the source of the modification command is a host, an offset calculator determines the target partition based on the logical address and preset partition granularity in the modification command. The target partition is then sent to a heat manager. The heat manager increases the heat of the corresponding partition in the heat histogram based on the target partition and the starting address of the heat histogram. At preset time intervals, the heat of each partition in the heat histogram is obtained. Based on the heat of each partition, hot and cold zones are determined. This achieves the effect of using hardware to implement address heat statistics and data hot / cold management, reducing the computing power and power consumption of the central processing unit core.

[0065] It should be noted that the address heat statistics and data hot / cold management operations are very fixed. They are synchronized using the address mapping table manager. When the address mapping table needs to be modified, the partition heat is also counted and calculated based on the heat threshold set by the user. The output result is the hot / cold degree of the partition, which provides a basis for the wear leveling of data blocks on the solid-state drive. It consumes very little core power, saving core participation and computing power.

[0066] This embodiment provides an address mapping table manager. Figure 1 This is a structural block diagram of the address mapping table manager according to an embodiment of the present invention, such as... Figure 1 As shown, the address mapping table manager includes: a table processor 101, an offset calculator 102, and a heat manager 103.

[0067] The table modification processor 101 is used to receive table modification commands, obtain the comparison address and logical address in the table modification command, determine the source of the table modification command based on the comparison address, and send the logical address to the offset calculator if the source of the table modification command is a host.

[0068] When enabling the address mapping table manager, the starting address of the address mapping table (the base address of the address mapping table) and the starting address of the heat histogram (the base address of the heat histogram) need to be configured in advance. Then, the address mapping table manager can be enabled, and it can accept commands from software or other hardware to manage the address mapping table.

[0069] It should be noted that the starting address of the address mapping table and the starting address of the heat histogram exist as registers in the address mapping table manager. The register corresponding to the starting address of the address mapping table is used to calculate the offset based on the starting address of the address mapping table in memory, i.e., the starting address of the address mapping table, after receiving a table modification command, and then modify the memory, which is to say, modify the address mapping table.

[0070] The register corresponding to the starting address of the heat histogram is used to complete granular calculations and determine the target partition when processing each table modification command issued by the host. The heat histogram is offset based on the starting address in memory, and the heat of the corresponding partition is increased.

[0071] Offset calculator 102 is used to receive logical addresses, determine the target partition based on the logical address and preset partition granularity, and send the target partition to the heat manager.

[0072] The address mapping table manager includes a granularity selection register, which contains preset partition granularity values. Users can set the specific number of addresses used as a partition according to their needs. The granularity selection register is set to the logical address right shift number; that is, in response to user operations, the partition granularity is set in the granularity selection register. For example, 2.5% of the entire SSD space can be partitioned as a granularity.

[0073] When the source of the table modification command is the host, the offset calculator uses the logical address in the table modification command to divide the preset partition granularity obtained from the granularity selection register to obtain the target partition.

[0074] In other words, the offset calculator calculates the target partition where the logical address is located based on the logical address sent by the host and the granularity configured by the user, and then sends the target partition to the heat manager.

[0075] The heat manager 103 is used to receive the target partition, determine the first destination address based on the target partition and the starting address of the heat histogram, increase the heat of the corresponding partition in the heat histogram based on the first destination address, obtain the heat of each partition in the heat histogram at preset time intervals, and determine the hot zone and cold zone based on the heat of each partition.

[0076] Specifically, the heat manager calculates the sum of the starting address of the target partition and the heat histogram, and determines it as the first destination address. Based on the first destination address, the heat of the corresponding partition of the heat histogram corresponding to the first destination address, i.e., the heat of the target partition, is increased, that is, the heat of the corresponding partition of the heat histogram is incremented by 1.

[0077] It is understandable that the initial heat values ​​of multiple partitions in the heat histogram are 0. The preset time period is pre-set by technical personnel and is not specifically limited here.

[0078] The address mapping table manager provided in this embodiment expands upon existing address mapping table managers in related technologies. When modifying the address mapping table using a table modification processor, if the source of the modification command is a host, an offset calculator determines the target partition based on the logical address and preset partition granularity in the modification command. The target partition is then sent to a heat manager. The heat manager increases the heat of the corresponding partition in the heat histogram based on the target partition and the starting address of the heat histogram. At preset time intervals, the heat of each partition in the heat histogram is obtained, and hot and cold zones are determined based on the heat of each partition. This achieves hardware-based address heat statistics and data hot / cold management, reducing the computing power and power consumption of the central processing unit core.

[0079] This embodiment provides an address mapping table manager. Figure 2 This is a structural block diagram of the address mapping table manager according to an embodiment of the present invention, such as... Figure 2 As shown, the address mapping table manager includes: table processor 201, offset calculator 202, and heat manager 203.

[0080] The table modification processor 201 is used to receive table modification commands, obtain the comparison address and logical address in the table modification command, determine the source of the table modification command based on the comparison address, and send the logical address to the offset calculator if the source of the table modification command is a host.

[0081] Specifically, the modified table processor 201 is used for:

[0082] If the comparison address is the default value, the source of the table modification command is determined to be the host.

[0083] The default value is 0. When the comparison address is 0, it is determined that the source of the table modification command is the host. There is no need to compare the original physical address corresponding to the logical address with the comparison address; the address mapping table can be modified directly.

[0084] Understandably, when processing commands from the host, the comparison address in this table command is set to 0.

[0085] If the comparison address is not the default value, it is determined that the source of the table modification command is not the host.

[0086] If the comparison address is not 0, it is determined that the source of the table modification command is not the host. The original physical address corresponding to the logical address needs to be compared with the comparison address to determine whether the address mapping table can be modified.

[0087] Offset calculator 202 receives the logical address, determines the target partition based on the logical address and preset partition granularity, and sends the target partition to the heat manager. For details, please refer to [link to details]. Figure 1 The description of the offset calculator 102 in the illustrated embodiment will not be repeated here.

[0088] The heat manager 203 receives the target partition, determines the first destination address based on the target partition and the starting address of the heat histogram, and increases the heat of the corresponding partition in the heat histogram based on the first destination address. At preset time intervals, it acquires the heat of each partition in the heat histogram and determines hot and cold zones based on the heat of each partition. For details, please refer to [link to details]. Figure 1 The description of the heat manager 103 in the illustrated embodiment will not be repeated here.

[0089] like Figure 2 As shown, the address mapping table manager also includes a mask calculator 204 and a valid data frame processor 205.

[0090] The table modification processor 201 is also used to obtain the physical address in the table modification command. When the source of the table modification command is a host, it determines the second destination address based on the starting address and logical address of the address mapping table, and writes the physical address into the address mapping table based on the second destination address.

[0091] When the source of the table modification command is a host, the sum of the starting address of the address mapping table and the logical address in the table modification command is calculated to determine the second destination address. Based on the second destination address, the physical address is written into the address mapping table, thus completing the modification of the physical address corresponding to the logical address in the address mapping table.

[0092] The table modification processor 201 is also used to, when the source of the table modification command is not the host, obtain the original physical address corresponding to the logical address from the address mapping table based on the second destination address, compare the original physical address with the comparison address, obtain the comparison result, and if the comparison result is successful, write the physical address into the address mapping table based on the second destination address; if the comparison result is unsuccessful, generate a first scrap request based on the physical address and send the first scrap request to the mask calculator.

[0093] In cases where the source of the table modification command is not the host, the comparison address in the table modification command is the old physical address corresponding to the logical address in the table modification command. It should be noted that if the physical address of the table modification command is a NAND physical address, the comparison address can be either a memory physical address or an old NAND physical address.

[0094] If the comparison between the original physical address and the comparison address fails, the physical address in the current table modification command is determined to be invalid. Based on the physical address, a first obsolete request is generated and sent to the mask calculator.

[0095] The mask calculator 204 is used to receive the first discard request, obtain the physical address in the first discard request, determine the first target data block based on the data block mask and the physical address, and send the first target data block to the valid data frame processor.

[0096] It should be noted that the data block mask exists in the form of a register in the address mapping table manager. When the address mapping table manager is enabled, the mask bits of the data block in the address translation need to be set in advance, that is, the data block mask needs to be set and saved to the register.

[0097] Understandably, the physical address of data on NAND flash memory consists of LUNs, blocks, pages, and data frames. The region where a block is located may differ across different schemes, and VDFC needs to perform calculations on a block-by-block basis, thus requiring the marking of a block mask. A block is the smallest erase unit in flash memory, and each block includes multiple data frames. A data frame is the smallest data unit in an SSD; typically, each address corresponds to one data frame, with a sector size of 512. The SSD automatically groups these data frames into a single data frame.

[0098] The mask calculator, after obtaining the physical address in the first scrap request, determines the first target data block based on the data block mask in the register and the obtained physical address.

[0099] Specifically, a bitwise AND operation is performed on the data block mask and the physical address to obtain the first target data block.

[0100] The valid data frame processor 205 is used to receive the first target data block, determine the third destination address based on the starting address of the valid data frame processing table and the first target data block, and reduce the valid data frame count value of the data block corresponding to the third destination address.

[0101] The starting address of the valid data frame processing table (VDFC table) (VDFC table base address) exists as a register in the address mapping table manager. When the address mapping table is enabled, the starting address of the valid data frame processing table (VDFC table), i.e. the starting address of the VDFC table in memory, needs to be configured in advance.

[0102] The starting address of the valid data frame processing table is added to the first destination data block to obtain the third destination address. The number of valid data frames corresponding to the third destination address is then reduced by 1.

[0103] Understandably, the register corresponding to the starting address of the valid data frame processing table is used to calculate which address needs to be decremented (decimated by 1) based on the starting address of the valid data frame processing table and the specific block offset.

[0104] It should be noted that after identifying hot and cold sectors, in order to achieve wear leveling of data blocks on the solid-state drive, garbage collection (GC) is performed when there are few free blocks (i.e., blocks without data), specifically when the number of free blocks falls below a preset threshold. Specifically, used blocks that have been filled and whose VDFC (Virtual Data Capacity) is below a preset VDFC threshold are reclaimed.

[0105] Garbage collection occurs when the difference in program / erase count (PE) between any two data blocks exceeds a first threshold. Specifically, data blocks with a PE value lower than a preset threshold are collected for garbage collection. It's important to note that each block records the total amount of data written to the SSD at the time it is written, in units of one block. This indicates how many blocks of data, including GC data, were written to the entire disk when that block was completed. This data is used to limit the number of times a block is reclaimed, preventing it from being reclaimed again within a short period. Specifically, if the difference in program / erase counts (PE) between any two data blocks exceeds a first difference threshold, for any block, if the number of erases for that block is less than a preset erase count threshold, then it is determined whether the difference between the total data write volume of the SSD when the block was written and the current lifespan of the SSD exceeds a second difference threshold. If the difference exceeds the second difference threshold, then the block is determined to be reclaimed. If the difference does not exceed the second difference threshold, then the block is determined not to be reclaimed.

[0106] The preset quantity threshold, preset VDFC threshold, first difference threshold, second difference threshold, and preset erase count threshold are set by technical personnel.

[0107] If the reclaimed data block is a hot data block, then the free data block with the lowest PE value is selected, and the data in the reclaimed data block is written into the free data block with the lowest PE value.

[0108] If the reclaimed data block is a cold data block, then select the free data block with the highest PE value and write the data from the reclaimed data block into that free data block with the highest PE value.

[0109] The address mapping table manager provided in this embodiment can accurately determine the source of the table modification command by checking and comparing whether the address is a preset value, thereby achieving accurate modification of the address mapping table.

[0110] The address mapping table manager provided in this embodiment ensures the accuracy of the table and the security of the data by generating a first discard request when the comparison between the original physical address and the comparison address fails. When the table processor sends a discard request, the number of valid data frames in the data block is reduced using a mask calculator and a valid data frame processor, effectively reclaiming invalid data frames, optimizing resource utilization, and avoiding memory waste.

[0111] In some optional implementations, the table processor 201 is further configured to, after writing the physical address into the address mapping table, determine the type of the original physical address based on the original physical address and the memory mask, and if the type of the original physical address is a flash physical address, generate a second scrap request based on the original physical address and send the second scrap request to the mask calculator.

[0112] The memory mask exists as a register in the address mapping table manager. When a write command is issued, data needs to be moved from the host to memory. At this time, the physical address needs to be changed to the memory physical address, and then changed back to the NAND physical address after the data is written to the NAND. Therefore, the user needs to set the memory mask so that the address mapping manager can determine whether the physical address is a memory physical address or a NAND physical address, and thus determine how to operate on the VDFC table.

[0113] After writing the physical address of the table modification command into the address mapping table, the system determines whether the original physical address is a flash memory physical address (NAND physical address) or a memory physical address based on the original physical address corresponding to the logical address of the table modification command and the memory mask. Specifically, a bitwise AND operation is performed on the original physical address and the memory mask to obtain the result. If the result is all 1s, the original physical address is determined to be a memory physical address; otherwise, the result is not all 1s, and the original physical address is determined to be a NAND physical address.

[0114] It should be noted that after the table modification, data whose original physical address is a NAND physical address is generally GC data or data being modified for the table in memory. This requires performing a VDFC decrement operation on the block corresponding to the original physical address in the address mapping table. In this embodiment, the memory mentioned is generally Double Data Rate (DDR) memory.

[0115] The mask calculator 204 is also used to receive a second scrap request, obtain the original physical address in the second scrap request, determine the second target data block based on the data block mask and the original physical address, and send the second target data block to the valid data frame processor.

[0116] Specifically, the mask calculator obtains the original physical address from the second discard request, performs an AND operation between the original physical address and the data block mask to obtain the second target data block, and sends the second target data block to the valid data frame processor.

[0117] The valid data frame processor 205 is used to receive the second target data block, determine the fourth destination address based on the starting address of the valid data frame processing table and the second target data block, and reduce the valid data frame count value of the data block corresponding to the fourth destination address.

[0118] The valid data frame processor adds the starting address of the valid data frame processing table to the second destination data block to determine the fourth destination address, and decrements the number of valid data frames in the data block corresponding to the fourth destination address by 1.

[0119] The address mapping table manager provided in this embodiment processes the second discard request jointly through a mask calculator and a valid data frame processor. It determines the second target data block using the data block mask and the original physical address, and reduces the number of valid data frames for the corresponding data block. This effectively reclaims unused flash memory data blocks, optimizes storage resource management, and avoids resource waste.

[0120] In some alternative implementations, the heat manager 203 is specifically used for:

[0121] The partitions are sorted from highest to lowest popularity to obtain the sorting results.

[0122] Based on the sorting results, determine the heat difference between adjacent sorted partitions.

[0123] If the difference in heat intensity is greater than the average difference in heat intensity, the two partitions corresponding to the difference in heat intensity are determined as the target partition combination.

[0124] Based on the target partition combination, the hot and cold partition zones are determined.

[0125] For any given partition, if the partition is ranked higher than the ranking of the hot and cold partitions, the partition is determined to be a hot partition.

[0126] If the partition's sorting order is not higher than the sorting order of the hot and cold partitions, the partition is determined to be a cold partition.

[0127] After obtaining the sorting results of multiple partitions, the heat difference between every two adjacent partitions is determined. For example, if there are ten partitions, the heat difference between every two adjacent partitions is obtained, that is, nine heat differences are obtained.

[0128] If any difference in popularity is greater than the average difference in popularity, the two partitions corresponding to that difference in popularity are determined as the target partition combination. For example, if the difference in popularity between the third-ranked partition and the fourth-ranked partition is greater than the average difference in popularity, then the third-ranked partition and the fourth-ranked partition are determined as the target partition combination.

[0129] The address mapping table manager provided in this embodiment determines the heat difference between adjacent partitions based on the sorting results, and determines the target partition combination when the heat difference is greater than the average heat difference. This accurately divides cold and hot zones, so that when the system performs data block reclamation, it can reclaim data from hot zones to data blocks with lower erase counts, and reclaim data from cold zones to data blocks with higher erase counts, thereby achieving wear leveling of solid-state drive data blocks.

[0130] In some alternative implementations, the heat manager 203 is also used for:

[0131] The average difference in heat intensity is determined using the following formula:

[0132] (heat_max–heat_min) / (column_num–1)

[0133] Where heat_max is the heat of the partition with the highest ranking, heat_min is the heat of the partition with the lowest ranking, and column_num is the total number of partitions.

[0134] The address mapping table manager provided in this embodiment determines the average heat difference. When the heat difference is greater than the average heat difference, it determines the target partition combination. Then, it accurately divides cold and hot areas through the target partition combination. This allows the system to reclaim data blocks during data block reclamation based on the heat of different areas. Data blocks belonging to hot areas are reclaimed to data blocks with fewer erase cycles, while data blocks belonging to cold areas are reclaimed to data blocks with more erase cycles, thus achieving wear leveling of solid-state drive data blocks.

[0135] In some alternative implementations, the heat manager 203 is specifically used for:

[0136] The target partition combinations are sorted from highest to lowest popularity.

[0137] Select the target partition combination that is in the middle position from the sorted results of the target partition combinations.

[0138] The target partition with the lowest ranking among the pending target partition combinations is determined as the hot / cold partition.

[0139] It should be noted that if the number of target partition combinations is odd, the target partition combination located in the middle position of the sorting result is the undetermined target partition combination.

[0140] If the number of target partition combinations is even, then a candidate target partition combination will be randomly selected from the two target partition combinations that are in the middle of the sorted results.

[0141] Alternatively, if the number of target partition combinations is even, select the two target partition combinations in the middle position from the sorting results of the target partition combinations, and determine the target partition combination with lower popularity among the two target partition combinations in the middle position as the undetermined target partition combination.

[0142] Alternatively, if the number of target partition combinations is even, select the two target partition combinations in the middle position from the sorting results of the target partition combinations, and determine the target partition combination with higher popularity among the two target partition combinations in the middle position as the undetermined target partition combination.

[0143] The address mapping table manager provided in this embodiment filters out the target partition combination in the middle position from the sorting results of the target partition combination, and determines the target partition with the lowest sorting in the target partition combination as the cold and hot partition. This enables the heat manager to determine the cold and hot partition more accurately, thereby achieving the accuracy of the determined cold and hot areas.

[0144] In some alternative implementations, the heat manager 203 is specifically used for:

[0145] Determine the threshold number of partitions based on the number of partitions.

[0146] For example, 25% of the number of partitions is the threshold for the number of partitions.

[0147] It is understood that the above is merely an illustrative example, and users can determine the threshold for the number of partitions based on the actual needs of the users.

[0148] For any given partition, if the sorting result is within the top number threshold, that partition is determined to be a hot zone.

[0149] If the sorting result is not located at the first quantity threshold, the partition is determined to be a cold zone.

[0150] The address mapping table manager provided in this embodiment determines the number of partitions based on the number of partitions, thereby identifying hot and cold zones, offering high flexibility.

[0151] According to an embodiment of the present invention, an embodiment of an address mapping table management method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0152] This embodiment provides an address mapping table management method, which can be used in the address mapping table manager shown in the above embodiment. Figure 3This is a flowchart of an address mapping table management method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:

[0153] Step S301: Based on the table modification processor, receive the table modification command, obtain the comparison address and logical address in the table modification command, determine the source of the table modification command based on the comparison address, and if the source of the table modification command is the host, send the logical address to the offset calculator.

[0154] Step S302: Based on the offset calculator, receive the logical address, determine the target partition based on the logical address and the preset partition granularity, and send the target partition to the heat manager.

[0155] Step S303: Based on the heat manager, receive the target partition, determine the first destination address based on the target partition and the starting address of the heat histogram, increase the heat of the corresponding partition in the heat histogram based on the first destination address, obtain the heat of each partition in the heat histogram at preset time intervals, and determine the hot zone and cold zone based on the heat of each partition.

[0156] Further descriptions of the above steps are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0157] The address mapping table management method provided in this embodiment expands the address mapping table manager in related technologies. When modifying the address mapping table using the table modification processor, if the source of the table modification command is the host, the offset calculator and the heat manager are used to realize the hot statistics of the address and the hot and cold management of the data, thereby reducing the computing power and power consumption of the processor core.

[0158] This embodiment provides an address mapping table management method. Figure 4 This is a flowchart of an address mapping table management method according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps:

[0159] The first step is to receive the table modification command.

[0160] The second step is to determine whether the source of the table modification command is the host, based on the table modification command itself.

[0161] The third step is to modify the table if the source of the table modification command is the host.

[0162] Understandably, commands from the host machine directly modify the memory table, while commands from garbage collection (GC) and NAND flash memory require comparison. The comparison address for NAND flash memory is the memory address, while the comparison address for GC is the NAND flash address where the reclaimed data block resides.

[0163] It should be noted that when the source of the table modification command is the host, it is also necessary to perform partition heat statistics and data hot and cold management. For details, please refer to the corresponding description in the aforementioned embodiment. This is not shown in the figure and will not be repeated here.

[0164] If the source of the table modification command is not the host, determine whether a hit has occurred.

[0165] The process of determining whether a match has occurred involves checking whether the original physical address and the address being compared pass.

[0166] If a match is found, the table is modified. That is, if the comparison result is a pass, the physical address is written into the address mapping table based on the second destination address.

[0167] In the event of a match failure, the destination address is discarded. Specifically, if the comparison fails, a first discard request is generated based on the physical address and sent to a mask calculator. The mask calculator receives the first discard request, retrieves the physical address from it, determines the first target data block based on the data block mask and the physical address, and sends the first target data block to the valid data frame processor. The valid data frame processor receives the first target data block, determines the third destination address based on the start address of the valid data frame processing table and the first target data block, and reduces the valid data frame count value of the data block corresponding to the third destination address.

[0168] The fourth step, after modifying the table, is to determine whether the original address is a NAND flash memory address. This involves determining whether the original physical address is a NAND flash memory address.

[0169] If the original address is NAND, the original address is discarded. Corresponding to the case where the original physical address is a flash memory physical address, a second discard request is generated based on the original physical address and sent to the mask calculator. The mask calculator also receives the second discard request, obtains the original physical address from the second discard request, determines the second target data block based on the data block mask and the original physical address, and sends the second target data block to the valid data frame processor. The valid data frame processor receives the second target data block, determines the fourth destination address based on the starting address of the valid data frame processing table and the second target data block, and reduces the valid data frame count value of the data block corresponding to the fourth destination address.

[0170] If the original address is not NAND, no action is taken. Normally, when GC reaches this step, the original address is usually NAND, requiring a process to discard the original address.

[0171] For a detailed description of the above steps, please refer to the description corresponding to the above embodiments, which will not be repeated here.

[0172] The address mapping table management method provided in this embodiment replaces the CPU's table modification work by integrating frequent and relatively fixed operations in the hardware. Furthermore, it preserves the order within the device without the need for locking, which can effectively reduce latency and CPU pressure, while also reducing the overall power consumption of the disk. The automatic statistical data on the hot and cold status can also effectively reduce write amplification and PE difference, and better achieve wear leveling.

[0173] This invention also provides a computer device; please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the computer device includes one or more processors 501, memory 502, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 501 as an example.

[0174] Processor 501 may be a central processing unit, a network processor, or a combination thereof. Processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0175] The memory 502 stores instructions executable by at least one processor 501 to cause at least one processor 501 to perform the method shown in the above embodiments.

[0176] Memory 502 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, memory 502 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 502 may optionally include memory remotely located relative to processor 501, and this remote memory may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0177] Memory 502 may include volatile memory, such as random access memory; memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; memory 502 may also include combinations of the above types of memory.

[0178] The computer device also includes a communication interface 503 for communicating with other devices or communication networks.

[0179] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0180] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0181] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. An address mapping table manager, characterized in that, The address mapping table manager includes: A table modification processor is used to receive a table modification command, obtain the comparison address and logical address in the table modification command, determine the source of the table modification command based on the comparison address, and send the logical address to the offset calculator if the source of the table modification command is a host. Offset calculator, used to receive the logical address, determine the target partition based on the logical address and preset partition granularity, and send the target partition to the heat manager; A heat manager is used to receive the target partition, determine a first destination address based on the target partition and the starting address of the heat histogram, increase the heat of the corresponding partition in the heat histogram based on the first destination address, obtain the heat of each partition in the heat histogram at preset time intervals, and determine hot and cold zones based on the heat of each partition. The heat manager is specifically used for: The partitions are sorted from highest to lowest popularity to obtain the sorting results; Based on the sorting results, the heat difference between adjacent sorted partitions is determined; If the heat difference is greater than the average heat difference, the two partitions corresponding to the heat difference are determined as the target partition combination; Based on the target partition combination, determine the hot and cold segmentation zones; For any given partition, if the partition is ranked higher than the hot / cold partition ranking, the partition is determined to be a hot partition. If the order of the partition is not higher than the order of the hot and cold partitions, the partition is determined to be a cold partition; The heat manager is also used for: The average difference in heat intensity is determined using the following formula: (heat_max–heat_min) / (column_num–1) Where heat_max is the heat of the partition with the highest ranking, heat_min is the heat of the partition with the lowest ranking, and column_num is the total number of partitions.

2. The address mapping table manager according to claim 1, characterized in that, The table modification processor is specifically used for: If the comparison address is a preset value, the source of the table modification command is determined to be a host; If the comparison address is not a preset value, it is determined that the source of the table modification command is not a host.

3. The address mapping table manager according to claim 1, characterized in that, The address mapping table manager also includes a mask calculator and a valid data frame processor; The table modification processor is also used to obtain the physical address in the table modification command. When the source of the table modification command is a host, it determines the second destination address based on the starting address of the address mapping table and the logical address, and writes the physical address into the address mapping table based on the second destination address. The table modification processor is further configured to, when the source of the table modification command is not a host, obtain the original physical address corresponding to the logical address from the address mapping table based on the second destination address, compare the original physical address with the comparison address to obtain a comparison result, and if the comparison result is a successful comparison, write the physical address into the address mapping table based on the second destination address; and if the comparison result is a failed comparison, generate a first scrap request based on the physical address and send the first scrap request to the mask calculator. The mask calculator is used to receive the first scrap request, obtain the physical address in the first scrap request, determine the first target data block based on the data block mask and the physical address, and send the first target data block to the valid data frame processor. The valid data frame processor is used to receive the first target data block, determine the third destination address based on the starting address of the valid data frame processing table and the first target data block, and reduce the valid data frame count value of the data block corresponding to the third destination address.

4. The address mapping table manager according to claim 3, characterized in that, The modified table processor is further configured to, after writing the physical address into the address mapping table, determine the type of the original physical address based on the original physical address and the memory mask, and if the type of the original physical address is a flash physical address, generate a second scrap request based on the original physical address and send the second scrap request to the mask calculator. The mask calculator is also used to receive the second scrap request, obtain the original physical address in the second scrap request, determine the second target data block based on the data block mask and the original physical address, and send the second target data block to the valid data frame processor. The valid data frame processor is used to receive the second target data block, determine the fourth destination address based on the starting address of the valid data frame processing table and the second target data block, and reduce the valid data frame count value of the data block corresponding to the fourth destination address.

5. The address mapping table manager according to claim 1, characterized in that, The heat manager is specifically used for: The target partition combinations are sorted from highest to lowest popularity. Select the target partition combination that is in the middle position from the sorting results of the target partition combination; The target partition with the lowest ranking among the proposed target partition combinations is determined as the hot and cold segmentation area.

6. A method for managing address mapping tables, characterized in that, Applied to the address mapping table manager of any one of claims 1 to 5, the method comprises: Based on the table modification processor, a table modification command is received, the comparison address and logical address in the table modification command are obtained, the source of the table modification command is determined based on the comparison address, and if the source of the table modification command is a host, the logical address is sent to the offset calculator. Based on the offset calculator, the logical address is received, and based on the logical address and the preset partition granularity, the target partition is determined and sent to the heat manager; Based on the heat manager, the target partition is received, and a first destination address is determined based on the target partition and the starting address of the heat histogram. Based on the first destination address, the heat of the corresponding partition in the heat histogram is increased. At preset time intervals, the heat of each partition in the heat histogram is obtained, and hot and cold zones are determined based on the heat of each partition. The process of determining hot and cold zones based on the heat of each partition includes: The partitions are sorted from highest to lowest popularity to obtain the sorting results; Based on the sorting results, the heat difference between adjacent sorted partitions is determined; If the heat difference is greater than the average heat difference, the two partitions corresponding to the heat difference are determined as the target partition combination; Based on the target partition combination, determine the hot and cold segmentation zones; For any given partition, if the partition is ranked higher than the hot / cold partition ranking, the partition is determined to be a hot partition. If the order of the partition is not higher than the order of the hot and cold partitions, the partition is determined to be a cold partition; The method further includes: Based on the heat manager, the average heat difference is determined using the following formula: (heat_max–heat_min) / (column_num–1) Where heat_max is the heat of the partition with the highest ranking, heat_min is the heat of the partition with the lowest ranking, and column_num is the total number of partitions.

7. A computer device, characterized in that, include: The system includes a memory and a processor, which are interconnected and communicate with each other. The memory stores computer instructions, and the processor executes the address mapping table management method of claim 6 by executing the computer instructions.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the address mapping table management method of claim 6.

Citation Information

Patent Citations

  • Method and system for using solid-state disk as cache of computer

    CN103678166A

  • Memory system and method of controlling temperature thereof

    CN111857567A