Flexible data placement multi-stream write method, storage controller and storage device

CN122711084APending Publication Date: 2026-09-08MAXIO TECHNOLOGY (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611167292.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

[0005]本申请实施例提供一种灵活数据放置多流写入方法、存储控制器和存储设备,能够解决相关技术存储资源利用率较低的问题

Benefits of technology

[0010] In this embodiment, in a scenario where multiple FDP data streams are written, a first flexible data placement data stream and a second flexible data placement data stream are obtained from multiple flexible data placement data streams. Different write buffering strategies are applied to the first and second flexible data placement data streams: the first flexible data placement data stream is simultaneously written to both Static Random Access Memory (SRAM) and Dynamic Random Access Memory (DRAM), and when programming the first flexible data placement data stream to a non-volatile storage medium, the SRAM is used as the data source for data transmission; the second flexible data placement data stream is written only to the DRAM, and when programming the second flexible data placement data stream to a non-volatile storage medium, the DRAM is used as the data source for data transmission. In this way, different write buffering strategies can be used for different types of FDP data streams, simultaneously considering SRAM resource consumption and DRAM bandwidth bottlenecks, improving storage resource utilization, and solving the problem of low storage resource utilization caused by using the same write buffering strategy for each RUH-corresponding data stream in FDP multi-stream scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122711084A_ABST
    Figure CN122711084A_ABST
Patent Text Reader

Abstract

This application discloses a flexible data placement multi-stream writing method, a storage controller, and a storage device, belonging to the storage field. The method includes: obtaining a first flexible data placement data stream and a second flexible data placement data stream from multiple flexible data placement data streams; simultaneously writing the first flexible data placement data stream into SRAM and DRAM, and using SRAM as the data source for data transmission when performing a programming write operation on a non-volatile storage medium for the first flexible data placement data stream; writing the second flexible data placement data stream only into DRAM, and using DRAM as the data source for data transmission when performing a programming write operation on a non-volatile storage medium for the second flexible data placement data stream; wherein each flexible data placement data stream corresponds to a RUH, and different flexible data placement data streams correspond to different RUHs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of storage, specifically relating to a flexible data placement multi-stream writing method, a storage controller, and a solid-state drive. Background Technology

[0002] Flexible Data Placement (FDP) is a technology that optimizes data storage in solid-state drives (SSDs). With the increasing adoption of the Non-Volatile Memory Express (NVMe) FDP protocol in enterprise-grade SSDs, the host can write data streams from different applications to independent physical areas through different Reclaim Unit Handles (RUHs), achieving data isolation and reducing write amplification.

[0003] In FDP multi-stream scenarios, each RUH-corresponding data stream needs to consume independent write buffer resources to temporarily store the write data sent by the host, waiting for subsequent programming write operations on the non-volatile storage medium.

[0004] In FDP multi-stream scenarios, related technologies often employ the same write buffering strategy for the data stream corresponding to each RUH, which results in low storage resource utilization. Summary of the Invention

[0005] This application provides a flexible data placement multi-stream writing method, a storage controller, and a storage device, which can solve the problem of low storage resource utilization in related technologies.

[0006] In a first aspect, embodiments of this application provide a flexible data placement multi-stream writing method, executed by a storage controller, comprising: Obtain the first flexible data placement data stream and the second flexible data placement data stream from multiple flexible data placement data streams; The first flexible data placement data stream is simultaneously written into both static random access memory (SRAM) and dynamic random access memory (DRAM), and the SRAM is used as the data source for data transmission when a programming write for the first flexible data placement data stream is performed to a non-volatile storage medium. The second flexible data placement data stream is written only into the DRAM, and the DRAM is used as the data source for data transmission when a programming write for the second flexible data placement data stream is performed to a non-volatile storage medium; Each of the multiple flexible data placement data streams corresponds to a recycling unit handle (RUH), and different flexible data placement data streams correspond to different RUHs.

[0007] Secondly, embodiments of this application provide a storage device, including a processor and a memory, wherein the memory stores a program or instructions, and the program or instructions, when executed by the processor, implement the method described in the first aspect.

[0008] Thirdly, embodiments of this application provide a computer-readable storage medium on which a program or instructions are stored, which, when executed, implement the method described in the first aspect.

[0009] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when executed, implements the method described in the first aspect.

[0010] In this embodiment, in a scenario where multiple FDP data streams are written, a first flexible data placement data stream and a second flexible data placement data stream are obtained from multiple flexible data placement data streams. Different write buffering strategies are applied to the first and second flexible data placement data streams: the first flexible data placement data stream is simultaneously written to both Static Random Access Memory (SRAM) and Dynamic Random Access Memory (DRAM), and when programming the first flexible data placement data stream to a non-volatile storage medium, the SRAM is used as the data source for data transmission; the second flexible data placement data stream is written only to the DRAM, and when programming the second flexible data placement data stream to a non-volatile storage medium, the DRAM is used as the data source for data transmission. In this way, different write buffering strategies can be used for different types of FDP data streams, simultaneously considering SRAM resource consumption and DRAM bandwidth bottlenecks, improving storage resource utilization, and solving the problem of low storage resource utilization caused by using the same write buffering strategy for each RUH-corresponding data stream in FDP multi-stream scenarios. Attached Figure Description

[0011] Figure 1 This is a flowchart of the flexible data placement and multi-stream writing method provided in the embodiments of this application; Figure 2 This is a flowchart of a flexible data placement and multi-stream writing method provided in an embodiment of this application; Figure 3 This is a flowchart illustrating another flexible data placement and multi-stream writing method provided in this application embodiment; Figure 4 This is a structural block diagram of a data writing device provided in an embodiment of this application; Figure 5 This is a structural block diagram of a storage device provided in an embodiment of this application; Figure 6 This is a schematic diagram of a solid-state drive provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0013] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0014] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0015] To better understand the technical solution of this application, the relevant terms involved in the embodiments of this application will be explained below.

[0016] Host: The party that initiates the read / write request, such as the server CPU.

