Multi-channel hardware management method and system for solid state disk
By introducing multi-channel hardware management methods and systems in solid-state drives, real-time acquisition and dynamic allocation of logical unit numbers, combined with rotation and temperature monitoring mechanisms, the load unevenness and resource waste in multi-channel LUN management in SSD is solved, and the performance and resource utilization of SSD are improved.
Patent Information
- Application Number
- CN202510526833.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-25
AI Technical Summary
There are problems of uneven load and waste of resources in existing solid-state drives (SSDs), which affect the performance and resource utilization of SSDs.
A multi-channel hardware management method and system is adopted, including sampling module, distribution module, rotation module, temperature monitoring module and register module. By collecting the average number of logical unit numbers of each working channel in real time, dynamically calculate and allocate the maximum number of concurrent LUNs for each channel, and optimizing resource allocation through rotation and temperature monitoring mechanisms.
It effectively avoids load unevenness and resource waste, improves the overall resource utilization of SSD, ensures that each channel runs at the best performance, and improves the operational robustness and load balancing of SSD.
Smart Images

Figure CN120045143A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of solid state drives, and in particular, to a multi-channel hardware management method and system for solid state drives. Background Art
[0002] With the development of storage technology, multi-channel architectures have been widely used in solid state drives (SSDs). However, the independent characteristics of each channel's hardware interface make the coordinated work between channels more complex, especially in the management and allocation of logical unit numbers (LUNs).
[0003] Currently, the LUN management methods in related technologies often adopt static allocation mechanisms, which may result in uneven load and resource waste, thus affecting the performance and resource utilization rate of SSDs. Therefore, how to reduce the uneven load and resource waste during multi-channel LUN management and improve the performance and resource utilization rate of SSDs has become an urgent problem to be solved. Summary of the Invention
[0004] In view of this, this application provides a multi-channel hardware management method and system for solid state drives to at least solve the problem that the uneven load and resource waste exist during multi-channel LUN management in related technologies, thus affecting the performance and resource utilization rate of SSDs.
[0005] This application provides a multi-channel hardware management method for solid state drives, which is applied to a multi-channel hardware management system for solid state drives. The system includes: a sampling module, an allocation module, a rotation module, a temperature monitoring module, and a register module. The method includes: the sampling module samples multiple working channels of the solid state drive to determine the average number of logical unit numbers of the multiple working channels, and saves the average number of logical unit numbers to the register module; wherein, the sampling method is determined based on the solid state configuration information, and the solid state configuration information is preset by the firmware of the solid state drive; the allocation module reads the average number of logical unit numbers from the register module, and combines the solid state configuration information, the channel working status bitmap, and the limit ratio to determine the maximum concurrent number of logical unit numbers of the multiple working channels; according to the maximum concurrent number of logical unit numbers, at least one preset allocation method is used to allocate concurrent logical unit numbers to each working channel in at least one working channel; the rotation module cyclically shifts the concurrent logical unit numbers in each working channel according to a preset rotation period; the temperature monitoring module obtains the working temperature of each working channel through a bypass mode, and if the working temperature of a working channel is greater than a preset temperature threshold, updates the limit ratio; wherein, during the update process of the limit ratio, the sampling module suspends sampling.
[0006] The present application also provides a multi-channel hardware management system for a solid-state drive. The system includes: a sampling module, an allocation module, a rotation module, a temperature monitoring module, and a register module, where: The sampling module is used to sample multiple working channels of the solid-state drive, determine the average number of logical unit numbers of the multiple working channels, and save the average number of logical unit numbers to the register module; wherein, the sampling method is determined based on the solid-state configuration information, and the solid-state configuration information is preset by the firmware of the solid-state drive; The allocation module is used to read the average number of logical unit numbers from the register module, and combine the solid-state configuration information, the channel working status bitmap, and the limit ratio to determine the maximum concurrent number of logical unit numbers of the multiple working channels; according to the maximum concurrent number of logical unit numbers, at least one preset allocation method is used to allocate concurrent logical unit numbers to each of at least one working channel; The rotation module is used to cyclically shift the concurrent logical unit numbers in each working channel according to a preset rotation period; The temperature monitoring module is used to obtain the working temperature of each working channel through a bypass mode. If the working temperature of a working channel is greater than a preset temperature threshold, the limit ratio is updated; wherein, during the update process of the limit ratio, the sampling module pauses sampling.
[0007] The present application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above multi-channel hardware management methods for a solid-state drive when executing the computer program.
[0008] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program implements the steps of any of the above multi-channel hardware management methods for a solid-state drive when executed by a processor.
[0009] The present application also provides a computer program product including a computer program, and the computer program implements the steps of any of the above multi-channel hardware management methods for a solid-state drive when executed by a processor.
[0010] By the sampling module in the present application, the average number of LUNs of multiple working channels is collected in real time, which can accurately reflect the working status of each channel. And the allocation module dynamically calculates and allocates the maximum concurrent number of LUNs for each channel based on the sampling results, avoiding the situation of uneven load and resource waste caused by the static allocation mechanism in the related art, improving the overall resource utilization rate of the SSD, and ensuring that each channel can operate at the best performance.
[0011] In addition, the temperature monitoring module monitors the operating temperature of each channel in real time through the bypass mode. When the temperature of some channels exceeds the preset threshold, the limit ratio is updated in a timely manner, and the LUN allocation is adjusted to reduce power consumption and temperature, which can effectively avoid the risk of hardware damage at too high operating temperatures and further improve the operation robustness of the SSD. The rotation module performs circular shifting on the LUN according to the preset period, so that each working channel can evenly bear the workload at different time periods, avoiding excessive wear or performance degradation of some channels due to long-term high load, and further improving the overall resource utilization rate of the SSD. Description of the Drawings
[0012] To more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0013] Figure 1a An exemplary schematic diagram of the architecture of a multi-channel hardware management system for a solid-state drive to which a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application is applied; Figure 1b A flowchart of a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application; Figure 2 A flowchart of the rotation process of a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application; Figure 3 A flowchart of the sampling process of a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application; Figure 4 A flowchart of the limit ratio update process of a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application; Figure 5 A structural diagram of a multi-channel hardware management system for a solid-state drive provided by an embodiment of the present application; Figure 6 A structural diagram of another multi-channel hardware management system for a solid-state drive provided by an embodiment of the present application. Detailed Embodiments
[0014] In the field of SSD technology, with the continuous increase in storage capacity requirements and the growing demand for high performance, multi-channel architectures have been widely used in SSDs. However, the hardware interfaces of each channel in an SSD usually work independently, which leads to greater difficulty in coordinating and managing multiple working channels. The LUN management methods in related technologies usually rely on simple fixed allocation strategies or static allocation mechanisms based on limited parameters, and these methods often cannot flexibly cope with complex and changing workloads and system operating states.
[0015] In the SSD systems of related technologies, LUN resources are usually allocated once during system initialization and rarely or hardly adjusted dynamically afterwards. This fixed LUN allocation method has many problems in practical applications. For example, some channels may experience command processing delays or even timeouts under high load due to excessive allocated LUNs, which seriously affects the overall system performance. On the other hand, some channels may have idle LUN resources, failing to fully utilize their hardware processing capabilities, resulting in resource waste and reducing the overall performance and resource utilization rate of the system.
[0016] A typical SSD LUN management scheme in related technologies usually allocates LUN resources according to preset fixed rules during the system initialization phase. For example, assume that the system has 8 channels and the total number of LUNs is 64. These LUNs may be evenly distributed to each channel, with 8 LUNs allocated to each channel. In this scheme, regardless of how the actual load of each channel changes, the allocation of LUN resources never makes any dynamic adjustments. This scheme fails to consider the performance differences between channels, the changes in workloads, and the overall operating state of the system, lacks flexibility, and is difficult to cope with modern complex storage application scenarios.
[0017] The above-mentioned related technologies often have the following problems in the solving process: 1. Due to the significant differences in the access requirements of each application program or user for the storage channel, the workloads between channels show highly dynamic changes during actual operation. However, related technologies fail to perceive or respond to these dynamic changes, resulting in command delays or even timeouts in high-load channels when the task volume is too large due to insufficient LUN resources, seriously affecting the system's response speed and overall performance.
[0018] 2. There are often a large number of idle LUN resources in low-load channels. These underutilized resources not only cause hardware resource waste but also increase the energy consumption overhead of the system, reducing the energy efficiency of the SSD system.
[0019] 3. Related technologies also have limitations in terms of system scalability and compatibility, making it difficult to adapt to the growing storage requirements and changing application scenarios. This deficiency severely restricts the further improvement of SSD system performance and its function expansion.
[0020] To solve the above problems, a multi-channel hardware management method for a solid-state drive provided in various embodiments of the present application is applied to a multi-channel hardware management system of a solid-state drive. The system includes: a sampling module, an allocation module, a rotation module, a temperature monitoring module, and a register module. The method includes: the sampling module samples multiple working channels of the solid-state drive to determine the average number of logical unit numbers of the multiple working channels, and saves the average number of logical unit numbers to the register module; wherein, the sampling method is determined based on the solid-state configuration information, and the solid-state configuration information is preset by the firmware of the solid-state drive; the allocation module reads the average number of logical unit numbers from the register module, and combines the solid-state configuration information, the channel working status bitmap, and the limit ratio to determine the maximum concurrent number of logical unit numbers of the multiple working channels; according to the maximum concurrent number of logical unit numbers, at least one preset allocation method is used to allocate concurrent logical unit numbers to each working channel in at least one working channel; the rotation module cyclically shifts the concurrent logical unit numbers in each working channel according to a preset rotation period; the temperature monitoring module obtains the working temperature of each working channel through a bypass mode, and if the working temperature of a working channel is greater than a preset temperature threshold, updates the limit ratio; wherein, during the update process of the limit ratio, the sampling module pauses sampling.
[0021] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0022] It should be noted that in the description of the present application, the terms "including", "comprising", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or device including a series of elements includes not only those elements but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, article, or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0023] To enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0024] Please refer to Figure 1a ,Figure 1a An exemplary schematic diagram of the architecture of a multi-channel hardware management system for a solid-state drive to which the multi-channel hardware management method of a solid-state drive provided by an embodiment of the present application is applied. As Figure 1a shown, the system includes: a sampling module, an allocation module, a rotation module, a temperature monitoring module, and a register module.
[0025] Among them, the system can be deployed inside the SSD and is used to optimize the data interaction process between the main control chip of the SSD and the NAND-type non-volatile memory (NAND Flash) inside the SSD. Among them, the firmware of the SSD runs in the main control chip of the SSD, and the firmware can include the basic operation logic of the SSD and various control algorithms.
[0026] Further, the sampling module can sample multiple working channels in the SSD through a local interface and save the sampling results to the register module.
[0027] The register module can communicate with the firmware through an Advanced Peripheral Bus (APB) or an Advanced eXtensible Interface (AXI) to synchronize the sampling results of the sampling module to the firmware.
[0028] Further refer to Figure 1b , Figure 1b A flowchart of a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application. The process of this method can include the following steps: Step S101, the sampling module samples multiple working channels of the solid-state drive, determines the average number of logical unit numbers of the multiple working channels, and saves the average number of logical unit numbers to the register module.
[0029] In this embodiment, the sampling method is determined based on the solid-state configuration information, and the solid-state configuration information is preset by the firmware of the solid-state drive.
[0030] The sampling module reads the solid-state configuration information from the register module, obtains the sampling method and the channel working status bitmap from the solid-state configuration information, screens out multiple working channels from all the channels of the SSD according to the channel working status bitmap, and statistically calculates the average number of logical unit numbers of each working channel through the sampling method.
[0031] Among them, the channel working status bitmap can be a bitwise arranged binary bitmap structure used to identify the current working status of each channel. Each bit in the channel working status bitmap represents the working status of a channel, and when the value is 1, it indicates that the corresponding channel is a working channel, and when the value is 0, it indicates that the corresponding channel is a non-working channel.
[0032] A working channel may refer to an SSD channel that is currently in an active state, has normal data transmission capabilities, and can perform data read and write operations with a NAND flash chip. A non-working channel may include at least one of the following: an unenabled channel, an idle channel, or an abnormal channel.
[0033] Exemplarily, if the channel working status bitmap is represented as "16'b0001_0000_1001_0110" (where "16'b" may represent 16-bit binary, namely "0001 0000 1001 0110"), 4 working channels are selected from 16 channels of the SSD, which are channel (ch) 1, ch2, ch4, ch7, and ch12 respectively. The sampling module determines the sampling period and sampling step according to the sampling method, samples the 4 working channels, and calculates the average number of logical unit numbers of the 4 working channels, and saves the average number of logical unit numbers to the register module. For example, the sampling period of the sampling module is 3 time periods, and the LUN numbers of the working channel ch1 collected in 3 time periods are 6, 8, and 10 respectively, then the average LUN number corresponding to ch1 is 12.
[0034] In step S102, the allocation module reads the average number of logical unit numbers from the register module, combines the solid-state configuration information, the channel working status bitmap, and the limit ratio to determine the maximum concurrent number of logical unit numbers of multiple working channels; according to the maximum concurrent number of logical unit numbers, at least one preset allocation method is used to allocate concurrent logical unit numbers to each working channel in at least one working channel.
[0035] In this embodiment, the limit ratio may be an adjustment factor for adjusting the maximum concurrent number of LUNs of each working channel. The essence of the limit ratio is a ratio coefficient less than or equal to 1, which can be adjusted in real time according to the temperature change.
[0036] The allocation module determines the preset allocation method according to the solid-state configuration information, and distributes the maximum concurrent number of LUNs into each working channel according to the preset allocation method to determine the concurrent LUNs of each working channel.
[0037] In step S103, the rotation module cyclically shifts the concurrent logical unit numbers in each working channel according to a preset rotation period.
[0038] In this embodiment, the rotation module reads the preset rotation period from the register module, where the preset rotation period is used to represent how often the rotation is performed per time unit.
[0039] The rotation module cyclically shifts the concurrent LUNs of each working channel regularly according to the preset rotation period, and saves the result of the cyclic shift to the register module.
[0040] Among them, cyclic shift may refer to adjusting the positions of the allocated concurrent LUNs in each working channel according to a preset shift method to achieve fair rotation access for each working channel.
[0041] Exemplarily, assuming that the initial concurrent LUNs of {ch1, ch2, ch4, ch7, ch12} are {2, 2, 3, 3, 2}, after the rotation module performs a cyclic shift on the initial concurrent LUNs, the latest concurrent LUNs can be {2, 2, 2, 3, 3}.
[0042] Step S104, the temperature monitoring module obtains the working temperature of each working channel through the bypass mode. If the working temperature of a working channel is greater than the preset temperature threshold, update the limit ratio.
[0043] In this embodiment, during the update process of the limit ratio, the sampling module pauses sampling.
[0044] When the bypass mode is adopted, the limit ratio can be updated by the temperature monitoring module.
[0045] Specifically, the temperature monitoring module detects the working temperature of each working channel in real time. When it detects that the working temperature of a working channel is greater than the preset temperature threshold, update the limit ratio.
[0046] For example, when the limit ratio is 0.8, the temperature monitoring module detects that the working temperature of a working channel is greater than the preset temperature threshold, and updates the initial limit ratio to 0.5.
[0047] Here, when the bypass mode is adopted, the update of the limit ratio is an active update.
[0048] In a possible implementation manner, the method further includes: When the non-bypass mode is adopted, the limit ratio is updated by the firmware. The firmware updates the limit ratio regularly and sends the updated limit ratio to the register module.
[0049] Here, when the non-bypass mode is adopted, the update of the limit ratio is a passive update.
[0050] In the multi-channel hardware management method and system of the solid-state drive according to the above embodiments of the present application, the sampling module in the present application can accurately reflect the working status of each channel by collecting the average number of LUNs of multiple working channels in real time. And the allocation module dynamically calculates and allocates the maximum concurrent LUN number of each channel based on the sampling result, avoiding the uneven load and resource waste caused by the static allocation mechanism in the related art, improving the overall resource utilization rate of the SSD, and ensuring that each channel can operate at the best performance. In addition, the temperature monitoring module monitors the working temperature of each channel in real time through the bypass mode. When the temperature of some channels exceeds the preset threshold, the limit ratio is updated in time and the LUN allocation is adjusted to reduce power consumption and temperature, which can effectively avoid the risk of hardware damage at too high working temperatures and further improve the running robustness of the SSD. The rotation module cyclically shifts the LUNs according to a preset period, so that each working channel can evenly bear the working load at different time periods, avoiding excessive wear or performance degradation of some channels due to long-term high load, and further improving the overall resource utilization rate of the SSD.
[0051] In a possible implementation manner of the above embodiment, in step S101, before the sampling module samples multiple working channels of the solid-state drive to determine the average number of logical unit numbers of the multiple working channels and saves the average number of logical unit numbers to the register module, the method further includes: The register module receives preset solid-state configuration information from the firmware. The solid-state configuration information includes at least one of the following: the maximum workable number of logical unit numbers, the minimum workable number of logical unit numbers, the channel working status bitmap, the sampling mode, or the rotation mode; wherein, the register module communicates with the firmware through a preset communication interface.
[0052] In this embodiment, the firmware initializes the SSD, and sets the firmware configuration information during the initialization process to set and optimize various working parameters and hardware characteristics of the SSD.
[0053] The register module communicates with the firmware through the APB bus or the AXI interface, and receives the firmware configuration information set by the firmware. The firmware configuration information includes, but is not limited to: the maximum workable number of logical unit numbers, the minimum workable number of logical unit numbers, the channel working status bitmap, the sampling mode, or the rotation mode.
[0054] Among them, the maximum workable number of logical unit numbers (hereinafter simply referred to as Lnum_max0) represents the maximum number of LUNs that each channel can concurrently access in the normal working state, and the minimum workable number of logical unit numbers (hereinafter simply referred to as Lnum_min) represents the minimum number of LUNs that each channel needs to concurrently access at least. The sampling mode determines the sampling method, sampling period, and sampling step. The rotation mode also determines the preset rotation period, rotation step, and rotation method.
[0055] Among them, the setting of Lnum_max0 can be used to limit the number of LUNs that can be concurrently accessed by each channel under high load, avoiding performance bottlenecks or resource overload caused by excessive concurrency; while the setting of Lnum_min can ensure that each channel can still maintain basic access capabilities in the minimum working state, avoiding complete idleness.
[0056] For example, if the Lnum_max0 of channel ch1 is 16, it can indicate that ch1 can process at most 16 LUNs under high load. If the number of working LUNs exceeds 16, the channel may not be able to continue working effectively due to overload, resulting in performance degradation; the Lnum_min of channel ch1 is 2, which can indicate that ch1 needs to process at least 2 LUNs to work effectively.
[0057] In the multi-channel hardware management method and system of the solid-state drive in the above embodiments of the present application, by setting the maximum and minimum concurrent LUN numbers (Lnum_max0 and Lnum_min) of each channel, it is ensured that the SSD will not be overloaded under high load, thus avoiding problems such as channel performance degradation and command timeout, and improving the transmission performance of the SSD. Through the configuration of the channel working status bitmap and the sampling mode, the sampling period, sampling step size and working status can be flexibly adjusted, so as to dynamically collect the load conditions of each channel, and adjust the resource allocation strategy according to the sampling results, enhancing the adaptability of the system in the face of different workloads and changing application scenarios.
[0058] In a possible implementation manner of the above step S101, the sampling module samples multiple working channels of the solid-state drive to determine the average number of logical unit numbers of the multiple working channels, including: The sampling module sets the corresponding sampling period and sampling step size according to the sampling mode in the solid-state configuration information; among them, the sampling mode includes a low-frequency sampling mode and a high-frequency sampling mode; The sampling module regularly collects the number of logical unit numbers from multiple working channels according to the sampling period and sampling step size, and calculates the average number of logical unit numbers of the multiple working channels.
[0059] In this embodiment, the low-frequency sampling mode can be characterized by a long sampling period, a large sampling step size and a low sampling frequency, and can be applicable to low-load situations. On the contrary, the high-frequency sampling mode can be characterized by a short sampling period, a small sampling step size and a high sampling frequency, and can be applicable to high-load situations.
[0060] Among them, the sampling period refers to the time interval between two consecutive samplings, and the sampling step size refers to the number of channels selected by the system in each sampling.
[0061] The sampling module determines the corresponding sampling period and sampling step according to the sampling mode, and regularly samples multiple working channels through the local interface according to the sampling period and sampling step, and saves the sampling results to the register module.
[0062] Among them, the local interface may refer to the data path or command interaction interface established between the sampling module and each channel controller (ChannelController) inside the SSD. For example, the local interface may include, but is not limited to: register interface, bus interface, internal command interface.
[0063] In the multi-channel hardware management method and system of the solid-state drive in the above embodiments of the present application, the sampling module dynamically collects the LUNs of each working channel, calculates the average number of LUNs, provides a real-time and accurate basis for subsequent concurrent LUN allocation, thereby improving the dynamicity of SSD resource allocation. By supporting two sampling modes of high frequency and low frequency, it can be automatically switched according to the current load, which helps to balance system performance and sampling resource overhead. The sampling module directly interacts with the channel controller through the local interface, without relying on the host side to participate, realizes closed-loop sampling inside the controller, and reduces external communication overhead and latency.
[0064] In a possible implementation manner of the above step S102, the allocation module reads the average number of logical unit numbers from the register module, and combines the solid-state configuration information, the channel working status bitmap, and the limit ratio to determine the maximum concurrent number of logical unit numbers of at least one working channel among the multiple working channels, including the following steps: Step a1, the allocation module reads the average number of logical unit numbers, the maximum workable number of logical unit numbers, the minimum workable number of logical unit numbers, the channel working status bitmap, and the limit ratio from the register module to determine whether the limit ratio is updated.
[0065] Among them, the allocation module reads the average number of LUNs, Lnum_max0, Lnum_min, the channel working status bitmap, and the limit ratio from the register module.
[0066] The limit ratio obtained by the allocation module can directly read the firmware configuration through the register module, or directly obtain it from the temperature control unit through the bypass mode, so that the working state of the LUN can be adjusted faster, and then the temperature can be adjusted.
[0067] Step a2, if the limit ratio is not updated, the allocation module takes the maximum workable number of logical unit numbers as the maximum concurrent number of logical unit numbers.
[0068] Among them, if the limit ratio is not updated, the allocation module uses Lnum_max0 as the maximum concurrent number of logical unit numbers (hereinafter referred to as Lnum_max1), that is, the allocation module makes Lnum_max1 = Lnum_max0.
[0069] Here, if the limit ratio is not updated, that is, the temperature of the current working channel is still less than the preset temperature threshold, it is default allowed for the SSD to exert its maximum performance.
[0070] Step a3, if the limit ratio is updated, the allocation module determines the product of the updated limit ratio and the average number of logical unit numbers, and uses the ceiling result of the product as the updated maximum concurrent number of logical unit numbers.
[0071] Among them, if the limit ratio is updated, the allocation module uses the following formula to determine the updated Lnum_max1:
[0072] Among them, is the average number of LUNs, is the limit ratio, Ceiling() represents rounding up.
[0073] In the multi-channel hardware management method and system of the solid-state drive in the above embodiments of the present application, the allocation module reads the average number of LUNs of multiple working channels from the register module, combines the solid-state configuration information, and dynamically calculates the maximum concurrent number of LUNs for each channel, so as to make the resource allocation of each channel more accurate and avoid reducing the performance of the SSD due to over-allocation or resource idleness. By detecting whether the limit ratio is updated, the allocation module can flexibly adjust the resource allocation of each channel according to the current working state and temperature conditions, and avoid overheating or resource waste caused by excessive concurrency. Through the bypass mode, the limit ratio can be directly obtained from the temperature control unit and updated quickly. This method provides higher flexibility, enabling the system to quickly respond to real-time temperature changes and adjust the working state without relying on firmware updates.
[0074] In a possible implementation manner of the above step S102, according to the maximum concurrent number of logical unit numbers, at least one preset allocation method is used to allocate concurrent logical unit numbers for each working channel in at least one working channel, including the following steps: Step b1, if the minimum workable number of logical unit numbers is greater than the maximum concurrent number of logical unit numbers, the allocation module allocates concurrent logical unit numbers for each working channel according to the minimum workable number of logical unit numbers.
[0075] Among them, if Lnum_min > Lnum_max1, the allocation module allocates according to Lnum_min to ensure that at least a certain number of LUNs can work properly.
[0076] Here, since Lnum_min > Lnum_max1, it means that each working channel must maintain at least a certain number of concurrent LUNs even under the minimum load. The allocation module allocates based on Lnum_min to ensure that even the working channel with the lowest load can have enough LUN concurrency to maintain its basic working ability, thus avoiding the working channel being completely idle.
[0077] Step b2, if the minimum workable number of logical unit numbers is less than the maximum concurrent number of logical unit numbers, the allocation module allocates concurrent logical unit numbers for each working channel according to the maximum concurrent number of logical unit numbers.
[0078] Among them, if Lnum_min < Lnum_max1, the allocation module allocates according to Lnum_max1 to allocate as many concurrent LUNs as possible for each working channel.
[0079] In the multi-channel hardware management method and system of the solid-state drive in the above embodiments of the present application, under low-load conditions, it can still ensure that the minimum working requirements of each channel are met, thus avoiding the channel entering a "starvation" state and being unable to process any tasks. Under high-load conditions, by allocating more LUNs to each working channel, the system resources are fully utilized to improve the overall concurrent performance and throughput of the SSD.
[0080] In a possible implementation manner of the above step b2, if the minimum workable number of logical unit numbers is less than the maximum concurrent number of logical unit numbers, the allocation module allocates concurrent logical unit numbers for each working channel according to the maximum concurrent number of logical unit numbers, including one of the following: Step b21, if the maximum concurrent number of logical unit numbers is divisible by the number of working channels, the allocation module evenly distributes the maximum concurrent number of logical unit numbers to each working channel; or, Step b22, if the maximum concurrent number of logical unit numbers is not divisible by the number of working channels, the allocation module adopts a first preset allocation method and sequentially allocates the remainders in the order of the working channels; or, Step b23, if the maximum concurrent number of logical unit numbers is not divisible by the number of working channels, the allocation module adopts a second preset allocation method and randomly distributes the remainders to at least one working channel.
[0081] In this embodiment, if Lnum_max1 is divisible by the number of working channels, Lnum_max1 is evenly distributed to each working channel; or, If Lnum_max1 cannot be evenly divided by the number of working channels, the remainder is allocated in sequence, and the remainders are allocated in sequence according to the order of the working channels; or, If Lnum_max1 cannot be evenly divided by the number of working channels, the remainder is randomly allocated, and the remainder is randomly allocated to at least one working channel.
[0082] Exemplarily, assume that Lnum_max1 is 12 and the number of working channels is 6. Then Lnum_max1 can be evenly divided by the number of working channels, and 2 concurrent LUNs are allocated to each working channel.
[0083] Assume that Lnum_max1 is 12 and the working channels are ch1, ch2, ch4, ch7, ch12. At this time, the number of working channels is 5, so Lnum_max1 cannot be evenly divided by the number of working channels, and the remainder is 2. Among them, if the remainder is allocated in sequence, 2 concurrent LUNs are first allocated to each working channel, and then according to the order of the working channels, 1 is allocated to ch1 and ch2 respectively. The concurrent LUN situation of the working channels after allocation is {ch1: 3, ch2: 3, ch4: 2, ch7: 2, ch12: 2}. If the remainder is randomly allocated, 2 concurrent LUNs are first allocated to each working channel, and then 1 is randomly allocated to two working channels respectively. The concurrent LUN situation of the working channels after allocation is {ch1: 2, ch2: 3, ch4: 3, ch7: 2, ch12: 2}.
[0084] Here, adopting the remainder allocation in sequence can ensure the relative fairness of LUN allocation for each channel; adopting the remainder random allocation can help reduce the risk of excessive allocation quantity of low channels caused by the allocation mode, thereby leading to a decrease in lifespan.
[0085] Further, the allocation module stores the allocation scheme in the register module.
[0086] In the multi-channel hardware management method and system of the solid-state drive in the above embodiments of the present application, through the sequential allocation and random allocation strategies, when the LUN cannot be evenly divided, the load allocation of each working channel can be optimized. Whether it is sequential allocation or random allocation, it ensures the maximization of system resource utilization and reduces the risk of idleness or overload. Through the two methods of random allocation and sequential allocation, the system can flexibly adjust the load strategy according to the actual situation. This enables the system to adapt to different working environments and load changes, improving the adaptability of the system.
[0087] In a possible implementation manner of the above step S103, the rotation module cyclically shifts the concurrent logical unit numbers in each working channel according to a preset rotation period, including: The rotation module reads the rotation pattern from the register module. If the rotation pattern is the time slice rotation scheduling method, it determines the preset rotation period corresponding to the time slice rotation scheduling method. The rotation module cyclically shifts the concurrent logical unit numbers in each working channel through the channel working status bitmap according to the preset rotation period.
[0088] In this embodiment, the time slice rotation scheduling method may refer to rotating the concurrent LUNs of each working channel at fixed time slice intervals. The preset rotation period may refer to the time interval defined under the time slice rotation scheduling method, which is used to control the time frequency of LUN rotation.
[0089] The rotation module cyclically shifts the concurrent logical unit numbers in each working channel through the channel working status bitmap according to the preset rotation period, which may include: The rotation module determines the working channels in the channel according to the channel working bitmap, cyclically shifts the working channels with a value of 1 in the channel working bitmap, and skips the cyclic shift for the non-working channels with a value of 0 in the channel working bitmap. Among them, the way of cyclic shift may include but is not limited to: cyclic right shift or cyclic left shift.
[0090] Exemplarily, please refer to Figure 2 , Figure 2 is a schematic diagram of the rotation process of a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application. As Figure 2 shown, where: Assume that the initial allocation of the concurrent LUNs of the working channels is {ch1: 3, ch2: 3, ch4: 2, ch7: 2, ch12: 2}. According to the preset rotation period, perform the first cyclic shift on {ch1: 3, ch2: 3, ch4: 2, ch7: 2, ch12: 2} to determine the first rotation situation: shift the 3 concurrent LUNs in ch1 to ch2, shift the 3 concurrent LUNs in ch2 to ch4, shift the 2 concurrent LUNs in ch4 to ch7, shift the 2 concurrent LUNs in ch7 to ch12, and shift the 2 concurrent LUNs in ch12 to ch1. Further, perform a second cyclic shift on the first rotation situation to determine the second rotation situation. And so on.
[0091] In the multi-channel hardware management method and system of the solid-state drive according to the above embodiments of the present application, the rotation module dynamically cyclically shifts the concurrent logical unit numbers in each working channel through a time-slice rotation scheduling method in combination with the channel working state bitmap, avoiding some channels maintaining a high load for a long time and accelerating wear, thereby improving the load balance of the working channels. In this way, it can effectively ensure the load balance of each channel, enable multiple channels to take turns to work efficiently, avoid the situation where the concurrent quantity of a certain channel is too large, resulting in a rapid decline in the life of the NAND flash memory, and at the same time prevent the concurrent quantity of a certain channel from being too small, causing the channel to be in a "starvation" state and unable to fully exert its performance.
[0092] In a possible implementation manner of the above step S103, the method further includes: the rotation module obtains the number of program / erase operations of each working channel, and determines the working life of each working channel according to the number of program / erase operations; When the working life of the target working channel is less than the preset threshold, the rotation module reduces the preset rotation period to reduce the rotation stay time of the concurrent logical unit numbers in the target working channel; When the working life of the target working channel is greater than the preset threshold, the rotation module increases the preset rotation period to extend the rotation stay time of the concurrent logical unit numbers in the target working channel.
[0093] In this embodiment, the rotation module obtains the number of program / erase operations (Program / Erase Cycles, P / E Cycles) of each working channel from the register module, where P / E Cycles may refer to a complete cycle formed by performing a complete erase operation on a channel and then performing one or more programming (or writing) operations, and the accumulated number of cycles determines the wear degree (i.e., life) of the channel.
[0094] When the working life of the target working channel is less than the preset threshold, the rotation module reduces the preset rotation period to reduce the rotation stay time of the concurrent logical unit numbers in the target working channel; When the working life of the target working channel is greater than the preset threshold, the rotation module increases the preset rotation period to extend the rotation stay time of the concurrent logical unit numbers in the target working channel.
[0095] Exemplarily, assume that the preset rotation period is 40 clock cycles. When the working life of the target working channel is less than the preset threshold, the rotation module shortens the preset rotation period to 35 clock cycles to reduce the rotation stay time of the concurrent LUNs in the target working channel; when the working life of the target working channel is greater than the preset threshold, the rotation module increases the preset rotation period to 45 clock cycles to extend the rotation stay time of the concurrent LUNs in the target working channel.
[0096] Here, by shortening or delaying the rotation stay time of concurrent LUNs in the target working channels, the lifespan consistency among the working channels is ensured, and the overall service life of the SSD is extended.
[0097] In the multi-channel hardware management method and system of the solid-state drive in the above embodiments of the present application, by shortening or delaying the rotation stay time of concurrent LUNs in the target working channels, the dynamic balance of the channel load and lifespan is achieved, and the reliability and service life of the NAND flash memory are improved. By regularly rotating the concurrent LUNs, the performance imbalance caused by long-term resource scarcity or exclusivity of individual channels is prevented, the performance jitter and resource competition problems are effectively alleviated, and the system operation stability is enhanced.
[0098] In a possible implementation manner of the above embodiment, in the temperature monitoring module of step S104, the working temperature of each working channel is obtained through the bypass mode. If the working temperature of a working channel is greater than the preset temperature threshold, after updating the limit ratio, the method further includes: The sampling module continues to sample multiple working channels, determines the average number of the latest logical unit numbers of the multiple working channels, and saves the average number of the latest logical unit numbers to the register module; The allocation module reads the average number of the latest logical unit numbers from the register module, combines the solid-state configuration information, the channel working status bitmap, and the latest limit ratio to determine the maximum concurrent number of the latest logical unit numbers of at least one working channel among the multiple working channels; according to the maximum concurrent number of the latest logical unit numbers, the latest concurrent logical unit numbers are allocated to each working channel; The rotation module cyclically shifts the latest concurrent logical unit numbers in each working channel according to the preset rotation period.
[0099] In this embodiment, each module in the system can be triggered based on a multi-module linkage adjustment mechanism driven by dynamic temperature control. Specifically, when a temperature anomaly or a firmware update causes an update of the limit ratio, the system will trigger the resampling of the sampling module, the reallocation of the allocation module, and the re-cyclic shift of the rotation module to ensure the stable operation of the SSD.
[0100] The moment when the sampling module performs sampling can be after the firmware is initialized or after each update of the limit ratio.
[0101] In the multi-channel hardware management method and system of the solid-state drive in the above embodiments of the present application, the temperature monitoring module obtains the channel temperature in a bypass mode, and dynamically adjusts the limit ratio after detecting that the channel temperature exceeds the preset threshold, or directly obtains the updated limit ratio from the firmware through a non-bypass mode, effectively avoiding the overheating risk caused by excessive concurrency of high-temperature channels and improving the temperature control intelligence of the system. Once the limit ratio is updated, it automatically triggers the linkage refresh of the three core modules of sampling, allocation, and rotation. By constructing a closed-loop control mechanism driven by dynamic temperature control, the efficiency and security of SSD operation are ensured.
[0102] In a possible implementation manner of the above step S104, the temperature monitoring module obtains the operating temperature of each working channel through a bypass mode. If the operating temperature of a working channel is greater than the preset temperature threshold, the limit ratio is updated, including: The temperature monitoring module sets a first preset temperature threshold, a second preset temperature threshold, and a third preset temperature threshold; where the third preset temperature threshold is greater than the second preset temperature threshold, and the second preset temperature threshold is greater than the first preset temperature threshold; If the operating temperature of a working channel is greater than the first preset temperature threshold, the temperature monitoring module reduces the limit ratio to the first limit ratio corresponding to the first preset temperature threshold; If the operating temperature of a working channel is greater than the second preset temperature threshold, the temperature monitoring module reduces the first limit ratio to the second limit ratio corresponding to the second preset temperature threshold; If the operating temperature of a working channel is greater than the third preset temperature threshold, the temperature monitoring module triggers an emergency protection mechanism and suspends the concurrent logical unit number operation of the working channel.
[0103] In this embodiment, the first preset temperature threshold corresponds to a low-temperature state and can be used to represent that the working channel is within the normal working range; the second preset temperature threshold corresponds to a medium-temperature state and can be used to represent that the working channel temperature is close to the safety critical value; the third preset temperature threshold corresponds to a high-temperature state and can be used to represent that the working channel temperature is too high.
[0104] Exemplarily, the first preset temperature threshold can be 40°C, and the corresponding first limit ratio is 0.8; the second preset temperature threshold can be 60°C, and the corresponding second limit ratio is 0.5; the third preset temperature threshold can be 75°C. If the operating temperature of a working channel is greater than 40°C, the temperature monitoring module reduces the limit ratio from 1 to 0.8; if the operating temperature of a working channel is greater than 60°C, the temperature monitoring module reduces the limit ratio from 0.8 to 0.5; if the operating temperature of a working channel is greater than 75°C, the temperature monitoring module suspends the concurrent LUN operation of the working channel.
[0105] Furthermore, the emergency protection mechanism may include, but is not limited to: suspending concurrent LUN operations, dynamically adjusting the working frequency, and reducing the memory access rate.
[0106] In the multi-channel hardware management method and system of the solid-state drive according to the above embodiments of the present application, as the temperature rises, the temperature monitoring module gradually reduces the limit ratio, which can avoid channel overload, thereby reducing the hardware loss and the risk of overheating. When the temperature reaches the critical threshold, the system can enter the protection mode, effectively preventing hardware damage caused by overheating, and enhancing the system's adaptability to environmental changes.
[0107] In a possible implementation manner of the above embodiment, the system further includes: a load prediction module, and the method further includes: The load prediction module obtains historical workload data of multiple working channels from the register module, analyzes the historical workload data through a machine learning model, predicts the load trend of multiple working channels within a preset future time period, and sends the load trend prediction result to the allocation module; The allocation module dynamically adjusts the maximum concurrent number of logical unit numbers within a preset future time period according to the load trend prediction result, and optimizes the allocation strategy.
[0108] In this embodiment, the load prediction module obtains historical workload data of multiple working channels from the register module, where the historical workload data may include at least one of the following: historical concurrent LUNs, the number of read / write requests, task latency, etc.
[0109] The load prediction module analyzes the historical workload data through a pre-trained machine learning model to predict the load trend of multiple working channels within a preset future time period.
[0110] Here, by way of example, the machine learning model may include at least one of the following: a regression analysis model, a time series analysis model, a long short-term memory network model, etc. The pre-training process of the machine learning model will not be elaborated here.
[0111] The allocation module dynamically adjusts the maximum concurrent number of LUNs within a preset future time period according to the load trend prediction result, including: If the load trend prediction result is an increasing load, the allocation module allocates more concurrent LUNs to the working channels in advance; if the load trend prediction result is a decreasing load, the allocation module reduces the concurrent LUNs of the working channels in advance.
[0112] In the multi-channel hardware management method and system of the solid-state drive according to the above embodiments of the present application, the linkage between the load prediction module and the allocation module enables the system to respond to load changes in a timely manner, avoid performance degradation caused by load fluctuations, and ensure the continuous and stable operation of the system. By optimizing the allocation strategy based on the load trend prediction results, it is possible to ensure that all channels are reasonably allocated resources under different load conditions, and avoid overloaded channels and idle channels.
[0113] In a possible implementation manner of the above embodiment, the system further includes: a frequency adjustment module, and the method further includes: If the temperature monitoring module updates the limit ratio, the frequency adjustment module adjusts the operating frequency of each of the multiple operating channels according to a preset mapping relationship, including: If the operating frequencies of each operating channel are the same, the operating frequency of each operating channel is uniformly adjusted according to the preset mapping relationship; wherein, the preset mapping relationship is used to represent the relationship between the limit ratio and the operating frequency; If the operating frequencies of each operating channel are different, the operating frequency corresponding to each operating channel is adjusted, and the operating frequencies of each operating channel are cyclically shifted.
[0114] In this embodiment, the NAND flash can support multiple operating frequencies. For example, the NAND flash can support a frequency range of 30 - 1800 megahertz (MHz).
[0115] When the limit ratio is adjusted, the frequency adjustment module is triggered to adjust the operating frequency of the operating channel. Among them, the frequency adjustment module judges the frequency state of the current operating channel. If the frequencies of all operating channels are the same, unified adjustment is performed; if the frequencies of the operating channels are different, the operating frequencies are independently adjusted for each channel and cyclic shifting is performed.
[0116] Exemplarily, Figure 2For example, if the frequencies of all working channels are the same, assuming the working frequencies of each working channel are {ch1: 1800Hz, ch2: 1800Hz, ch4: 1800Hz, ch7: 1800Hz, ch12: 1800Hz}, after updating the limit ratio, the working frequencies are uniformly adjusted to {ch1: 1000Hz, ch2: 1000Hz, ch4: 1000Hz, ch7: 1000Hz, ch12: 1000Hz}. If the frequencies of the working channels are different, assuming the working frequencies of each working channel are {ch1: 1800Hz, ch2: 1000Hz, ch4: 1800Hz, ch7: 600Hz, ch12: 1200Hz}, then the working frequencies are respectively adjusted to {ch1: 1600Hz, ch2: 9000Hz, ch4: 1600Hz, ch7: 533Hz, ch12: 1100Hz}, and cyclic shift is performed.
[0117] In the multi-channel hardware management method and system of the solid-state drive in the above embodiments of the present application, by dynamically updating the limit ratio, the working frequency can be flexibly changed, thereby achieving the purpose of reducing power consumption and precisely controlling the temperature, and effectively ensuring the stability of the system.
[0118] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0119] In a specific embodiment, Figure 3 It is a sampling process schematic diagram of a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application. The process may include the following steps: Step S301, the firmware initializes the firmware configuration information, and the sampling module configures the corresponding sampling period and sampling step according to the sampling mode.
[0120] Here, the firmware of the SSD initializes the firmware configuration information and stores the initialized firmware configuration information in the register module. The sampling module reads the sampling mode in the firmware configuration information from the register module, selects the low-frequency sampling mode or the high-frequency sampling mode, and sets the sampling period and sampling step corresponding to the low-frequency sampling mode or the high-frequency sampling mode.
[0121] Step S302, the sampling module samples each working channel to determine the average number of logical unit numbers.
[0122] Here, the sampling module determines multiple working channels in the SSD according to the channel working status bitmap, sampling period, and sampling step, samples the multiple working channels, and determines the average number of LUNs.
[0123] Step S303, the sampling module saves the average number of logical unit numbers to the register module; Step S304, check whether the sampling period has ended; if so, go to step S305; if not, return to step S304.
[0124] Here, the sampling module determines whether the sampling period has ended. If it has ended, it calls the allocation module; if not, it continues to wait until the sampling period ends.
[0125] Step S305, call the allocation module, calculate the maximum concurrent number of logical unit numbers, determine the allocation scheme, and save the scheme to the register module; return to step S301.
[0126] Here, the allocation module obtains the average number of LUNs calculated by the sampling module from the register module, calculates the maximum concurrent number of LUNs according to the average number of LUNs, channel working status bitmap, and firmware configuration information, and allocates the concurrent LUNs in each working module; after the allocation is completed, re-dynamically configure the sampling mode for the next round.
[0127] In a specific embodiment, Figure 4 is a schematic diagram of the restriction ratio update process of a multi-channel hardware management method for a solid-state drive provided by an embodiment of the present application. The process may include the following steps: Step S401, the firmware initializes the firmware configuration information.
[0128] Here, when the system starts, the firmware initializes the configuration of the register module, sets the firmware configuration information, and stores it in the register module.
[0129] Step S402, the allocation module gives an allocation scheme according to the initialization configuration.
[0130] Here, the allocation module reads Lnum_max0, Lnum_min in the firmware configuration information, and the channel working status bitmap, allocates the concurrent LUNs for each working channel, determines the allocation scheme, and stores it in the register module.
[0131] Step S403, the rotation module sets a preset rotation period and rotation step according to the rotation mode and channel working status bitmap, and performs a circular shift.
[0132] Here, the rotation module periodically adjusts the logical unit number allocation of each working channel according to the rotation mode and channel working status bitmap to achieve load balancing.
[0133] Step S404: The sampling module sets the sampling period and sampling step according to the sampling mode, determines the number of average logical unit numbers, and saves them to the register module.
[0134] Here, the sampling module monitors the load of each working channel in real time and updates the sampling result (average number of LUNs) to the register module.
[0135] Step S405: Determine whether the limit ratio is updated; if so, go to step S406; if not, return to step S405.
[0136] Here, determine whether the limit ratio is updated. If so, trigger the dynamic adjustment process. If not, maintain the current allocation scheme and rotation strategy and continue to run.
[0137] Step S406: Stop sampling, keep the sampling record, and the allocation module recalculates and allocates the scheme according to the limit ratio; return to step S401.
[0138] Here, the sampling module stops sampling, pauses data collection to avoid interference, retains the last valid sampling data, the allocation module recalculates and allocates the scheme according to the limit ratio, generates a new allocation scheme and updates the register module.
[0139] In one embodiment, a multi-channel hardware management system 500 for a solid-state drive is provided. The multi-channel hardware management system 500 for the solid-state drive corresponds one-to-one with the multi-channel hardware management method for the solid-state drive in the above embodiment. As Figure 5 shown, the system includes a sampling module 501, an allocation module 502, a rotation module 503, a temperature monitoring module 504, and a register module 505. Among them, the detailed descriptions of each functional module are as follows: The sampling module 501 is used to sample multiple working channels of the solid-state drive, determine the average number of logical unit numbers of the multiple working channels, and save the average number of logical unit numbers to the register module 505; among them, the sampling method is determined based on the solid-state configuration information, and the solid-state configuration information is preset by the firmware of the solid-state drive; The allocation module 502 is used to read the average number of logical unit numbers from the register module 505, combine the solid-state configuration information, the channel working status bitmap, and the limit ratio to determine the maximum concurrent number of logical unit numbers of the multiple working channels; according to the maximum concurrent number of logical unit numbers, at least one preset allocation method is used to allocate concurrent logical unit numbers to each working channel in at least one working channel; The rotation module 503 is used to cyclically shift the concurrent logical unit numbers in each working channel according to a preset rotation period; The temperature monitoring module 504 is used to obtain the operating temperature of each working channel through the bypass mode. If the operating temperature of a working channel is greater than the preset temperature threshold, the limit ratio is updated. During the update process of the limit ratio, the sampling module pauses sampling.
[0140] In one embodiment, the register module 505 is further configured to receive preset solid-state configuration information from the firmware. The solid-state configuration information includes at least one of the following: the maximum number of logical unit numbers that can work, the minimum number of logical unit numbers that can work, the channel operating status bitmap, the sampling mode, or the rotation mode. The register module communicates with the firmware through a preset communication interface.
[0141] In one embodiment, the sampling module 501 is configured to set the corresponding sampling period and sampling step according to the sampling mode in the solid-state configuration information. The sampling mode includes a low-frequency sampling mode and a high-frequency sampling mode. The sampling module 501 is configured to regularly collect the number of logical unit numbers from multiple working channels according to the sampling period and sampling step, and calculate the average number of logical unit numbers of the multiple working channels.
[0142] In one embodiment, the allocation module 502 is configured to read the average number of logical unit numbers, the maximum number of logical unit numbers that can work, the minimum number of logical unit numbers that can work, the channel operating status bitmap, and the limit ratio from the register module, and determine whether the limit ratio is updated. The allocation module 502 is configured to use the maximum number of logical unit numbers that can work as the maximum concurrent number of logical unit numbers if the limit ratio is not updated. The allocation module 502 is configured to determine the product of the updated limit ratio and the average number of logical unit numbers if the limit ratio is updated, and use the ceiling result of the product as the updated maximum concurrent number of logical unit numbers.
[0143] In one embodiment, the allocation module 502 is configured to allocate concurrent logical unit numbers to each working channel according to the minimum number of logical unit numbers that can work if the minimum number of logical unit numbers that can work is greater than the maximum concurrent number of logical unit numbers. The allocation module 502 is configured to allocate concurrent logical unit numbers to each working channel according to the maximum concurrent number of logical unit numbers if the minimum number of logical unit numbers that can work is less than the maximum concurrent number of logical unit numbers.
[0144] In one embodiment, if the maximum concurrent number of logical unit numbers is divisible by the number of working channels, the maximum concurrent number of logical unit numbers is evenly distributed to each working channel; or The allocation module 502 is configured to use the first preset allocation method to sequentially allocate the remainders in the order of the working channels if the maximum concurrent number of logical unit numbers is not divisible by the number of working channels; or The allocation module 502 is configured to, if the maximum concurrent number of logical unit numbers cannot be divided evenly by the number of working channels, adopt a second preset allocation method to randomly allocate the remainder to at least one working channel.
[0145] In one embodiment, the rotation module 503 is configured to read a rotation pattern from the register module. If the rotation pattern is a time slice rotation scheduling method, determine a preset rotation period corresponding to the time slice rotation scheduling method; The rotation module 503 is configured to perform a circular shift on the concurrent logical unit numbers in each working channel through a channel working status bitmap according to the preset rotation period; In one embodiment, the rotation module 503 is further configured to obtain the number of programming / erasing operations of each working channel, and determine the working life of each working channel according to the number of programming / erasing operations; The rotation module 503 is further configured to, if the working life of the target working channel is less than a preset threshold, reduce the rotation residence time of the concurrent logical unit numbers in the target working channel by shortening the preset rotation period; The rotation module 503 is further configured to, if the working life of the target working channel is greater than a preset threshold, extend the rotation residence time of the concurrent logical unit numbers in the target working channel by increasing the preset rotation period.
[0146] In one embodiment, the sampling module 501 is further configured to continue sampling multiple working channels, determine the latest average number of logical unit numbers of the multiple working channels, and save the latest average number of logical unit numbers to the register module; The allocation module 502 is further configured to read the latest average number of logical unit numbers from the register module, and determine the latest maximum concurrent number of logical unit numbers of the multiple working channels in combination with the solid state configuration information, the channel working status bitmap, and the latest limit ratio; and allocate the latest concurrent logical unit numbers to each working channel according to the latest maximum concurrent number of logical unit numbers; The rotation module 503 is further configured to perform a circular shift on the latest concurrent logical unit numbers in each working channel according to the preset rotation period.
[0147] In one embodiment, the temperature monitoring module 504 is configured to set a first preset temperature threshold, a second preset temperature threshold, and a third preset temperature threshold; wherein, the third preset temperature threshold is greater than the second preset temperature threshold, and the second preset temperature threshold is greater than the first preset temperature threshold; The temperature monitoring module 504 is configured to, if the working temperature of a working channel is greater than the first preset temperature threshold, reduce the limit ratio to a first limit ratio corresponding to the first preset temperature threshold; The temperature monitoring module 504 is configured to reduce the first limit ratio to a second limit ratio corresponding to the second preset temperature threshold if the operating temperature of an operating channel is greater than the second preset temperature threshold; The temperature monitoring module 504 is configured to trigger an emergency protection mechanism and suspend the operation of the concurrent logic unit numbers of the operating channel if the operating temperature of an operating channel is greater than the third preset temperature threshold.
[0148] In one embodiment, the system further includes: a load prediction module 506, where: The load prediction module 506 is configured to obtain historical workload data of multiple operating channels from the register module, analyze the historical workload data through a machine learning model, predict the load trend of the multiple operating channels within a future preset time period, and send the load trend prediction result to the allocation module 502; The allocation module 502 is configured to dynamically adjust the maximum concurrent number of logic unit numbers within a future preset time period according to the load trend prediction result and optimize the allocation strategy.
[0149] In one embodiment, the system further includes: a frequency adjustment module 507, where: The frequency adjustment module 507 is configured to adjust the operating frequency of each of the multiple operating channels according to a preset mapping relationship if the temperature monitoring module updates the limit ratio, where: The frequency adjustment module 507 is configured to uniformly adjust the operating frequency of each operating channel according to a preset mapping relationship if the operating frequencies of each operating channel are the same; wherein, the preset mapping relationship is used to represent the relationship between the limit ratio and the operating frequency; The frequency adjustment module 507 is configured to adjust the operating frequency corresponding to each operating channel respectively and perform a cyclic shift on the operating frequency of each operating channel if the operating frequencies of each operating channel are different.
[0150] It should be noted that: when the multi-channel hardware management system of the solid-state drive provided in the above embodiment implements the corresponding multi-channel hardware management method of the solid-state drive, only the above division of each program module is used for illustration. In actual application, the above processing can be allocated to different program modules according to needs, that is, the internal structure of the above system is divided into different program modules to complete all or part of the above-described processing. In addition, the system provided in the above embodiment and the corresponding Figure 1b The embodiment of the method shown belongs to the same concept, and the specific implementation process can be seen in the method embodiment, which will not be elaborated here.
[0151] The embodiment of the present disclosure further provides an electronic device having the above Figure 5 multi-channel hardware management system of the solid-state drive shown.
[0152] Please refer toFigure 6 , Figure 6 is a schematic structural diagram of a multi-channel hardware management system for another solid-state drive provided by an embodiment of the present application. As shown in Figure 6 , the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the electronic device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 6 In
[0153] , a single processor 10 is taken as an example.
[0154] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiments.
[0155] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the electronic device and the like. In addition, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories can be connected to the electronic device through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0156] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, a hard disk, or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0157] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected through a bus or other means. Figure 6 Here, taking the connection through the bus as an example.
[0158] The input device 30 can receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the electronic device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor), etc. The above display device includes, but is not limited to, a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.
[0159] The electronic device further includes a communication interface for the electronic device to communicate with other devices or communication networks.
[0160] The embodiments of the present disclosure also provide a computer-readable storage medium. The methods according to the embodiments of the present disclosure can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the methods described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium may also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.
[0161] A part of the present disclosure can be applied as a computer program product, for example, computer program instructions, which, when executed by a computer, can call or provide the methods and / or technical solutions according to the present disclosure through the operations of the computer. Those skilled in the art should understand that the forms of existence of computer program instructions in a computer-readable medium include but are not limited to source files, executable files, installation package files, etc. Correspondingly, the ways for a computer to execute computer program instructions include but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible by the computer.
[0162] Although the embodiments of the present disclosure 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 present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A multi-channel hardware management method for a solid state drive, characterized in that: A multi-channel hardware management system applied to a solid-state hard disk, the system comprises: a sampling module, a distribution module, a rotation module, a temperature monitoring module and a register module, the method comprises: The sampling module samples multiple working channels of the solid state drive, determines an average number of logical unit numbers of the multiple working channels, and saves the average number of logical unit numbers to the register module; wherein the sampling method is determined based on the solid state configuration information, and the solid state configuration information is preset by the firmware of the solid state drive; The allocation module reads the average number of logical unit numbers from the register module, and determines the maximum concurrent number of logical unit numbers of the multiple working channels in combination with the solid-state configuration information, the channel working status bitmap and the limit ratio; and allocates concurrent logical unit numbers to each working channel in the at least one working channel according to the maximum concurrent number of logical unit numbers using at least one preset allocation method; The rotation module cyclically shifts the concurrent logical unit number in each of the working channels according to a preset rotation period; The temperature monitoring module obtains the working temperature of each working channel through the bypass mode, and updates the limit ratio if the working temperature of a working channel is greater than a preset temperature threshold; wherein, during the update process of the limit ratio, the sampling module suspends sampling.
2. The method according to claim 1, characterized in that Before the sampling module samples multiple working channels of the solid state drive to determine the average number of logical unit numbers of the multiple working channels and saves the average number of logical unit numbers to the register module, the method further includes: The register module receives preset solid-state configuration information from the firmware, wherein the solid-state configuration information includes at least one of the following: a maximum operable number of logical unit numbers, a minimum operable number of logical unit numbers, a channel operating status bitmap, a sampling mode, or a rotation mode; wherein the register module communicates with the firmware through a preset communication interface.
3. The method according to claim 2, characterized in that The sampling module samples multiple working channels of the solid state drive to determine an average number of logical unit numbers of the multiple working channels, including: The sampling module sets the corresponding sampling period and sampling step according to the sampling mode in the solid-state configuration information; wherein the sampling mode includes a low-frequency sampling mode and a high-frequency sampling mode; The sampling module collects the number of logical unit numbers from multiple working channels at a regular time according to the sampling period and the sampling step, and calculates the average number of logical unit numbers of the multiple working channels.
4. The method according to claim 2, characterized in that: The allocation module reads the average number of logical unit numbers from the register module, and determines the maximum concurrent number of logical unit numbers of multiple working channels in combination with the solid-state configuration information, the channel working status bitmap and the limit ratio, including: The allocation module reads the average number of logical unit numbers, the maximum number of logical unit numbers that can be operated, the minimum number of logical unit numbers that can be operated, the channel working status bitmap and the limit ratio from the register module, and determines whether the limit ratio is updated; If the limit ratio is not updated, the allocation module uses the maximum workable number of logical unit numbers as the maximum concurrent number of logical unit numbers; If the limit ratio has been updated, the allocation module determines the product of the updated limit ratio and the average number of logical unit numbers, and takes the result of rounding up the product as the updated maximum concurrent number of logical unit numbers.
5. The method according to claim 4, characterized in that The method of allocating a concurrent logical unit number to each working channel in the at least one working channel according to the maximum concurrent number of logical unit numbers by using at least one preset allocation method includes: If the minimum workable number of logical unit numbers is greater than the maximum concurrent number of logical unit numbers, the allocation module allocates concurrent logical unit numbers to each working channel according to the minimum workable number of logical unit numbers; If the minimum workable number of logical unit numbers is less than the maximum concurrent number of logical unit numbers, the allocation module allocates a concurrent logical unit number to each of the working channels according to the maximum concurrent number of logical unit numbers.
6. The method according to claim 5, characterized in that If the minimum workable number of the logical unit numbers is less than the maximum concurrent number of the logical unit numbers, the allocation module allocates a concurrent logical unit number to each of the working channels according to the maximum concurrent number of the logical unit numbers, including one of the following: If the maximum concurrent number of logical unit numbers is divisible by the number of working channels, the allocation module evenly allocates the maximum concurrent number of logical unit numbers to each working channel; or, If the maximum concurrent number of the logical unit number cannot be divided by the number of working channels, the allocation module adopts a first preset allocation method to allocate the remainders in sequence according to the order of the working channels; or, If the maximum concurrent number of the logical unit numbers cannot be divided evenly by the number of working channels, the allocation module adopts a second preset allocation method to randomly allocate the remainder to at least one working channel.
7. The method according to claim 2, characterized in that The rotation module cyclically shifts the concurrent logical unit number in each of the working channels according to a preset rotation period, including: The round-robin module reads the round-robin mode from the register module, and if the round-robin mode is a time slice round-robin scheduling mode, determines a preset round-robin period corresponding to the time slice round-robin scheduling mode; The rotation module performs cyclic shifting on the concurrent logical unit number in each working channel through the channel working status bitmap according to the preset rotation period.
8. The method according to claim 7, characterized in that The method further comprises: The rotation module obtains the number of programming / erasing operations of each working channel, and determines the working life of each working channel according to the number of programming / erasing operations; If the working life of the target working channel is less than a preset threshold, the rotation module reduces the rotation residence time of the concurrent logical unit number in the target working channel by shortening the preset rotation period; If the working life of the target working channel is greater than a preset threshold, the rotation module prolongs the rotation residence time of the concurrent logical unit number in the target working channel by increasing the preset rotation period.
9. The method according to claim 1, characterized in that: In the temperature monitoring module, the working temperature of each working channel is obtained through the bypass mode. If the working temperature of a working channel is greater than a preset temperature threshold, after updating the limit ratio, the method further includes: The sampling module continues to sample the multiple working channels, determines the latest average number of logical unit numbers of the multiple working channels, and saves the latest average number of logical unit numbers to the register module; The allocation module reads the latest average number of logical unit numbers from the register module, determines the latest maximum concurrent number of logical unit numbers of multiple working channels in combination with the solid-state configuration information, the channel working status bitmap and the latest limit ratio; and allocates the latest concurrent logical unit number to each working channel according to the latest maximum concurrent number of logical unit numbers; The rotation module performs cyclic shifting on the latest concurrent logical unit number in each of the working channels according to a preset rotation period.
10. The method according to claim 1, characterized in that The temperature monitoring module obtains the working temperature of each of the working channels in bypass mode, and if the working temperature of any working channel is greater than a preset temperature threshold, updates the limit ratio, including: The temperature monitoring module sets a first preset temperature threshold, a second preset temperature threshold and a third preset temperature threshold; wherein the third preset temperature threshold is greater than the second preset temperature threshold, and the second preset temperature threshold is greater than the first preset temperature threshold; If there is a working channel whose operating temperature is greater than the first preset temperature threshold, the temperature monitoring module reduces the limit ratio to a first limit ratio corresponding to the first preset temperature threshold; If there is a working channel whose working temperature is greater than the second preset temperature threshold, the temperature monitoring module reduces the first limit ratio to a second limit ratio corresponding to the second preset temperature threshold; If the working temperature of a working channel is greater than the third preset temperature threshold, the temperature monitoring module triggers an emergency protection mechanism to suspend concurrent logical unit number operations of the working channel.
11. The method according to any one of claims 1 to 10, characterized in that The system further includes: a load prediction module, and the method further includes: The load prediction module obtains historical workload data of multiple working channels from the register module, analyzes the historical workload data through a machine learning model, predicts the load trends of multiple working channels in a future preset time period, and sends the load trend prediction results to the allocation module; The allocation module dynamically adjusts the maximum concurrent number of logical unit numbers within the future preset time period according to the load trend prediction result, and optimizes the allocation strategy.
12. The method according to claim 11, characterized in that The system further includes: a frequency adjustment module, and the method further includes: If the temperature monitoring module updates the limit ratio, the frequency adjustment module adjusts the working frequency of each working channel in the multiple working channels according to the preset mapping relationship, including: If the working frequency of each working channel is consistent, the working frequency of each working channel is uniformly adjusted according to the preset mapping relationship; wherein the preset mapping relationship is used to characterize the relationship between the limiting ratio and the working frequency; If the working frequencies of each working channel are inconsistent, the working frequencies corresponding to each working channel are adjusted, and the working frequencies of each working channel are cyclically shifted.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the multi-channel hardware management method for a solid state drive as claimed in any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the multi-channel hardware management method for a solid-state hard disk as claimed in any one of claims 1 to 12.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the multi-channel hardware management method for a solid state drive as claimed in any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Logic partitioning method and device for a solid state disk
CN109491612A
Solid state disk reading method and system and related components
CN114546294A
Temperature control method for solid-state storage device
CN116935904A
Circuit detection method and device, electronic equipment, storage medium and program product
CN118033392A
Low-power-consumption control method, system and equipment for solid state disk and medium
CN118192784A