[0017] Write buffer: A temporary storage area before host data is written to non-volatile storage media (such as NAND flash memory).

[0018] Static Random-Access Memory (SRAM): High speed, precious resources, small capacity.

[0019] Dynamic Random Access Memory (DRAM): Faster speed, larger capacity, and relatively lower cost.

[0020] Programming: The operation of writing data to physical pages of a non-volatile storage medium (such as NAND flash memory).

[0021] Firmware (FW): Embedded software that runs on the SSD controller.

[0022] Write amplification: Write amplification is a very core underlying phenomenon in SSDs. It refers to the fact that the amount of physical data actually written to the NAND flash memory is much greater than the amount of logical data requested by the host for writing.

[0023] Sequential Write (SW): This refers to the operation mode in which the host continuously writes large blocks of data to the SSD, which usually achieves the highest bandwidth performance.

[0024] Reclaim Unit Handle (RUH): A logical handle on the host side that points to a data write area inside the SSD.

[0025] Quad-Level Cell (QLC): In NAND flash memory, each cell represents data by storing a different number of electrons. A quad-level cell means that each cell can store 4 bits.

[0026] Mainstream: A type of FDP data stream with a large data throughput.

[0027] Tributary: A type of FDP data stream with a smaller data throughput.

[0028] With the diversification of data center workloads, the Non-Volatile Memory Express (NVMe) standard introduced the FDP protocol. This protocol allows the host to distribute data to different physical areas (such as reclamation units) within the SSD through different RUHs based on the data's lifecycle (cold / hot) or application affiliation, thereby reducing write amplification (WAF) from an architectural perspective and extending the lifespan of high-density ESSDs such as Quad-Level Cell (QLC).

[0029] In this application embodiment, the write buffer strategy for FDP multi-stream scenarios includes dual-write mode and single-write mode. Specifically: dual-write mode refers to simultaneous data writing to SRAM and DRAM, while single-write mode refers to data writing only to DRAM.

[0030] In dual-write mode, when the host issues a write command, data is written to both SRAM and DRAM simultaneously. Subsequent programming writes to the non-volatile storage medium use SRAM as the data source for transmission; the SRAM buffer is released immediately after transmission is complete. Backup data in DRAM is only used in abnormal recovery scenarios such as program write failures. The advantage of dual-write mode is that programming write operations only consume SRAM read bandwidth, not DRAM bandwidth. The disadvantage is that each RUH requires an independent SRAM buffer. When the number of concurrent RUHs in FDP is large, the SRAM capacity requirement is extremely high, leading to a sharp increase in cost.

[0031] In single-write mode, when the host issues a write command, data is written only to DRAM. Subsequent programming writes to the NAND flash memory use DRAM as the data source for transmission; the DRAM buffer is released after the programming write is complete. The advantage of single-write mode is that it does not consume valuable SRAM resources. The disadvantage is that DRAM needs to handle both one write operation (host writes to DRAM) and one read operation (DRAM reads from NAND flash memory) simultaneously. This read / write concurrency consumes twice the DRAM bandwidth, becoming a performance bottleneck and impacting sequential write (SW) performance.

[0032] The flexible data placement multi-stream writing method provided in this application adopts a differentiated allocation strategy, using a single-write mode for "tributaries" and a dual-write mode for mainstreams. This not only solves the contradiction between SRAM resources and the number of RUHs in high-concurrency FDP scenarios and improves the utilization rate of SRAM and DRAM resources, but also ensures the sequential write performance of mainstreams, so that DRAM bandwidth does not become a bottleneck and the impact of tributary traffic on DRAM bandwidth is controllable.

[0033] Specifically, valuable SRAM resources are used to serve the first FDP data stream (e.g., the mainstream or high-throughput data stream) at all times; while inexpensive DRAM resources carry the second FDP data stream (e.g., the tributary or low-throughput data stream). This clear division of labor improves the overall utilization of storage resources.

[0034] In scenarios with a large number of RUHs, many secondary RUHs do not consume SRAM buffers, and SRAM only needs to serve a limited number of mainstream streams. This allows the SSD to support dozens or even hundreds of FDP streams without the SRAM capacity requirement increasing linearly with the number of RUHs, making the solution scalable. Thus, the conflict between SRAM resources and the number of RUHs in high-concurrency FDP scenarios is resolved.

[0035] Meanwhile, mainstream NAND programming operations use SRAM as the data source, which does not consume DRAM read bandwidth. Therefore, DRAM only needs to handle the host's write operations for mainstream data, and DRAM bandwidth will not become a limiting factor for mainstream sequential write (SW) performance, ensuring high throughput in high-volume scenarios. In this way, mainstream sequential write performance can be guaranteed, and DRAM bandwidth will not become a bottleneck.

[0036] Furthermore, since the data throughput of the tributary itself is small, even if the DRAM needs to handle both host writes and reads to non-volatile storage media simultaneously (one write and one read), the total bandwidth usage is limited. Meanwhile, by dynamically identifying the mainstream, it is ensured that high-traffic RUHs are always classified as "mainstream" and enjoy dual-write mode, preventing them from mistakenly entering single-write mode and dragging down performance. In this way, the impact of tributary traffic on DRAM bandwidth can be kept under control.

[0037] The flexible data placement multi-stream writing method provided in this application embodiment can be executed by a storage device, and more specifically, by a storage controller within the storage device. The storage controller may include a hardware scheduler and a processor. The storage device can be general-purpose flash storage (UFS) or a solid-state drive (SSD). SSDs include, but are not limited to, enterprise-grade SSDs (eSSDs) and consumer-grade SSDs (cSSDs). The storage controller can be a SSD controller.

[0038] The flexible data placement and multi-stream writing method provided in the embodiments of this application is described below with reference to the accompanying drawings. Figure 1 This is a flowchart of the flexible data placement and multi-stream writing method provided in the embodiments of this application. (Refer to...) Figure 1 The flexible data placement multi-stream writing method provided in this application includes: Step 110: Obtain the first flexible data placement data stream and the second flexible data placement data stream from multiple flexible data placement data streams; In this embodiment, each of the plurality of flexible data placement data streams corresponds to a RUH, and different flexible data placement data streams correspond to different RUHs. The RUHs in this embodiment can be used to label FDP data streams.

[0039] The first flexible data placement (FDP) data stream can be a flexible data placement data stream with a data throughput greater than a first threshold. The second flexible data placement (FDP) data stream can be a flexible data placement data stream with a data throughput less than a second threshold.

[0040] In the embodiments of this application, the first flexible data placement data stream and the second flexible data placement data stream can be obtained in various different ways. The number of the first flexible data placement data stream can be at least one, for example, two or more; the number of the second flexible data placement data stream can be at least one, for example, two or more.

[0041] In some embodiments of this application, the step 110 of obtaining the first flexible data placement data stream and the second flexible data placement data stream from multiple flexible data placement data streams may include: calculating the cumulative data throughput corresponding to each RUH within a preset sliding time window; wherein the preset sliding time window is divided into n time slices, and the cumulative data throughput of each RUH is obtained based on the data volume for n time moments; the n time moments correspond to the n time slices, and each of the n time moments is a time moment within one of the n time slices; n is a positive integer greater than 1; based on the cumulative data throughput corresponding to each RUH within the preset sliding time window, the first flexible data placement data stream and the second flexible data placement data stream are identified from multiple flexible data placement data streams. For example, a specified number of data streams can be selected as the first flexible data placement data stream according to the order of cumulative data throughput corresponding to each RUH from high to low, and the remaining data streams can all be used as the second flexible data placement data stream. For example, data streams with cumulative data throughput exceeding a preset threshold can be designated as the first flexible data placement data stream, while those with cumulative data throughput not exceeding the preset threshold can be designated as the second flexible data placement data stream. In this way, by using a sliding time window to calculate the cumulative data throughput for each RUH, the first and second flexible data placement data streams can be identified more accurately from multiple flexible data placement data streams. Specifically, compared to recording instantaneous peak values ​​or total cumulative volume, using a sliding window can accurately reflect the actual bandwidth usage of the data stream corresponding to the RUH at the current moment, avoiding the situation where data streams corresponding to RUHs with historically high traffic but currently silent traffic occupy mainstream bandwidth for extended periods.

[0042] The method of calculating the cumulative data throughput of each RUH within a preset sliding time window can include: determining n target data volumes for any RUH; wherein the i-th target data volume is determined based on the data volume of the RUH at the i-th time among the n time points and the target parameter at the i-th time point; the target parameter at the i-th time point is related to the time decay coefficient and the time slice interval between the i-th time point and the current time point; wherein i is a positive integer and i≤n; and the sum of the n target data volumes is taken as the cumulative data throughput of the RUH within the preset sliding time window. Thus, by considering the time decay coefficient and the time slice interval, the cumulative data throughput of each RUH within the preset sliding time window can be obtained more accurately, thereby facilitating the rapid identification of the first FDP data stream and the second FDP data stream. Specifically, when a tributary suddenly experiences a large surge in flow, its cumulative data throughput will increase exponentially with the advancement of the time slice, quickly reaching the "mainstream" threshold; when the mainstream suddenly stops flowing, its cumulative data throughput will rapidly decline, relinquishing its mainstream status.

[0043] The following example illustrates this. In this embodiment, a ring sliding window can be maintained for each active RUH to record write behavior over a recent period. Compared to recording instantaneous peak values ​​or total cumulative volume, the sliding window can accurately reflect the actual bandwidth usage of the RUH at the current moment, preventing RUHs with "extremely high historical traffic but currently inactive" from occupying mainstream bandwidth for extended periods.

[0044] Window duration (T): Set a fixed time window (e.g., T = 1 second or T = 1000 IO commands). The window slides forward over time, discarding expired old data points.

[0045] Acquisition granularity (Δt): Divide the window into several small time slices (e.g., each time slice is 10ms), and record the total number of bytes written to the RUH within each time slice.

[0046] Within a sliding window, the contribution of traffic at different points in time to determining "whether the current flow is mainstream" varies. This invention introduces an exponential decay weighting algorithm, where traffic closer to the current moment has a higher weight.

[0047] The formula for calculating the cumulative data throughput for each RUH within the sliding time window is as follows: Weighted _ Throughputi ( t )=

[0048] Where t is the current time; i is the RUH number; α is the decay coefficient (configurable, typical value 0.1~0.5), which controls the forgetting rate of historical data; and k is the number of time slices from the current time. Weighted _ Throughputi ( t Let be the cumulative data throughput of the i-th RUH at the current time t. For the data stream of the i-th RUH.

[0049] In some embodiments of this application, the number of the first flexible data placement data streams is K, where K is a positive integer greater than 1. The value of K is determined based on the current free SRAM capacity, the safety margin reserved in the SRAM, and the SRAM capacity required for each first flexible data placement data stream, and the value of K changes with the change in the current free SRAM capacity. Thus, compared to the traditional method of using a fixed number of first flexible data placement data streams, the embodiments of this application can select an appropriate value of K according to the actual situation of the current storage resources, ensuring that the number of first flexible data placement data streams matches the current actual situation and can be dynamically adjusted with changes in SRAM capacity.

[0050] In one example, the value of K can be calculated using the following formula.

[0051]

[0052] Among them, SRAM free This represents the current free SRAM capacity; SRAM reserve The safety margin reserved for the system; Buffer_Size_per_RUH is the size of the SRAM buffer required for each first FDP data stream.

[0053] In actual operation, when there is a lot of free SRAM, the value of K can be increased to allow more high-volume RUHs to enjoy the high-performance acceleration of dual-write mode.

[0054] When SRAM is scarce, the value of K can be actively reduced, and only the data stream corresponding to RUH with the highest throughput can be retained as the first FDP data stream (mainstream), while all others are downgraded to single-write mode that consumes DRAM, ensuring that the system does not report an error due to SRAM exhaustion.

[0055] Step 120: Write the first flexible data placement data stream into SRAM and DRAM simultaneously, and use the SRAM as a data source for data transmission when performing a programming write to the non-volatile storage medium for the first flexible data placement data stream. Step 130: Write the second flexible data placement data stream only into the DRAM, and use the DRAM as a data source for data transmission when performing a programming write for the second flexible data placement data stream to a non-volatile storage medium; In this embodiment, in a scenario where multiple FDP data streams are written, a first flexible data placement data stream and a second flexible data placement data stream are obtained from multiple flexible data placement data streams. Different write buffering strategies are applied to the first and second flexible data placement data streams: the first flexible data placement data stream is simultaneously written to both Static Random Access Memory (SRAM) and Dynamic Random Access Memory (DRAM), and when programming the first flexible data placement data stream to a non-volatile storage medium, the SRAM is used as the data source for data transmission; the second flexible data placement data stream is written only to the DRAM, and when programming the second flexible data placement data stream to a non-volatile storage medium, the DRAM is used as the data source for data transmission. In this way, different write buffering strategies can be used for different types of FDP data streams, simultaneously considering SRAM resource consumption and DRAM bandwidth bottlenecks, improving storage resource utilization, and solving the problem of low storage resource utilization caused by using the same write buffering strategy for each RUH-corresponding data stream in FDP multi-stream scenarios.

[0056] In this embodiment, after dividing the data streams corresponding to each RUH into a first FDP data stream and a second FDP data stream, and adopting a dual-write mode for the first FDP data stream and a single-write mode for the second FDP data stream, the write buffering strategy of some RUH-corresponding data streams can be switched. For example, the write buffering strategy of the data stream corresponding to one RUH can be switched from a single-write mode to a dual-write mode, or the write buffering strategy of the data stream corresponding to another RUH can be switched from a dual-write mode to a single-write mode.

[0057] In some embodiments of this application, the switching of the write buffering strategy can be determined based on the cumulative data throughput of the data streams corresponding to each RUH. For example, for a data stream corresponding to a RUH that originally used a single-write mode, if the cumulative data throughput of the data stream corresponding to that RUH exceeds a first threshold, it can be switched to a dual-write mode. As another example, for a data stream corresponding to another RUH that originally used a dual-write mode, if the cumulative data throughput of the data stream corresponding to that RUH is lower than a second threshold, it can be switched to a single-write mode. The second threshold is less than the first threshold. If the cumulative data throughput of the data stream corresponding to the RUH is between the first and second thresholds, the original write buffering strategy can be maintained to ensure the stability of buffer resource allocation.

[0058] In other embodiments of this application, considering the limited SRAM resources, a first selected data stream can be selected from multiple first flexible data placement data streams, and the first selected data stream can be switched from dual-write mode to single-write mode. In one embodiment, the number of first flexible data placement data streams is M, where M is a positive integer greater than 1; after writing the first flexible data placement data stream into SRAM and DRAM simultaneously in step 120, the flexible data placement multi-stream writing method provided in this application further includes: obtaining SRAM utilization; in response to the SRAM utilization being greater than a first preset value, selecting the data stream with the lowest data throughput per unit time from the M first flexible data placement data streams as the first selected data stream; the first selected data stream is the data stream corresponding to the first RUH; releasing the SRAM resources occupied by the data stream corresponding to the first RUH, writing the data stream corresponding to the first RUH only into the DRAM, and using the DRAM as a data source for data transmission when performing programming writes to the non-volatile storage medium for the data stream corresponding to the first RUH in the subsequent case. In this way, the number of data streams for the first flexible data placement can be flexibly adjusted based on SRAM utilization, ensuring that the system does not report errors or refuse service due to SRAM exhaustion when SRAM resources are scarce.

[0059] The SRAM utilization rate can be obtained within a monitoring period (e.g., 100μs). The first preset value can be 80%. SRAM utilization is the percentage of the currently allocated SRAM buffer to the total SRAM capacity. After switching the data stream corresponding to the first RUH to single-write mode, the SRAM utilization rate can be rechecked after one monitoring period. If it is still higher than 80%, the next "mainstream" with the lowest traffic can be downgraded until the SRAM utilization rate falls back to a safe range (≤80%).

[0060] In other embodiments of this application, when SRAM resources are relatively abundant, a second selected data stream can be selected from multiple second flexible data placement data streams, and the second selected data stream can be switched from single-write mode to dual-write mode. In one embodiment, the number of second flexible data placement data streams is P, where P is a positive integer greater than 1; after writing the second flexible data placement data stream only into DRAM in step 130, the flexible data placement multi-stream writing method provided in this application further includes: obtaining DRAM bandwidth utilization; in response to the DRAM bandwidth utilization being greater than a second preset value and the SRAM utilization being less than a first preset value, selecting the data stream with the highest data throughput per unit time from the P second flexible data placement data streams as the second selected data stream; the second selected data stream is the data stream corresponding to the second RUH; allocating SRAM resources to the data stream corresponding to the second RUH, writing the data stream corresponding to the second RUH into the SRAM and the DRAM simultaneously, and using the SRAM as a data source for data transmission when performing programming write to the data stream corresponding to the second RUH on a non-volatile storage medium in the subsequent case. In this way, the number of data streams for the second flexible data placement can be flexibly adjusted based on DRAM bandwidth utilization, ensuring that SRAM can be used to offload DRAM when SRAM resources are relatively abundant, thus ensuring that DRAM does not become a bottleneck for system performance.

[0061] The DRAM bandwidth utilization rate can be obtained within a monitoring period (e.g., 100μs). The second preset value can be 75%. DRAM bandwidth utilization rate is the percentage of the current total DRAM read / write bandwidth to the maximum theoretical bandwidth of DRAM. After switching the data stream corresponding to the second RUH to dual-write mode, the DRAM bandwidth utilization rate can be rechecked after one monitoring period. If the DRAM bandwidth utilization rate is still higher than 75%, the next "branch" with the largest traffic can be upgraded until the DRAM bandwidth utilization rate falls back to the safe range (≤75%).

[0062] As shown above, the actual utilization rates of two key resources can be monitored in real time: SRAM utilization and DRAM bandwidth utilization. When a resource approaches saturation, automatic "backpressure" is applied to adjust the write buffer strategy of the data stream corresponding to each RUH (Real-Time Buffer) to bring the resource utilization rate back to a safe range. In this scheme, "backpressure" means that when the utilization rate of a resource (SRAM or DRAM) reaches a preset high water level, proactive measures are taken to suppress further consumption of that resource, while simultaneously diverting some of the load to another type of resource, forming a "pressure reverse transmission" adjustment mechanism.

[0063] Furthermore, if SRAM utilization is less than the first preset value and DRAM bandwidth utilization is less than the second preset value, no active adjustment needs to be performed, and the write buffer strategy for the data stream corresponding to each RUH remains unchanged to avoid unnecessary switching overhead. If SRAM utilization is greater than the first preset value and DRAM bandwidth utilization is greater than the second preset value, considering that SRAM resources are usually scarcer and more difficult to expand than DRAM bandwidth, a "degradation" operation (releasing SRAM) can be performed first. At the same time, newly arriving write commands for low-priority RUHs are temporarily suspended (entered into the waiting queue) and processing resumes after any resource falls back to a safe range.

[0064] In this embodiment, the write buffer strategy of only one RUH-corresponding data stream can be adjusted per monitoring cycle. If multiple streams need to be adjusted, it can be done gradually over multiple cycles. Simultaneously, after the write buffer strategy of a data stream corresponding to a certain RUH is adjusted, it can enter a cooling state, and will not be reversed within N monitoring cycles (e.g., N=10) to avoid frequent jittering of the write buffer strategy for that RUH. Furthermore, if the write buffer strategy adjustment operation performed in this cycle is a switch from dual-write mode to single-write mode, the next cycle will preferentially attempt to continue switching from dual-write mode to single-write mode or maintain the current state, rather than immediately switching from single-write mode to dual-write mode. When DRAM is under continuous high voltage for several consecutive cycles and SRAM has sufficient capacity, it is permissible to resume switching from single-write mode to dual-write mode.

[0065] Figure 2 This is a flowchart of the flexible data placement and multi-stream writing method provided in the embodiments of this application. (Refer to...) Figure 2 The flexible data placement multi-stream writing method provided in this application includes: Step 210: Determine the target data stream from multiple flexible data placement data streams; In some embodiments, step 210, determining the target data stream from multiple flexible data placement data streams, may include: obtaining at least one of the number of pending write commands in the submission queue corresponding to each RUH and the total data volume of the pending write commands; in response to the number of pending write commands being greater than a first threshold, or the total data volume of the pending write commands being greater than a second threshold, determining the flexible data placement data stream corresponding to the first target RUH among the multiple flexible data placement data streams as the target data stream; the first target RUH is the RUH corresponding to the submission queue; Specifically, the firmware can directly sense the status of the IO command queue issued by the host and use the queue depth as a leading indicator of traffic.

[0066] Implementation principle: In the NVMe protocol, the host sends commands to the SSD through the Submission Queue (SQ). The number of pending write commands (i.e., the number of pending commands) in the SQ corresponding to each RUH can be monitored in real time, as well as the total data volume of these commands.

[0067] Prediction logic: Set a prediction threshold QD_Th (e.g., pending data volume > 4MB, or pending commands > 16). When the pending data volume of a certain RUH instantaneously exceeds QD_Th, even if the statistical traffic of that RUH within the current sliding window has not yet reached the "primary scalability threshold," it is marked as "pre-primary scalability" in advance. In this way, SQ depth reflects the "subjective intent" of the host, several microseconds to milliseconds earlier than the "statistics of written data," allowing SRAM resources to be allocated before a large amount of data actually reaches the SSD controller.

[0068] In other embodiments, step 210, which involves determining the target data stream from a plurality of flexible data placement data streams, may include: obtaining a second target RUH carrying a target traffic level label; and determining the flexible data placement data stream corresponding to the second target RUH from the plurality of flexible data placement data streams as the target data stream.

[0069] The FDP protocol allows hosts to pass data lifecycle and access patterns via the RUH attribute. This alternative extends this channel by making predictions through parsing additional semantics carried by the host.

[0070] Implementation principle: When a host creates or configures a RUH, in addition to specifying the physical zone (Reclaim Unit), the host can also carry the expected traffic level label of the RUH through vendor unique commands or reuse existing fields, such as: high bandwidth (HIGH_BANDWIDTH) and background (BACKGROUND).

[0071] Prediction logic: For RUHs carrying high-bandwidth tags, dual-write mode is proactively allocated upon the arrival of their first write command. For RUHs without tags or with tags as background, single-write mode is allocated by default. This is a "zero-latency" prediction, completely eliminating the time overhead of statistical identification. Simultaneously, this reflects system-level hardware and software collaboration (the host perceives the SSD resource status and provides prompts).

[0072] Step 220: Allocate SRAM resources for the target data stream and start a timeout timer; The preset timing period for the timeout timer can be 100μs.

[0073] Step 230: In response to the target data stream being identified as a first flexible data placement data stream within the preset time period of the timeout timer, the SRAM resources allocated to the target data stream continue to be occupied. Step 240: In response to the target data stream not being identified as the first flexible data placement data stream within the preset timeout period of the timeout timer, the SRAM resources allocated to the target data stream are released.

[0074] If the actual weighted throughput of the target data stream corresponding to the first target RUH or the second target RUH does reach the preset standard before the timer expires, it is officially confirmed as the first FDP data stream ("mainstream") and continues to occupy SRAM. If the first threshold is not reached (prediction error), the occupied SRAM resources are released, the system reverts to single-write mode, and this misjudgment is recorded for self-calibration of subsequent prediction thresholds.

[0075] Step 250: Obtain the first flexible data placement data stream and the second flexible data placement data stream from multiple flexible data placement data streams; Step 260: Simultaneously write the first flexible data placement data stream into SRAM and DRAM, and use the SRAM as a data source for data transmission when performing a programming write to the non-volatile storage medium for the first flexible data placement data stream; Step 270: Write the second flexible data placement data stream only into the DRAM, and use the DRAM as a data source for data transmission when performing a programming write for the second flexible data placement data stream to a non-volatile storage medium; Each of the multiple flexible data placement data streams corresponds to a RUH, and different flexible data placement data streams correspond to different RUHs.

[0076] In the embodiments of this application, different write buffering strategies can be adopted for different types of FDP data streams, which can simultaneously take into account SRAM resource consumption and DRAM bandwidth bottleneck, improve the utilization of storage resources, and solve the problem that the storage resource utilization is low in the FDP multi-stream scenario due to the use of the same write buffering strategy for each RUH corresponding data stream.

[0077] Furthermore, this application's embodiments introduce a predictive mechanism to anticipate the target data stream before the traffic peak arrives and complete buffer resource allocation in advance. SRAM resources can be allocated before the first FDP data stream is identified. Thus, even in scenarios with a sudden traffic burst, the first FDP data stream can avoid briefly operating in single-write mode before being identified, preventing instantaneous DRAM congestion.

[0078] Figure 3 This is a flowchart illustrating another flexible data placement and multi-stream writing method provided in this application embodiment. (Refer to...) Figure 3 The flexible data placement multi-stream writing method provided in this application embodiment may include the following processes: Step 1: Monitor the information of the data stream corresponding to each RUH. This information includes, but is not limited to: write frequency, single write data volume, cumulative throughput, and timestamp. Specifically: write frequency refers to the number of write commands per unit time; single write data volume refers to the number of sectors / bytes written each time; cumulative throughput refers to the total amount of data written within the sliding time window; and the timestamp can refer to the time of the most recent write (used to determine if the stream is still active).

[0079] Step 2: Perform mainstream recognition periodically (e.g., every 1 second or after processing N commands) using mainstream recognition algorithms.

[0080] Among them, the mainstream identification algorithm can adopt the "Top-K" strategy, that is, sorting according to the cumulative throughput of the data streams corresponding to RUHs, and selecting the top K RUHs as the mainstream (K is configurable, with typical values ​​of 1-4). Weighting factor: A decay factor can be introduced to make the weight of recent traffic higher than that of historical traffic, so as to adapt to changes in traffic patterns.

[0081] The mainstream identification algorithm can also adopt an absolute threshold strategy. That is, when the data throughput of the data stream corresponding to RUH exceeds a preset threshold, it is marked as mainstream.

[0082] Step 3: Based on the mainstream identification results, dynamically allocate write buffer strategies for the data stream corresponding to each RUH.

[0083] The write buffer strategy includes dual-write mode (SRAM and DRAM dual-write) and single-write mode (DRAM only write).

[0084] In dual-write mode, when a write command arrives, data is written to both the SRAM buffer and the DRAM buffer simultaneously; during NAND programming (Program) writing, SRAM is used as the data source; after the programming write transfer is completed, the SRAM buffer is released immediately; the data in the DRAM buffer is retained for abnormal recovery scenarios.

[0085] In single-write mode, when a write command arrives, data is written only to the DRAM buffer; during NAND programming, DRAM is used as the data source; after programming is completed, the DRAM buffer is released.

[0086] Step 4: For the data stream corresponding to a RUH, control the dynamic switching between dual-write mode and single-write mode for the data stream corresponding to this RUH.

[0087] When the type of data stream corresponding to the RUH changes (e.g., a tributary suddenly becomes the new mainstream), smooth switching is supported. Specifically, pending commands can be processed before mode switching; after mode switching, newly arriving write commands are buffered according to the new mode. Hysteresis can be introduced during the switching process to prevent frequent ping-pong switching.

[0088] This application proposes a hybrid write buffer allocation strategy. In a multi-stream FDP scenario, the data throughput of each RUH (Return Hour) data stream exhibits a significant long-tail distribution. That is, a small number of RUHs correspond to data streams (mainstream or first FDP data streams) that carry the majority of write traffic, while a large number of RUHs correspond to data streams (tributary or second FDP data streams) that carry only sporadic traffic. Based on this, this application adopts a dual-write mode for the mainstream (first FDP data stream) to ensure that it is not limited by DRAM bandwidth and achieves high-throughput sequential writes; and adopts a single-write mode for the tributary (second FDP data stream) to save valuable SRAM resources. At the same time, because its traffic is small, the impact of DRAM bandwidth contention is limited.

[0089] Please see Figure 4 , Figure 4 This is a structural block diagram of a data writing device provided in an embodiment of this application. For example... Figure 4 As shown in the figure, this application embodiment provides a data writing device 400, which includes an acquisition module 410 and a processing module 420.

[0090] The acquisition module 410 is used to acquire a first flexible data placement data stream and a second flexible data placement data stream from multiple flexible data placement data streams; The processing module 420 is configured to simultaneously write the first flexible data placement data stream into both static random access memory (SRAM) and dynamic random access memory (DRAM), and use the SRAM as a data source for data transmission when performing a programming write operation on the first flexible data placement data stream to a non-volatile storage medium; and to write the second flexible data placement data stream only into the DRAM, and use the DRAM as a data source for data transmission when performing a programming write operation on the second flexible data placement data stream to a non-volatile storage medium. Each of the multiple flexible data placement data streams corresponds to a recycling unit handle (RUH), and different flexible data placement data streams correspond to different RUHs.

[0091] In this embodiment, in a scenario where multiple FDP data streams are written, a first flexible data placement data stream and a second flexible data placement data stream are obtained from multiple flexible data placement data streams. Different write buffering strategies are applied to the first and second flexible data placement data streams: the first flexible data placement data stream is simultaneously written to both Static Random Access Memory (SRAM) and Dynamic Random Access Memory (DRAM), and when programming the first flexible data placement data stream to a non-volatile storage medium, the SRAM is used as the data source for data transmission; the second flexible data placement data stream is written only to the DRAM, and when programming the second flexible data placement data stream to a non-volatile storage medium, the DRAM is used as the data source for data transmission. In this way, different write buffering strategies can be used for different types of FDP data streams, simultaneously considering SRAM resource consumption and DRAM bandwidth bottlenecks, improving storage resource utilization, and solving the problem of low storage resource utilization caused by using the same write buffering strategy for each RUH-corresponding data stream in FDP multi-stream scenarios.

[0092] In some embodiments, during the process of acquiring a first flexible data placement data stream and a second flexible data placement data stream from multiple flexible data placement data streams, the acquisition module 410 is specifically used for: The cumulative data throughput of each RUH within a preset sliding time window is calculated. The preset sliding time window is divided into n time slices, and the cumulative data throughput of each RUH is based on the data volume at n time points. Each of the n time points corresponds to one of the n time slices, and each of the n time points is a time within one of the n time slices. n is a positive integer greater than 1. Based on the cumulative data throughput of each RUH within the preset sliding time window, the first flexible data placement data stream and the second flexible data placement data stream are identified from multiple flexible data placement data streams.

[0093] In some embodiments, during the process of calculating the cumulative data throughput corresponding to each RUH within a preset sliding time window, the acquisition module 410 is specifically used for: For any RUH, n target data volumes are determined; wherein, the i-th target data volume is determined based on the data volume corresponding to the i-th time of the RUH in the n time periods and the target parameter corresponding to the i-th time period; the target parameter corresponding to the i-th time period is related to the time decay coefficient and the number of time slice intervals between the i-th time period and the current time period; wherein, i is a positive integer and i≤n; The sum of the n target data volumes is taken as the cumulative data throughput corresponding to the RUH within the preset sliding time window.

[0094] In some embodiments, the number of the first flexible data placement data streams is K, where K is a positive integer greater than 1; the value of K is determined based on the current free SRAM capacity, the safety margin reserved in SRAM, and the SRAM capacity required for each first flexible data placement data stream, and the value of K changes with the change of the current free SRAM capacity.

[0095] In some embodiments, the data writing apparatus provided in this application further includes a determining module. The determining module is configured to determine a target data stream from the multiple flexible data placement data streams before the acquiring module acquires a first flexible data placement data stream and a second flexible data placement data stream from the multiple flexible data placement data streams. The processing module is further configured to allocate SRAM resources to the target data stream and start a timeout timer; in response to the target data stream being identified as the first flexible data placement data stream within a preset time period of the timeout timer, continue to occupy the SRAM resources allocated to the target data stream; in response to the target data stream not being identified as the first flexible data placement data stream within the preset time period of the timeout timer, release the SRAM resources allocated to the target data stream.

[0096] In some embodiments, during the process of determining a target data stream from multiple flexible data placement data streams, the determining module is specifically used for: Obtain at least one of the following: the number of pending write commands in the submission queue corresponding to each RUH and the total data volume of the pending write commands; in response to the number of pending write commands being greater than a first threshold, or the total data volume of the pending write commands being greater than a second threshold, determine the flexible data placement data stream corresponding to the first target RUH in the plurality of flexible data placement data streams as the target data stream; the first target RUH is the RUH corresponding to the submission queue; or, Obtain a second target RUH carrying the expected traffic level label; determine the flexible data placement data stream corresponding to the second target RUH among the multiple flexible data placement data streams as the target data stream.

[0097] In some embodiments, the number of the first flexible data placement data streams is M, where M is a positive integer greater than 1; The acquisition module is further configured to: acquire the SRAM utilization rate after the processing module simultaneously writes the first flexible data placement data stream into SRAM and DRAM; The processing module is further configured to: in response to the SRAM utilization rate being greater than a first preset value, select the data stream with the lowest data throughput per unit time from the M first flexible data placement data streams as the first selected data stream; the first selected data stream is the data stream corresponding to the first RUH; release the SRAM resources occupied by the data stream corresponding to the first RUH, write the data stream corresponding to the first RUH only into the DRAM, and use the DRAM as the data source for data transmission when performing programming write to the non-volatile storage medium for the data stream corresponding to the first RUH in the subsequent case.

[0098] In some embodiments, the number of the second flexible data placement data streams is P, where P is a positive integer greater than 1; the acquisition module is further configured to: acquire the DRAM bandwidth utilization rate after the processing module writes the second flexible data placement data streams only into DRAM; The processing module is further configured to: respond to the DRAM bandwidth utilization being greater than a second preset value and the SRAM utilization being less than a first preset value, select the data stream with the highest data throughput per unit time from P second flexible data placement data streams as the second selected data stream; the second selected data stream is the data stream corresponding to the second RUH; allocate SRAM resources to the data stream corresponding to the second RUH, write the data stream corresponding to the second RUH into the SRAM and the DRAM simultaneously, and use the SRAM as the data source for data transmission when performing programming writes to the non-volatile storage medium for the data stream corresponding to the second RUH in the subsequent case.

[0099] The data writing device provided in this application embodiment can implement the various processes implemented in the above method embodiments, and will not be described again here to avoid repetition.

[0100] like Figure 5As shown in the illustration, this application embodiment also provides a storage controller 500. The storage controller 500 may be a solid-state drive controller. The storage controller 500 includes a processor 510 and a memory 520, wherein the memory 520 stores a program or instructions, which, when executed by the processor 510, implement the steps of any of the methods described above. For example, when the program is executed by the processor 510, it performs the following process: obtaining a first flexible data placement data stream and a second flexible data placement data stream from a plurality of flexible data placement data streams; simultaneously writing the first flexible data placement data stream into both static random access memory (SRAM) and dynamic random access memory (DRAM), and using the SRAM as a data source for data transmission when performing a programming write to a non-volatile storage medium for the first flexible data placement data stream; writing the second flexible data placement data stream only into the DRAM, and using the DRAM as a data source for data transmission when performing a programming write to a non-volatile storage medium for the second flexible data placement data stream; wherein each of the plurality of flexible data placement data streams corresponds to a recycling unit handle (RUH), and different flexible data placement data streams correspond to different RUHs. In this way, different write buffering strategies can be adopted for different types of FDP data streams, which can simultaneously take into account SRAM resource consumption and DRAM bandwidth bottleneck, improve the utilization of storage resources, and solve the problem of low storage resource utilization caused by the same write buffering strategy for each RUH data stream in FDP multi-stream scenarios.

[0101] Figure 6 This is a schematic diagram of a storage device provided in an embodiment of this application. The storage device includes, but is not limited to, cSSD, eSSD, and UFS. (Refer to...) Figure 6 The storage device 600 provided in this application embodiment includes a storage controller, which can be any of the storage controllers described above, such as... Figure 5 The storage controller in the system.

[0102] This application also provides a computer-readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of various embodiments of the flexible data placement multi-stream writing method and achieve the same technical effect. To avoid repetition, these steps will not be repeated here.

[0103] The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0104] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0105] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.

[0106] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0107] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0108] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A flexible data placement and multi-stream writing method, characterized in that, Performed by the storage controller, the method includes: Obtain the first flexible data placement data stream and the second flexible data placement data stream from multiple flexible data placement data streams; The first flexible data placement data stream is simultaneously written into both static random access memory (SRAM) and dynamic random access memory (DRAM), and the SRAM is used as the data source for data transmission when a programming write for the first flexible data placement data stream is performed on a non-volatile storage medium. The second flexible data placement data stream is written only into the DRAM, and the DRAM is used as the data source for data transmission when a programming write for the second flexible data placement data stream is performed to a non-volatile storage medium; Each of the multiple flexible data placement data streams corresponds to a recycling unit handle (RUH), and different flexible data placement data streams correspond to different RUHs.

2. The method according to claim 1, characterized in that, The step of obtaining the first flexible data placement data stream and the second flexible data placement data stream from multiple flexible data placement data streams includes: The cumulative data throughput of each RUH within a preset sliding time window is calculated. The preset sliding time window is divided into n time slices, and the cumulative data throughput of each RUH is obtained based on the data volume at n time points. The n time points correspond to the n time slices, and each of the n time points is a time within one of the n time slices. n is a positive integer greater than 1. Based on the cumulative data throughput of each RUH within the preset sliding time window, the first flexible data placement data stream and the second flexible data placement data stream are identified from multiple flexible data placement data streams.

3. The method according to claim 2, characterized in that, The cumulative data throughput corresponding to each RUH within the preset sliding time window includes: For any RUH, n target data volumes are determined; wherein, the i-th target data volume is determined based on the data volume corresponding to the i-th time of the RUH in the n time periods and the target parameter corresponding to the i-th time period; the target parameter corresponding to the i-th time period is related to the time decay coefficient and the number of time slice intervals between the i-th time period and the current time period; wherein, i is a positive integer and i≤n; The sum of the n target data volumes is taken as the cumulative data throughput corresponding to the RUH within the preset sliding time window.

4. The method according to claim 1, characterized in that, The number of the first flexible data placement data streams is K, where K is a positive integer greater than 1. The value of K is determined based on the current free SRAM capacity, the safety margin reserved in SRAM, and the SRAM capacity required for each first flexible data placement data stream. The value of K changes with the change of the current free SRAM capacity.

5. The method according to any one of claims 1-4, characterized in that, Before obtaining the first flexible data placement data stream and the second flexible data placement data stream from multiple flexible data placement data streams, the method further includes: Determine the target data stream from multiple flexible data placement data streams; Allocate SRAM resources for the target data stream and start a timeout timer; In response to the target data stream being identified as the first flexible data placement data stream within the preset timeout period of the timeout timer, the SRAM resources allocated to the target data stream continue to be occupied; If the target data stream is not identified as the first flexible data placement data stream within the preset timeout period of the timeout timer, the SRAM resources allocated to the target data stream are released.

6. The method according to claim 1, characterized in that, The step of determining the target data stream from multiple flexible data placement data streams includes: Obtain at least one of the following: the number of pending write commands in the submission queue corresponding to each RUH and the total data volume of the pending write commands; in response to the number of pending write commands being greater than a first threshold, or the total data volume of the pending write commands being greater than a second threshold, determine the flexible data placement data stream corresponding to the first target RUH in the plurality of flexible data placement data streams as the target data stream; the first target RUH is the RUH corresponding to the submission queue; or, Obtain a second target RUH carrying the expected traffic level label; determine the flexible data placement data stream corresponding to the second target RUH among the multiple flexible data placement data streams as the target data stream.

7. The method according to claim 1, characterized in that, The number of the first flexible data placement data streams is M, where M is a positive integer greater than 1; after writing the first flexible data placement data streams into SRAM and DRAM simultaneously, the method further includes: Get SRAM utilization; In response to the SRAM utilization rate being greater than a first preset value, the data stream with the lowest data throughput per unit time is selected from M first flexible data placement data streams as the first selected data stream; the first selected data stream is the data stream corresponding to the first RUH; Release the SRAM resources occupied by the data stream corresponding to the first RUH, write the data stream corresponding to the first RUH only into the DRAM, and use the DRAM as the data source for data transmission when performing programming writes for the data stream corresponding to the first RUH to the non-volatile storage medium in the future.

8. The method according to claim 7, characterized in that, The number of the second flexible data placement data streams is P, where P is a positive integer greater than 1; after writing the second flexible data placement data streams only into DRAM, the method further includes: Obtain DRAM bandwidth utilization; In response to the DRAM bandwidth utilization being greater than a second preset value and the SRAM utilization being less than a first preset value, the data stream with the highest data throughput per unit time is selected from P second flexible data placement data streams as the second selected data stream; the second selected data stream is the data stream corresponding to the second RUH; SRAM resources are allocated for the data stream corresponding to the second RUH. The data stream corresponding to the second RUH is written into both the SRAM and the DRAM. In the subsequent case of performing programming write to the non-volatile storage medium for the data stream corresponding to the second RUH, the SRAM is used as the data source for data transmission.

9. A storage controller, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 8.

10. A storage device, characterized in that, The storage device includes the storage controller as described in claim 9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that, when executed, implement the method as described in any one of claims 1 to 8.