A method for processing data requests, an electronic device, and a medium.

By dynamically adjusting thresholds based on disk array status information, the problem of data request coordination in disk arrays is solved, achieving efficient response and stability, and adapting to data request processing under different load scenarios.

CN122489015APending Publication Date: 2026-07-31INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2026-06-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In a disk array, how can we coordinate multiple data requests issued by computing devices to achieve efficient response, especially in scenarios with high business load, array backend maintenance, and disk failure recovery, to avoid problems such as massive data request influx, backlog in the receiving queue, and overload of the backend disk?

Method used

By acquiring the status information of the disk array, the thresholds are dynamically adjusted to control the reception, reading and sending of data requests. The first status information reflects the execution status of the computing device request, the second status information reflects the execution status of the receiving queue, and the third status information reflects the disk load status. The first type of threshold, the second type of threshold and the third type of threshold are determined respectively to achieve phased control of data requests.

Benefits of technology

It effectively avoids the influx of massive data requests, backlog in the receiving queue, and overload of the backend disk, adapts to different load scenarios, achieves unified and coordinated processing of data requests, and improves the response efficiency and stability of the disk array.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489015A_ABST
    Figure CN122489015A_ABST
Patent Text Reader

Abstract

This application discloses a data request processing method, electronic device, and medium, relating to the field of computer technology. The method includes: responding to at least one data request sent by a computing device to a disk array; in the current threshold adjustment round, acquiring first state information, second state information, and third state information corresponding to the disk array at the current moment; determining a first type threshold, a second type threshold, and a third type threshold based on the first state information, the second state information, and the third state information; processing at least one data request based on the first type threshold, the second type threshold, and the third type threshold until a preset threshold adjustment condition is met, entering the next threshold adjustment round to reconfirm the first type threshold, the second type threshold, and the third type threshold, until all data requests have been processed, and stopping the threshold adjustment operation. Through this application, unified and coordinated processing of multiple data requests is achieved from three stages: receiving requests, reading requests, and sending requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data request processing method, electronic device, and medium. Background Technology

[0002] Redundant Arrays of Independent Disks (RAID) are deployed between computing devices and backend physical disks, organizing multiple physical disks into one or more virtual disks while providing a standardized, unified block storage access interface for the computing devices. Read / write requests, Flush / FUA, UNMAP requests, and various disk management requests from the computing devices are transmitted sequentially through the computing device's operating system block layer, the Small Computer System Interface (SCSI) protocol layer, and the RAID driver layer to the RAID array. The RAID array then issues requests to the corresponding disks to execute underlying operations. Currently, with the increasing variety of disk types, RAID arrays may simultaneously connect solid-state drives (SSDs), hard disk drives (HDDs), and other different types of disks. These various disk types differ significantly in their concurrent throughput, read / write latency, and fault recovery characteristics. Furthermore, RAID arrays also need to perform routine background maintenance tasks such as array inspection, data reconstruction, consistency checks, and cache flushing. Therefore, in scenarios involving high business load, array backend maintenance, disk failure recovery, and multi-media hybrid networking, how to coordinate multiple data requests issued by computing devices and achieve efficient response to data requests is a current focus. Summary of the Invention

[0003] This application provides a data request processing method, electronic device, and medium to coordinate multiple data requests issued by a computing device and achieve efficient response to the data requests.

[0004] This application provides a data request processing method applied to a disk array, the method comprising: In response to at least one data request sent by the computing device to the disk array, the first state information, the second state information, and the third state information corresponding to the disk array at the current time are obtained in the current threshold adjustment round. The first state information is used to characterize the execution status of the data request sent by the computing device to the disk array, the second state information is used to characterize the execution status of the data request in the receiving queue corresponding to the computing device in the disk array, and the third state information is used to characterize the load status of the disk array. Based on the first state information, the second state information, and the third state information, the first type of threshold, the second type of threshold, and the third type of threshold are determined respectively. The first type of threshold is the maximum number of data requests received by the disk array from the computing device, the second type of threshold is the maximum number of data requests read from the receiving queue, and the third type of threshold is the maximum number of data requests sent to the disks in the disk array. Based on the first, second, and third thresholds, at least one data request is processed until the preset threshold adjustment conditions are met, and the next threshold adjustment round is entered. The first, second, and third thresholds are then reconfirmed based on new first, second, and third state information until all data requests have been processed, at which point the threshold adjustment operation stops.

[0005] This application also provides a data request processing apparatus applied to a disk array, comprising: The response module is used to respond to at least one data request sent by the computing device to the disk array, adjust the round at the current threshold, and obtain the first state information, the second state information and the third state information corresponding to the disk array at the current time. The first state information is used to characterize the execution status of the data request sent by the computing device to the disk array, the second state information is used to characterize the execution status of the data request in the receiving queue of the disk array corresponding to the computing device, and the third state information is used to characterize the load status of the disk array. The determination module is used to determine a first type of threshold, a second type of threshold, and a third type of threshold based on the first state information, the second state information, and the third state information, respectively. The first type of threshold is the maximum number of data requests received by the disk array from the computing device, the second type of threshold is the maximum number of data requests read from the receiving queue, and the third type of threshold is the maximum number of data requests sent to the disks in the disk array. The processing module is used to process at least one data request based on the first type of threshold, the second type of threshold, and the third type of threshold until the preset threshold adjustment conditions are met, and then enter the next threshold adjustment round. It is used to reconfirm the first type of threshold, the second type of threshold, and the third type of threshold based on the new first state information, the new second state information, and the new third state information, until all data requests have been processed and the threshold adjustment operation is stopped.

[0006] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described data request processing methods.

[0007] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described data request processing methods.

[0008] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described data request processing methods.

[0009] Through this application, the first state information characterizes the execution status of data requests sent by the computing device to the disk array, reflecting the data request pressure and processing pressure on the computing device side. The second state information characterizes the execution status of data requests in the receiving queue corresponding to the computing device in the disk array, reflecting the internal request relay pressure of the disk array. The third state information characterizes the load status of the disk array, reflecting the load processing capacity of the disks in the disk array. By combining the first, second, and third state information, each data request is processed, realizing phased control of data request reception, reading, and distribution. This helps to avoid problems such as massive data request influx, receiving queue backlog, and backend disk overload. It is suitable for scenarios with high business load, array backend operation and maintenance, disk failure recovery, and multi-media hybrid networking, and achieves unified and coordinated processing of each data request. Attached Figure Description

[0010] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart illustrating a data request processing method provided in an embodiment of this application; Figure 2 This is an application scenario diagram illustrating how a disk array control system processes data requests, as provided in an embodiment of this application. Figure 3 A schematic diagram of a three-level queue architecture from the driver layer to the backend disk provided for embodiments of this application; Figure 4 A schematic diagram illustrating the interrupt operation of a data request performed by a disk array according to an embodiment of this application; Figure 5 A schematic diagram of the structure of a data request processing device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0013] It should be noted that, in the description of this application, 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. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0014] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0015] It should be noted that the data request processing method provided in this embodiment of the invention can be executed by a data request processing device. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. The electronic device can be a server or a terminal. In this embodiment, the server can be a single server or a server cluster composed of multiple servers. The terminal in this embodiment can be a smartphone, personal computer, tablet computer, wearable device, or other intelligent hardware device such as an intelligent robot. The following method embodiments will use an electronic device as an example for explanation.

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

[0017] Figure 1 This is a flowchart of a data request processing method according to an embodiment of the present invention, applied to a disk array, for example, a controller in the disk array. Figure 1 As shown, the process includes: S101, in response to at least one data request sent by the computing device to the disk array, adjust the round at the current threshold and obtain the first state information, the second state information and the third state information corresponding to the disk array at the current time.

[0018] The first status information is used to characterize the execution status of the data request sent by the computing device to the disk array, the second status information is used to characterize the execution status of the data request in the receiving queue corresponding to the computing device in the disk array, and the third status information is used to characterize the load status of the disk array.

[0019] Specifically, a disk array is a storage system composed of multiple physical disks through virtualization technology. It can perform operations such as data storage, reading, verification, and fault reconstruction, and has caching, IO scheduling, and fault tolerance capabilities. For example, physical disks include one or more of the following based on the Non-Volatile Memory Express (NVMe) host controller interface specification: solid state drives (SSDs), SAS SSDs, SATA SSDs, SAS hard disk drives (HDDs), and SATA HDDs.

[0020] Data requests sent by computing devices to disk arrays include, but are not limited to, read requests, write requests, persistence requests, disk maintenance requests, verification requests, error recovery requests, and critical error events. Persistence requests include cache flush requests, forced unit access (FUA) requests, and requests with cache synchronization semantics. Disk maintenance requests include requests for inspection, rebuilding, consistency checks, cache flushing, and media scanning. Verification requests are used for verification reads / writes or verification updates in RAID levels with verification, such as RAID 5 and RAID 6.

[0021] The receive queue is used to cache data requests sent by the computing device. It is understood that the number of data requests in the receive queue is less than or equal to the number of data requests sent by the computing device.

[0022] The first status information reflects the data request pressure and processing pressure on the computing device side. For example, the first status information includes, but is not limited to, the number of cores sending data requests, the number of data requests sent by each core, the number of incomplete requests, the request type, the target virtual disk identifier, the request waiting time, the request timeout status, and the interrupted completion processing load. For example, after obtaining the above first status information, the disk array driver can report it to the disk array through command descriptors, shared state areas, registers, management messages, etc.

[0023] The second state information, serving as internal queue-side state data within the disk array, reflects the execution status of data requests cached in the receive queue, demonstrating the internal request relay pressure of the disk array. For example, the second state information includes, but is not limited to, queue information of the receive queue corresponding to the computing device, front-end command slot utilization, computing device request ID utilization, and the number of requests issued. The receive queue includes sub-queues corresponding to various request types, such as a data read queue, data write queue, persistence queue, management command queue, error recovery queue, and disk maintenance queue. Correspondingly, the queue information of the receive queue can include the queue depth and queue backlog status of each of the aforementioned sub-queues. For example, the disk array obtains the aforementioned second state information through the producer / consumer pointers, queue counters, command slots, and request ID allocation / release counts of each of the aforementioned sub-queues.

[0024] Third-state information is used to reflect the load and processing capacity of each disk in the disk array. For example, third-state information includes, but is not limited to, the number of requests in transit for each physical disk, the maximum allowed number of requests in transit, average response time, maximum response time, error status, NVMe queue group load, NVMe commit queue available depth, NVMe completion queue backlog, SAS / SATA request ID usage, and HDD command backlog. For example, third-state information is obtained when a disk request is issued, a request completes, a request times out, or an error is returned.

[0025] S102, based on the first state information, the second state information and the third state information, determine the first type threshold, the second type threshold and the third type threshold respectively.

[0026] The first threshold is the maximum number of data requests that the disk array can receive from computing devices; the second threshold is the maximum number of data requests that can be read from the receiving queue; and the third threshold is the maximum number of data requests that can be sent to the disks in the disk array.

[0027] Specifically, the first type of threshold is the upper limit of the maximum number of requests that the disk array can handle, which can also be understood as the upper limit of the total number of data requests that the receiving queue in the disk array can receive. Taking a first type of threshold of 200 as an example, it means that the disk array can receive a maximum of 200 data requests sent by the computing device at the same time, that is, it can cache a maximum of 200 data requests in the receiving queue.

[0028] The second type of threshold serves as the upper limit for scheduling the receive queue in the disk array. It is used to control the dequeue scheduling rate of the receive queue and prevent a large number of data requests from being retrieved from the receive queue in a short period of time from causing instantaneous overload of the backend disks. Taking a second type of threshold of 60 as an example, it means that the disk array can read a maximum of 60 data requests from the receive queue and send them to the backend disks for processing.

[0029] The third type of threshold serves as the execution limit for physical disks in a disk array, used to manage the underlying concurrent I / O pressure and prevent disk queue overflow, I / O timeout errors, etc. For example, a third type threshold of 20 means a maximum of 20 data requests can be sent to the backend physical disks. Here, the third type of threshold can be the execution limit for each disk in the disk array, or the sum of the execution limits for all disks.

[0030] It should be noted that the specific implementation of determining the first type of threshold, the second type of threshold, and the third type of threshold based on the first state information, the second state information, and the third state information will be described in subsequent embodiments, and will not be repeated here.

[0031] S103, based on the first type threshold, the second type threshold, and the third type threshold, process at least one data request until the preset threshold adjustment conditions are met, and enter the next threshold adjustment round to reconfirm the first type threshold, the second type threshold, and the third type threshold based on the new first state information, the new second state information, and the new third state information, until all data requests have been processed and the threshold adjustment operation is stopped.

[0032] Specifically, preset threshold adjustment conditions are used as the criteria for determining whether to switch to a new round of threshold adjustment.

[0033] For example, the preset threshold adjustment condition can be an event-triggered condition, a periodic adjustment, or a threshold-triggered adjustment condition. An event-triggered condition refers to triggering threshold adjustment when preset events such as request enqueueing, dequeueing, request delivery, or request completion occur in the disk array. A periodic adjustment refers to periodically adjusting the threshold according to a preset adjustment cycle. A threshold-triggered adjustment condition refers to real-time monitoring of parameters such as queue depth, request waiting time, number of commands in disk transit, IO response time, and error count; triggering threshold adjustment when any parameter exceeds its limit.

[0034] Of course, the preset threshold adjustment condition can also be a combination of the above-mentioned event triggering condition, periodic adjustment and threshold triggering adjustment condition. As long as any one of the above-mentioned event triggering condition, periodic adjustment and threshold triggering adjustment condition is met, it is determined that the preset threshold adjustment condition is met.

[0035] In one possible implementation, the stages for processing each data request include a request receiving stage, a request reading stage, and a request sending stage.

[0036] In the request receiving phase, which involves writing data requests into the receive queue, the writing of data requests from the computing device into the receive queue is controlled based on a first type of threshold. In the request reading phase, which involves reading data requests from the receive queue, the read operation of each data request in the receive queue is controlled based on a second type of threshold. In the request sending phase, which involves sending data requests read from the receive queue to the corresponding disk, the operation of sending data requests to the disk is controlled based on a third type of threshold.

[0037] In this embodiment, the first state information characterizes the execution status of data requests sent by the computing device to the disk array, reflecting the data request pressure and processing pressure on the computing device side. The second state information characterizes the execution status of data requests in the receiving queue corresponding to the computing device in the disk array, reflecting the internal request relay pressure of the disk array. The third state information characterizes the load status of the disk array, reflecting the load processing capacity of the disks in the disk array. By combining the first, second, and third state information, each data request is processed, realizing phased control of data request reception, reading, and distribution. This helps to avoid problems such as massive data request influx, receiving queue backlog, and backend disk overload. It is suitable for scenarios with high business load, array backend operation and maintenance, disk failure recovery, and multi-media hybrid networking, and achieves unified and coordinated processing of each data request.

[0038] In some embodiments, based on the foregoing embodiments, a target class threshold (i.e., a first class threshold, a second class threshold, or a third class threshold) is determined based on first state information, second state information, and third state information, specifically including the following method steps: a1 retrieves the request type corresponding to at least one data request.

[0039] Specifically, the request types can be read requests, data write requests, persistence requests, management command requests, error response requests, disk maintenance requests, and verification read / write requests, etc.

[0040] For example, the corresponding request type can be obtained by parsing the command identifier field in the data request.

[0041] a2, based on the first request type and the preset mapping relationship between the request type and the baseline threshold, determines the baseline threshold corresponding to the first request type.

[0042] The first request type is one of the request types corresponding to at least one data request.

[0043] For example, the higher the priority of the request type, the higher the corresponding baseline threshold. For instance, the baseline threshold for persistence requests is 64, the baseline threshold for error recovery requests is 48, the baseline threshold for data write requests is 25, and the baseline threshold for disk maintenance requests is 32.

[0044] a3. Based on the first state information, the second state information, and the third state information, determine the dynamic adjustment threshold corresponding to the first request type.

[0045] Specifically, the dynamic adjustment threshold is a floating correction threshold obtained by combining the first, second, and third state information. It is used to adjust the threshold based on the baseline threshold to adapt to real-time business congestion and load changes in the disk array. For example, when the disks in the disk array are fully loaded and congested, the dynamic adjustment threshold for data write requests is 10. Conversely, when the disk array is idle, the dynamic adjustment threshold for read requests is 80.

[0046] In one possible implementation, when the target class threshold is the third class threshold, a dynamically adjusted threshold corresponding to the first request type is determined based on the first state information, the second state information, and the third state information. This specifically includes the following steps: First, obtain the disk type of the disk to which the virtual disk corresponding to at least one data request is bound.

[0047] Specifically, the virtual disk corresponding to a data request refers to a logical virtual disk that the computing device can recognize. Each virtual disk is bound to one or more physical disks. For example, the data request issued by the computing device carries a virtual disk ID. By using the preset mapping relationship between virtual disk IDs and disks, the disk bound to the virtual disk corresponding to each data request can be determined, thereby determining the disk type of the bound disk.

[0048] For example, the disk type can be NVMe SSD, SAS SSD, SATA SSD, SAS HDD, SATAHDD, etc.

[0049] Then, based on each disk type, the first state information, the second state information, and the third state information, the dynamic adjustment threshold corresponding to the first request type is determined.

[0050] For example, when the disk type is NVMe SSD, the dynamic adjustment threshold corresponding to the first request type is determined based on the first state information representing the execution status of the request issued by the computing device, the second state information representing the execution status of the receiving queue (such as the queue depth of the receiving queue), and the third state information representing the disk load status (such as the number of NVMe queues, queue depth, queue group load, available depth of the submission queue, depth of the completion queue, etc.).

[0051] For example, when the overall disk array load is determined to be low based on the first, second, and third state information, the dynamic adjustment threshold corresponding to the data read / write request type is increased. Conversely, when the first state information indicates congestion of concurrent requests to the computing device, the second state information indicates a backlog in the receive queue, and the third state information indicates high disk load and increased response time, the dynamic adjustment threshold corresponding to the data read / write request type is decreased.

[0052] For example, when the disk type is SAS / SATA SSD, the dynamic adjustment threshold corresponding to the first request type is determined based on the first status information (such as the number of device request IDs and request ID utilization), the second status information (such as the number of requests in transit), and the third status information (such as response time and error return status). For instance, when the request ID utilization is low and the disk response time is normal, the dynamic adjustment threshold corresponding to the data read / write request type is increased. When the request ID utilization is too high, the disk returns a busy command, or the response time increases, the dynamic adjustment threshold corresponding to the data read / write request type is decreased. When the disk experiences command timeouts or returns abnormal errors, the dynamic adjustment threshold corresponding to the error recovery request type is increased.

[0053] For example, when the disk type is a mechanical HDD, the dynamic adjustment threshold corresponding to the first request type is determined based on the first state information, the second state information, and the third state information (such as the number of commands in transit, the maximum allowed number of commands in transit, the average response latency, the IO tail latency, and the resource consumption of background tasks). Because HDDs are constrained by mechanical seek and rotational latency performance, their concurrent handling capacity is limited. When the number of commands in transit on the HDD exceeds the limit, the response time increases, or the disk array is overloaded, the dynamic adjustment threshold corresponding to data read / write and disk maintenance requests is lowered. When a disk experiences a media error, command timeout, or abnormal link operation, the dynamic adjustment threshold corresponding to error recovery requests is retained or increased.

[0054] Considering the poor compatibility of different disk media types, such as differences in queue depth, concurrency throughput, and read / write characteristics, in this embodiment of the application, in scenarios where different types of disks coexist, the disk array dynamically adjusts the threshold of different disk types based on the disk type of the virtual disk bound to the data request, thereby improving the utilization rate of disk array storage hardware resources and avoiding resource waste.

[0055] In another possible implementation, a dynamic adjustment threshold is determined for each request type based on the priority of the request type corresponding to at least one data request.

[0056] For example, persistence requests, management requests, and error recovery requests have higher priority than read requests, write requests, and disk maintenance requests.

[0057] When a Flush / FUA request enters the persistence queue, if the persistence request and the data write request share the same virtual disk, the same backend disk group, the same cache resource, the same backend queue, or persistence order dependency, the disk array increases the dynamic adjustment threshold corresponding to the persistence request type and decreases the dynamic adjustment threshold corresponding to the read / write request type corresponding to the same disk, in order to ensure that the persistence request is processed in a timely manner.

[0058] When a management request enters the management request queue, if the waiting time for the management request exceeds the time threshold, or if there are situations requiring timely response such as device status queries or fault status reporting, the disk array will increase the dynamic adjustment threshold corresponding to the management request type and decrease the dynamic adjustment threshold corresponding to the read / write request type to avoid the management request being blocked by read / write requests for a long time.

[0059] When abnormal situations such as request timeout, media error, link failure, or backend disk error occur, the data request with the abnormal situation is placed in the error recovery queue, and the dynamic adjustment threshold corresponding to the error recovery request type is increased, while the dynamic adjustment threshold corresponding to the read and write request type is decreased.

[0060] a4. Based on the dynamically adjusted threshold and the baseline threshold, determine the sub-threshold corresponding to the first request type.

[0061] Specifically, sub-thresholds represent the processing limits for a single request type, such as the processing limits for read requests, write requests, persistence requests, management command requests, error recovery requests, disk maintenance requests, and verification-related requests. Data requests of different types are constrained by their corresponding sub-thresholds. For example, read and write requests are constrained by the sub-thresholds corresponding to the read / write request type. Persistence requests such as Flush / FUA are constrained by the sub-thresholds corresponding to the persistence request type. Management requests are constrained by the sub-thresholds corresponding to the management request type. Error recovery requests are constrained by the sub-thresholds corresponding to the error recovery request type. Disk maintenance requests are constrained by their corresponding sub-thresholds. Verification-related stages in arrays with parity, such as RAID5 and RAID6, are constrained by verification-related sub-thresholds.

[0062] For example, the dynamically adjusted threshold and the baseline threshold are added together to obtain a sub-threshold corresponding to the first request type.

[0063] In addition to dynamically adjusting thresholds and baseline thresholds, reserved thresholds can be assigned to preset request types. These preset request types can include high-priority requests such as persistent requests, management requests, and error recovery requests. By specifically allocating reserved thresholds for these high-priority request types, these thresholds are not subject to dynamic threshold adjustment and are not consumed by low-priority requests (such as read requests and write requests). This ensures the smooth access and read / delivery of high-priority requests. Even with high concurrency on the computing device and congestion from regular requests, reserved thresholds can be used to prioritize the processing of high-priority requests such as persistent requests, management requests, and fault recovery requests.

[0064] a5. After determining the sub-thresholds corresponding to each request type, determine the target class threshold based on the sub-thresholds corresponding to each request type.

[0065] Here, the target class threshold is one of the following three thresholds: the first type threshold, the second type threshold, and the third type threshold.

[0066] For example, the sub-thresholds corresponding to all request types are determined as the target class thresholds.

[0067] For example, the target class threshold is obtained by summing the sub-thresholds corresponding to all request types.

[0068] In this embodiment, a baseline threshold is first assigned to each type of request based on the mapping relationship between request type and baseline threshold. For example, a higher threshold is assigned to high-priority request types to prevent high-priority requests from being squeezed out of scheduling resources by low-priority requests. Furthermore, by combining first, second, and third state information, fine-grained control over data requests is achieved, adapting to changes in computing device load, queue backlog, and disk load. This allows the disk array to increase the target class threshold to improve IO throughput efficiency during idle periods, and decrease the target class threshold during congested periods to avoid queue overflow, request timeouts, and other problems, ensuring the reliable and stable operation of the disk array.

[0069] In other embodiments, based on any of the foregoing embodiments, the first type threshold, the second type threshold, and the third type threshold are determined in the following manner: First, based on the preset mapping relationship between first state information and a benchmark threshold, a benchmark threshold corresponding to the first state information is determined. Then, based on the preset mapping relationship between second state information and the benchmark threshold, a benchmark threshold corresponding to the second state information is determined. Finally, based on the preset mapping relationship between third state information and the benchmark threshold, a benchmark threshold corresponding to the third state information is determined.

[0070] For example, when the first status information indicates congestion in the data requests sent by the computing device, the baseline threshold corresponding to the first type of threshold is smaller; conversely, the baseline threshold corresponding to the first type of threshold is larger. When the second status information indicates congestion in the receive queue, the baseline threshold corresponding to the second type of threshold is smaller; conversely, the baseline threshold corresponding to the second type of threshold is larger. When the third status information indicates high load on a certain disk, the baseline threshold corresponding to the third type of threshold is smaller; conversely, the baseline threshold corresponding to the third type of threshold is larger.

[0071] When the third category of thresholds includes sub-thresholds corresponding to multiple request types, the corresponding baseline thresholds for the third state information include sub-baseline thresholds corresponding to each request type. When the same data request involves multiple different target disks based on disk array level and stripe mapping, the disk array determines the sub-baseline thresholds corresponding to each request type in the third category of thresholds based on the third state information (such as disk load, response time, and error status). For example, if each data request involves a backend disk with a slow response or a large number of pending commands, the sub-baseline thresholds corresponding to read requests, write requests, and disk maintenance requests related to that disk in the third category of thresholds are reduced. If the data request is a persistence request, management request, or error recovery request, the sub-baseline thresholds corresponding to that type of data request are maintained.

[0072] Then, the baseline threshold corresponding to the first state information is adjusted by combining the second state information and / or the third state information, thereby obtaining the first type of threshold.

[0073] Similarly, by combining the first state information and / or the third state information, the baseline threshold corresponding to the second state information is adjusted to obtain the second type of threshold.

[0074] By combining the first state information and / or the second state information, the baseline threshold corresponding to the third state information is adjusted to obtain the third type of threshold.

[0075] Taking the first type of threshold, the second type of threshold, and the third type of threshold as examples, each including sub-thresholds corresponding to multiple request types, the corresponding baseline thresholds corresponding to the first state information, the second state information, and the third state information respectively include sub-baseline thresholds corresponding to each type of request.

[0076] For example, when the third status information indicates that the backend disk is idle and the first status information indicates that there is a backlog of data requests issued by the computing device, the disk array increases the sub-baseline threshold corresponding to the data read / write requests in the second type of threshold.

[0077] For example, when the third status information indicates that the number of commands in transit on the backend disk exceeds the limit, the response time increases, or the disk enters an error recovery state, the first type of threshold and the sub-baseline thresholds corresponding to data read / write requests and disk maintenance requests in the second type of threshold are reduced.

[0078] For example, when the first, second, or third state information indicates that there is a persistent request to be processed, the sub-baseline threshold corresponding to the persistent request in the first, second, or third threshold is increased, and the sub-baseline threshold corresponding to the data write request that has a resource contention or sequential dependency relationship with it is decreased.

[0079] For example, when the first, second, or third status information indicates the existence of an error recovery request, the sub-baseline threshold corresponding to the error recovery request in the first, second, or third threshold categories is increased, and the sub-baseline thresholds corresponding to data read / write requests and disk maintenance requests related to the error recovery target device are decreased.

[0080] In this way, the baseline thresholds are first determined based on the first, second, and third state information, respectively. Then, the baseline thresholds corresponding to the first state information are adjusted using the second and third state information, the baseline thresholds corresponding to the second state information are adjusted using the first and third state information, and the baseline thresholds corresponding to the third state information are adjusted using the first and second state information. This takes into account the concurrent data request capabilities of the computing device, the queuing backlog of the receiving queue, and the load-bearing capacity of the backend disk hardware, so that the first, second, and third thresholds are adapted to the actual working conditions of the disk array.

[0081] In some embodiments, based on any of the foregoing embodiments, the stage of processing at least one data request includes a request receiving stage, a request reading stage, and a request sending stage. Specifically, the request receiving stage is used to write the data request sent by the computing device into a receive queue based on a first type of threshold; the request reading stage is used to read the data request from the receive queue based on a second type of threshold; and the request sending stage is used to send the read data request to the corresponding target disk in the disk array based on a third type of threshold.

[0082] Based on the first type of threshold, the second type of threshold, and the third type of threshold, at least one data request is processed, specifically including the following method steps: b1, when the target class threshold meets the preset conditions, control the data requests in the target stage based on the target class threshold.

[0083] The target class threshold is one of the three types of thresholds: the first type, the second type, and the third type. The target stage is the stage that processes data requests based on the target class threshold in the process of processing at least one data request.

[0084] Specifically, when the target class threshold is the first type threshold, the target stage is the request receiving stage. When the target class threshold is the second type threshold, the target stage is the request reading stage. When the target class threshold is the third type threshold, the target stage is the request sending stage.

[0085] b2, according to the preset reduction rules, performs a reduction operation on the target class threshold.

[0086] Specifically, after each request processing phase of the target stage is completed, the corresponding sub-threshold for the request type is deducted, thus controlling the consumption of the corresponding threshold for each data request. For example, in the request distribution phase, after distributing one read request to the disk, the sub-threshold corresponding to the read request type in the third threshold is reduced by 1.

[0087] It is understandable that after a data request is processed, i.e., after the data request is completed, fails, times out, or the relevant resources are released, the first, second, and third thresholds are restored.

[0088] In this embodiment of the application, the data request processing stage is divided into a request receiving stage, a request reading stage, and a request sending stage, so as to achieve a one-to-one correspondence between the first type of threshold, the second type of threshold, the third type of threshold and the processing stage. When the target type threshold meets the preset conditions, the data request in the target stage can be controlled.

[0089] In one possible implementation, the target class threshold includes sub-thresholds corresponding to various request types, and the receiving queue includes sub-queues corresponding to various request types.

[0090] In this way, one request type corresponds to one sub-queue, thereby achieving isolation and control between data requests of different request types.

[0091] The method provided in this application embodiment also includes the following: When at least one target sub-threshold in the target class threshold is greater than or equal to the preset threshold, the target class threshold is determined to meet the preset condition.

[0092] Specifically, the preset threshold is used to determine whether to process requests belonging to the request type corresponding to the sub-threshold. For example, if the sub-threshold corresponding to a read request is greater than or equal to the preset threshold, then the read request will be executed in the target stage.

[0093] Furthermore, when the target class threshold meets the preset conditions, data requests in the target stage are controlled based on the target class threshold, specifically including the following method steps: c1 determines the target sub-threshold that is greater than the preset threshold from the target class threshold.

[0094] c2 determines the target data request from the data requests in the target stage based on the target sub-threshold and the preset threshold.

[0095] Optionally, the target data request can be determined from the data requests in the target stage in the following way: First, the number of target data requests is determined based on the target sub-threshold and the preset threshold.

[0096] For example, the difference between the target sub-threshold and the preset threshold is determined as the number of target data requests.

[0097] Then, based on the number of target data requests and the request types corresponding to the target sub-thresholds, target data requests are determined from the data requests in the target stage.

[0098] For example, based on the request type corresponding to the target sub-threshold, candidate data requests belonging to the request type corresponding to the target sub-threshold are determined from the data requests in the target stage. Further, the target data request is obtained from the candidate data requests according to their request time.

[0099] c3 requests the target data and executes the operation corresponding to the target stage.

[0100] Optionally, when the target class threshold is the first class threshold, in c3 above, the operation corresponding to the target stage is performed through the following steps: First, based on the request type of the target data request, the first sub-queue is determined from the sub-queues corresponding to the various request types.

[0101] Then, the target data request is written to the first sub-queue.

[0102] When the target class threshold is the first class threshold, it indicates that the link processing capacity is sufficient in the request receiving stage. At this time, the first sub-queue is determined based on the request type of the target data request, realizing the mutual isolation of different types of data requests in the request receiving stage. This achieves fine-grained classification and control of different types of requests, avoids data requests with different attributes and different latency requirements from competing for queue resources and processing paths, avoids critical request IO blocking and single access latency, and ensures the overall operational stability of the disk array.

[0103] Optionally, when the target class threshold is the second class threshold, in c3 above, the operation corresponding to the target stage is performed through the following steps: First, based on the request type of the target data request, a second sub-queue is determined from the sub-queues corresponding to the various request types.

[0104] Then, the target data request is read from the second sub-queue.

[0105] Finally, the target data request is processed according to the preset processing rules to determine the target disk in the disk array that corresponds to the target data request.

[0106] When the target threshold is the second type of threshold, meaning the second type of threshold meets the preset conditions, it indicates that the processing capacity for the read request phase is sufficient. At this time, the target data request is read from the second sub-queue and processed, maintaining the isolation of the request queues of different types to avoid mutual interference and resource contention between cross-type requests.

[0107] In one possible scenario, the target data request is processed to determine the target disk in the disk array corresponding to the target data request, as follows: First, obtain the disk array level and stripe size of the virtual disk accessed by the target data request.

[0108] Specifically, the disk array class determines the data sharding, parity, redundancy, and read / write distribution logic; different disk array classes correspond to different sharding logics. For example, disk array classes include, but are not limited to, RAID 0 striped sharding with no redundancy, RAID 1 dual-disk mirrored redundancy, RAID 5 parity distributed redundancy, RAID 6 dual-parity redundancy, and RAID 10 mirrored striped hybrid architecture.

[0109] Stripe size refers to the preset data shard unit size of a virtual disk. As the smallest unit for splitting a disk array, it determines the data size of a single sub-request.

[0110] For example, the disk array class and stripe size can be obtained through the header fields of the target data request.

[0111] For example, the virtual disk ID carried in the target data request message is read, and the disk array level and stripe size corresponding to the target data request are determined based on the preset mapping relationship between the virtual disk ID, disk array level, and stripe size.

[0112] Then, the target data request is parsed to obtain the logical block address (LBA) corresponding to the target data request.

[0113] Specifically, the logical address range corresponding to the target data request is the starting and ending logical address interval of the target data request accessing the virtual disk, representing the starting position of the request read / write, the number of sectors occupied by the read / write, and the range of virtual disk space occupied by the data.

[0114] Finally, based on the disk array level, stripe size, and the request type and logical address range corresponding to the target data request, the target data request is split into multiple sub-requests, and the target disks corresponding to each sub-request are determined.

[0115] For example, for RAID0, the disk array splits data read requests / data write requests into sub-requests corresponding to one or more target disks based on stripe size and logical address range.

[0116] For example, in RAID 5, the disk array determines whether the data in the write request covers the entire stripe based on the logical address range of the write request and the stripe size, and thus selects different splitting methods. For instance, if it is a lowercase write request, the write request is split into sub-requests such as old data read, old parity read, new data write, and new parity write. If it is a full stripe write request, the write request is split into a new data write sub-request and a new parity write sub-request.

[0117] For example, for RAID1 or RAID10, the disk array selects the target disk for a read request based on the load, response time, and error status of the mirrored members. For write requests, the disk array splits the write request into sub-requests corresponding to multiple mirrored members.

[0118] For example, in RAID6, a data read / write request includes not only the data read / write request itself but also a P / Q checksum update sub-request. Similarly, in an error recovery request, the disk array generates sub-requests for the reconstruction read or recovery phase based on the surviving disks and checksum data.

[0119] In this way, based on the disk array level, stripe size, request type, and logical address range, multiple sub-requests adapted to the disk array splitting logic are generated, ensuring that the target data request can be successfully processed by the disk array and guaranteeing the effectiveness of disk array data mirroring, parity checking, etc.

[0120] Optionally, when the target class threshold is the third class threshold, in c3 above, the operation corresponding to the target stage is performed through the following steps: First, the target data request is sent to the corresponding target disk.

[0121] Then, after the target disk completes the operation corresponding to the target data request, an interrupt operation corresponding to the target data request is executed based on the request type of the target data request.

[0122] Specifically, interrupt operations refer to the hardware interrupt callback processing operations initiated by the disk array after the disk completes the target data request, used to close the lifecycle of the target data request. For example, after the operation corresponding to the persistence request is completed, a high-priority disk write-and-receive interrupt is initiated. As another example, after a read request completes the read, a low-priority data transfer interrupt is initiated.

[0123] When the target data request threshold reaches the third threshold (i.e., the third threshold meets the preset conditions), it indicates that the disk allocation is sufficient during the request delivery phase and the disks in the disk array have the necessary IDs for execution. At this point, the target data request is delivered to the target disk, thus completing the delivery of the target data request. Furthermore, after the target disk completes the operation corresponding to the data request, interrupt operations are executed based on request type differentiation to distinguish the interrupt priorities of different request types. For example, for high-priority requests (such as persistence requests, error recovery requests, etc.), timely or periodic receipts are provided; for low-priority requests (such as read requests, write requests, disk maintenance requests, etc.), interrupt merging operations are performed to optimize interrupt overhead.

[0124] In this way, by differentiating the interrupt operations corresponding to the target data request based on the request type, and performing differentiated closed-loop processing of data requests of different request types, it can not only take into account the timeliness of high-priority request receipts, but also reduce the hardware interruption overhead of computing devices and reduce computing power consumption by merging the interrupt operations of low-priority requests, which helps to improve the rationality of disk array interrupt handling for different data requests.

[0125] In one possible scenario, the target data request is of any of the following types: read request, write request, or disk maintenance request.

[0126] Specifically, read requests are used to retrieve data from the target disk, including but not limited to random read requests, sequential read requests, and striped read requests. Write requests are used to modify or add data to the target disk.

[0127] Disk maintenance requests are background instructions used to ensure the health of disk hardware and the stable operation of the array, including but not limited to disk inspection, bad sector pre-scanning, cache refresh, defragmentation, temperature self-test, and other requests.

[0128] After the target disk completes the operation corresponding to the target data request, the interrupt operation corresponding to the target data request is executed in the following manner: First, perform a counting operation corresponding to the request type of the target data request.

[0129] Specifically, the counting operation refers to register counting operations that accumulate statistics and mark the status of completed target data requests. For example, the counter value corresponding to each completed NVMe read request is incremented by 1. The counter value corresponding to each completed disk inspection and maintenance request is incremented by 1.

[0130] Then, when the count value corresponding to the request type of the target data request reaches the preset count threshold, all data requests corresponding to the count value are determined.

[0131] Specifically, a preset count threshold is used as the critical value for initiating interrupt merging. When the preset count threshold is reached, the interrupt merging operation is triggered.

[0132] All data requests corresponding to the count value refer to all pending interruption requests belonging to the same request type and accumulated by the same counter.

[0133] Finally, an interrupt merge operation is performed on all data requests corresponding to the count value to indicate the completion status of all data requests corresponding to the count value.

[0134] Specifically, interrupt merging refers to merging multiple interrupted data requests of the same type into a single aggregated hardware interrupt, and reporting the completion status of all interrupted requests in a unified manner, replacing a single interruption for each data request. For example, merging 16 completed HDD write requests into one aggregated write completion interrupt, reporting the completion of all 16 write requests at once.

[0135] It is understandable that when a data request is split into multiple sub-requests, the disk array will only determine that the data request is completed after the operations corresponding to each of the multiple sub-requests have been completed. That is, the completion of a single sub-request is not directly equivalent to the completion of the data request.

[0136] The completion status includes, but is not limited to, execution success, execution failure, and execution timeout.

[0137] In this way, read requests, write requests, and disk maintenance requests—three common low-priority data requests—are treated as objects for interrupt merging. The interrupt merging operation is only performed after the count value reaches a preset count threshold, which reduces the number of frequent hardware interrupts of the computing device and reduces the computing power overhead of the computing device's CPU terminal scheduling.

[0138] In another possible scenario, when the target data request is of any of the following types: persistence request, management request, or error recovery request, after the target disk completes the operation corresponding to the target data request, the completion status of the target data request is reported to the computing device according to a preset interruption period. The preset interruption period can be limited based on actual circumstances, such as being determined based on the request type of the data request; this embodiment does not specifically limit this period.

[0139] In addition, when the target data request is of any type among persistence request, management request, and error recovery request, the completion status of the target data request can be reported to the computing device in a timely manner by immediately interrupting the request.

[0140] In some embodiments, based on the foregoing embodiments, the method provided in this application further includes the following: When at least one of the three threshold types (first, second, and third) fails to meet the preset conditions, the preset counting threshold is adjusted according to the preset adjustment rules, and the interruption merging operation is performed based on the adjusted preset counting threshold.

[0141] In one possible implementation, when at least one of the first, second, and third thresholds does not meet the preset condition, the preset counting threshold is increased to obtain the increased preset counting threshold.

[0142] When at least one of the three threshold types (first, second, and third) fails to meet the preset conditions, it indicates that the disk array is at risk of slow data request flow and load deviation. In this case, by increasing the preset counting threshold, the critical value of the interrupt merging operation is raised, and more completed data requests are merged in one interrupt merging operation, thereby reducing the number of hardware interrupts per unit time, reducing the interrupt overhead of the computing device, and avoiding high-frequency interrupts from exacerbating the pressure on the disk array to process data requests.

[0143] Optionally, if at least one of the three threshold categories (first, second, and third) fails to meet the preset condition, the preset counting threshold is increased in the following manner: First, the load level of the disk array is determined based on the first state information, the second state information, and the third state information.

[0144] Then, based on the load level and the preset mapping relationship between the load level and the adjustment range, the adjustment range corresponding to the load level is determined.

[0145] There is a positive correlation between the load level and the adjustment range; that is, the greater the load level, the larger the adjustment range. For example, when the load level is slight, the adjustment range is set to 5; when the load level is heavy, the adjustment range is 8; and when the load level is extremely heavy, the adjustment range is 10.

[0146] Finally, based on the adjustment range corresponding to the load level, the preset counting threshold is increased to obtain the increased preset counting threshold.

[0147] In this way, the load level of the disk array is determined by the first state information representing the front-end access status, the second state information representing the internal scheduling status, and the third state information representing the back-end disk status. The adjustment range is determined based on the load level, that is, the greater the load, the greater the adjustment range. This makes the increased preset counting threshold more in line with the disk array status, thereby reducing the number of high-frequency hardware interrupts of the computing device and alleviating interrupt pressure.

[0148] Optionally, if at least one of the three threshold types (first, second, and third) fails to meet the preset condition, the preset counting threshold can be increased in the following way: First, the target threshold that does not meet the preset conditions is determined from the first type threshold, the second type threshold, and the third type threshold.

[0149] Then, based on the type of the target threshold and the preset mapping relationship between the threshold type and the adjustment range, the adjustment range corresponding to the target threshold is determined.

[0150] For example, a larger adjustment range corresponds to a first-type threshold. A medium adjustment range corresponds to a second-type threshold. A smaller adjustment range corresponds to a third-type threshold.

[0151] Finally, based on the adjustment range corresponding to the target threshold, the preset counting threshold is increased to obtain the increased threshold counting threshold.

[0152] In this way, the adjustment range is determined based on the target threshold that does not meet the preset conditions, and the receiving request stage, reading request stage and sending request stage of the disk array are accurately matched, thereby increasing the preset counting threshold in a targeted manner and improving the accuracy of interrupt control.

[0153] Furthermore, the adjustment range can be determined based on the difference between the target threshold and a preset threshold in the preset conditions. The larger the difference, the larger the adjustment range. In this way, the threshold for interrupt merging is adjusted to the maximum extent, thereby shortening the request response latency.

[0154] Of course, the preset counting threshold can also be increased by a fixed preset adjustment range.

[0155] In another possible implementation, when the first type of threshold, the second type of threshold, and the third type of threshold all meet the preset conditions, the preset count threshold is reduced to obtain the reduced preset count threshold, which is used to perform an interruption merging operation on the target data request.

[0156] When the first, second, and third thresholds all meet the preset conditions, it indicates that the disk array has sufficient computing power resources. At this time, by lowering the preset counting threshold to reduce the threshold for interrupt merging, a small number of data requests can trigger a merging interrupt, thereby speeding up the reporting speed of data request completion status and shortening the overall latency of response requests.

[0157] Similarly, reducing the preset count threshold can also be adjusted based on the disk array's idle load level. The higher the idle load level, the larger the adjustment. For example, when the disk array is slightly idle, the adjustment is -5. When the disk array is completely idle, the adjustment is -10.

[0158] Decreasing the preset counting threshold can also be based on determining the adjustment range according to the target threshold. For example, it can be based on the mapping relationship between preset threshold types and adjustment ranges to determine the adjustment range corresponding to the target threshold, or it can be based on the difference between the target threshold and the threshold in the preset conditions. Of course, the preset counting threshold can also be decreased by a fixed preset adjustment range. It should be noted that the specific methods for decreasing the preset counting threshold are similar to those for increasing it, and will not be elaborated upon here.

[0159] Figure 2 This diagram illustrates an application scenario for a disk array control system to handle data requests. As shown, the disk array control system comprises a driver layer, a controller layer, and a backend disk layer. The controller layer includes a frontend queue management module, a unified scheduling credit generation module, a level-aware request decomposition module, a completion processing and interruption module, and a backend disk queue management module.

[0160] The computing device sends data requests to the driver layer through the operating system block layer and the Linux block layer / Small Computer System Interface (SCSI) layer. The driver layer identifies the request type, virtual disk, and request parameters, and generates a command descriptor. It then submits the command descriptor to the receive queue corresponding to the computing device in the front-end queue management module, such as the read request queue, write request queue, persistence queue, management command queue, error recovery queue, and disk maintenance queue.

[0161] The front-end queue management module receives command descriptors submitted by the driver layer and places requests into receive queues according to request type, such as read request queue, write request queue, persistence queue, management command queue, error recovery queue, and disk maintenance queue. Different queues can be processed in parallel, but the number of parallel processing requests and the number of subsequent requests are controlled by the first type threshold, the second type threshold, and the third type threshold.

[0162] The unified scheduling credit generation module collects the status of the driver layer, the status of the receiving queue in the front-end queue management module, and the status of the back-end disk layer. It then combines the current operating status of the disk array, the request type, the target virtual disk attributes, and the disk type of the back-end disk to determine the first type threshold, the second type threshold, and the third type threshold. The first type threshold is used to control the disk array's reception of data requests sent by computing devices, i.e., to control the writing of data requests to the receiving queue. The second type threshold is used to control the number of data requests retrieved from the receiving queue. The third type threshold is used to control the number of data requests sent to the back-end disk.

[0163] The level-aware request decomposition module is used to convert data requests into one or more sub-requests based on the target virtual disk's disk array level, request type, logical address range, and stripe size.

[0164] The backend disk queue management module manages the command queues and related resources between the disk array and the backend disk devices. For NVMe backend devices, it creates and manages the backend NVMe commit queue and completion queue. For SAS / SATA / HDD backend disks, it determines a third-category threshold based on disk request processing capacity, the number of requests in transit, response time, and error status, and controls request issuance based on this third-category threshold.

[0165] Figure 3 This is a schematic diagram of a three-level queue architecture from the driver layer to the backend disk. Figure 3As shown, the driver layer contains hardware queues corresponding to different cores in the computing device, namely hardware queue 0, hardware queue 1... hardware queue N. Each hardware queue contains data requests sent from the computing device to the disk array. The front-end queue management module has a corresponding receiving queue for each hardware queue. Each receiving queue receives data requests from the corresponding core in the computing device received by the disk array. The receiving queue contains multiple sub-queues corresponding to different request types, used to cache the corresponding data requests. Data requests read from the sub-queues are distributed according to disk type and sent to the NVME back-end unified scheduler and HDD back-end unified scheduler in the front-end queue management module. The two types of schedulers each interface with an independent back-end queue layer. The NVME back-end corresponds to multiple back-end queues 0, 1... queue N, and ultimately sends the data requests in the queues to multiple solid-state drives (SSDs). Here, different queues can correspond to different request types. The HDD back-end corresponds to multiple back-end queues 0, 1... queue N, and ultimately distributes the data requests in the queues to multiple hard disk drives (HDDs). In this way, by using front-end and back-end layered queues and heterogeneous disk grouping scheduling, data request hierarchical caching and disk type-differentiated scheduling and distribution are realized, completing the entire process of IO request processing from driver access to heterogeneous disk landing.

[0166] The completion processing and interruption module is used to handle the relationship between backend disk completion events and computing device completion events. For example... Figure 4 As shown, firstly, after the operation corresponding to the data request is completed, the completion status of the data request is updated. Next, it is determined whether the completion status of the data request meets the cache completion condition. When the completion status of the data request meets the cache completion condition, the data request is written to the completion queue of the computing device. Then, the interrupt operation for the data request is executed according to the request type. For example, for low-priority requests such as read / write requests, interrupt merging can be used to reduce the number of CPU interrupts on the computing device. For high-priority requests such as Flush / FUA requests, management commands, error recovery requests, and critical error events, small window interrupts or immediate interrupts are used to report the completion status.

[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to 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.

[0168] This application also provides a data request processing apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0169] This embodiment provides a data request processing device applied to a disk array, such as... Figure 5 As shown, it includes: The response module 501 is used to respond to at least one data request sent by the computing device to the disk array, adjust the round at the current threshold, and obtain the first state information, the second state information and the third state information corresponding to the disk array at the current time. The first state information is used to characterize the execution status of the data request sent by the computing device to the disk array, the second state information is used to characterize the execution status of the data request in the receiving queue of the disk array corresponding to the computing device, and the third state information is used to characterize the load status of the disk array. The determining module 502 is used to determine a first type of threshold, a second type of threshold, and a third type of threshold based on the first state information, the second state information, and the third state information, respectively. The first type of threshold is the maximum number of data requests received by the disk array from the computing device, the second type of threshold is the maximum number of data requests read from the receiving queue, and the third type of threshold is the maximum number of data requests sent to the disks in the disk array. The processing module 503 is used to process at least one data request based on the first type threshold, the second type threshold, and the third type threshold until the preset threshold adjustment conditions are met, and then enter the next threshold adjustment round. It is used to reconfirm the first type threshold, the second type threshold, and the third type threshold based on the new first state information, the new second state information, and the new third state information, until all data requests have been processed and the threshold adjustment operation is stopped.

[0170] In one possible implementation, the determining module 502 is specifically used to obtain the request type corresponding to at least one data request; Based on the first request type and the preset mapping relationship between request types and benchmark thresholds, a benchmark threshold corresponding to the first request type is determined, wherein the first request type is one of the request types corresponding to at least one data request; Based on the first state information, the second state information, and the third state information, determine the dynamic adjustment threshold corresponding to the first request type; Based on the dynamically adjusted threshold and the baseline threshold, a sub-threshold corresponding to the first request type is determined; Once the sub-thresholds corresponding to each request type are determined, the target class threshold is determined based on the sub-thresholds corresponding to each request type.

[0171] In one possible implementation, when the target class threshold is the third class threshold, the determining module 502 is specifically used to obtain the disk type of the disk to which the virtual disk corresponding to at least one data request is bound; Based on each disk type, the first state information, the second state information, and the third state information, a dynamic adjustment threshold corresponding to the first request type is determined.

[0172] In one possible implementation, the phase of processing at least one data request includes a receive request phase, a read request phase, and a send request phase, wherein the receive request phase is used to write the data request sent by the computing device into a receive queue based on a first type of threshold, the read request phase is used to read the data request from the receive queue based on a second type of threshold, and the send request phase is used to send the read data request to the corresponding target disk in the disk array based on a third type of threshold. The processing module 503 is specifically used to control the data request in the target stage based on the target class threshold when the target class threshold meets the preset conditions; wherein, the target class threshold is one of the first class threshold, the second class threshold, and the third class threshold, and the target stage is the stage of processing data requests based on the target class threshold in the stage of processing at least one data request; According to the preset reduction rules, the threshold of the target class is reduced.

[0173] In one possible implementation, the target class threshold includes sub-thresholds corresponding to various request types, and the receiving queue includes sub-queues corresponding to various request types. The determining module 502 is further configured to determine that the target class threshold satisfies the preset condition when at least one target sub-threshold in the target class threshold is greater than or equal to the preset threshold.

[0174] The processing module 503 is specifically used to determine a target sub-threshold that is greater than the preset threshold from the target class threshold when the target class threshold meets the preset conditions; Based on the target sub-threshold and the preset threshold, the target data request is determined from the data requests in the target stage; For the target data request, execute the operation corresponding to the target stage.

[0175] In one possible implementation, the processing module 503 is specifically used to determine the number of target data requests based on the target sub-threshold and the preset threshold; The target data requests are determined from the data requests in the target stage based on the number of target data requests and the request types corresponding to the target sub-thresholds.

[0176] In one possible implementation, when the target class threshold is the first class threshold, the processing module 503 is specifically used to determine the first sub-queue from the sub-queues corresponding to the various request types based on the request type of the target data request. Write the target data request to the first sub-queue.

[0177] In one possible implementation, when the target class threshold is the second class threshold, the processing module 503 is specifically used to determine the second sub-queue from the sub-queues corresponding to the various request types based on the request type of the target data request. Request to read target data from the second sub-queue; According to the preset processing rules, the target data request is processed to determine the target disk in the disk array that corresponds to the target data request.

[0178] In one possible implementation, the processing module 503 is specifically used to obtain the disk array level and stripe size of the virtual disk accessed by the target data request; The target data request is parsed to obtain the logical address range corresponding to the target data request; Based on the disk array level, stripe size, and the request type and logical address range corresponding to the target data request, the target data request is split into multiple sub-requests, and the target disks corresponding to each sub-request are determined.

[0179] In one possible implementation, when the target class threshold is the third class threshold, the processing module 503 is specifically used to send the target data request to the corresponding target disk. After the target disk completes the operation corresponding to the target data request, an interrupt operation corresponding to the target data request is executed based on the request type of the target data request.

[0180] In one possible implementation, when the request type of the target data request is any of the following types of requests: read request, write request, or disk maintenance request, the processing module 503 is specifically used to perform a counting operation corresponding to the request type of the target data request. When the count value corresponding to the request type of the target data request reaches the preset count threshold, all data requests corresponding to the count value are identified. An interrupt merge operation is performed on all data requests corresponding to the count value to indicate the completion status of all data requests corresponding to the count value.

[0181] In one possible implementation, the device further includes an adjustment module, used to increase the preset counting threshold when at least one of the first type of threshold, the second type of threshold, and the third type of threshold does not meet the preset condition, so as to obtain the increased preset counting threshold. or, When the first type threshold, the second type threshold, and the third type threshold all meet the preset conditions, the preset count threshold is reduced to obtain the reduced preset count threshold, which is used to perform an interruption merging operation on the target data request.

[0182] This device uses three states: First, the execution status of data requests sent from the computing device to the disk array, reflecting the data request pressure and processing pressure on the computing device side; Second, the execution status of data requests in the receiving queue corresponding to the computing device in the disk array, reflecting the internal request relay pressure of the disk array; and Third, the load status of the disk array, reflecting the load processing capacity of the disks in the disk array. By combining the first, second, and third states, each data request is processed, achieving phased control of data request reception, reading, and distribution. This helps avoid problems such as massive data request influx, receiving queue backlog, and backend disk overload. It is suitable for scenarios with high business load, array backend maintenance, disk failure recovery, and multi-media hybrid networking, achieving unified and coordinated processing of each data request.

[0183] For a description of the features in the embodiment corresponding to the data request processing device, please refer to the relevant description in the embodiment corresponding to the data request processing method, which will not be repeated here.

[0184] Embodiments of this application also provide an electronic device, such as... Figure 6 As shown, it includes a memory 10 and a processor 20. The memory 10 stores a computer program, and the processor 20 is configured to run the computer program to perform the steps in any of the above-described data request processing method embodiments.

[0185] Embodiments of this application also provide a computer-readable storage medium storing a computer program configured to execute the steps in any of the above-described data request processing method embodiments at runtime.

[0186] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0187] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described data request processing method embodiments.

[0188] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described data request processing method embodiments.

[0189] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be performed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.

[0190] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0191] The foregoing has provided a detailed description of a data request processing method, electronic device, and medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for processing data requests, characterized in that, Applied to a disk array, the method includes: In response to at least one data request sent by a computing device to the disk array, the system adjusts the rounds at the current threshold and obtains first state information, second state information, and third state information corresponding to the disk array at the current time. The first state information is used to characterize the execution status of the data request sent by the computing device to the disk array, the second state information is used to characterize the execution status of the data request in the receiving queue of the disk array corresponding to the computing device, and the third state information is used to characterize the load status of the disk array. Based on the first state information, the second state information, and the third state information, a first type of threshold, a second type of threshold, and a third type of threshold are determined respectively. The first type of threshold is the maximum number of data requests received by the disk array from the computing device, the second type of threshold is the maximum number of data requests read from the receiving queue, and the third type of threshold is the maximum number of data requests sent to the disks in the disk array. Based on the first type of threshold, the second type of threshold, and the third type of threshold, the at least one data request is processed until the preset threshold adjustment condition is met, and the next threshold adjustment round is entered. Based on the new first state information, the new second state information, and the new third state information, the first type of threshold, the second type of threshold, and the third type of threshold are reconfirmed until all the data requests have been processed, and the threshold adjustment operation is stopped.

2. The method according to claim 1, characterized in that, Based on the first state information, the second state information, and the third state information, a target class threshold is determined, wherein the target class threshold is one of the first class threshold, the second class threshold, and the third class threshold, including: Obtain the request type corresponding to each of the at least one data request; Based on the first request type and the preset mapping relationship between request types and benchmark thresholds, a benchmark threshold corresponding to the first request type is determined, wherein the first request type is one of the request types corresponding to the at least one data request; Based on the first state information, the second state information, and the third state information, a dynamic adjustment threshold corresponding to the first request type is determined; Based on the dynamically adjusted threshold and the baseline threshold, a sub-threshold corresponding to the first request type is determined; After determining the sub-thresholds corresponding to all the request types, the target class threshold is determined based on the sub-thresholds corresponding to all the request types.

3. The method according to claim 2, characterized in that, When the target class threshold is the third class threshold, determining the dynamically adjusted threshold corresponding to the first request type based on the first state information, the second state information, and the third state information includes: Obtain the disk type of the disk to which the virtual disk corresponding to the at least one data request is bound; Based on each disk type, the first status information, the second status information, and the third status information, a dynamic adjustment threshold corresponding to the first request type is determined.

4. The method according to claim 2 or 3, characterized in that, The process of processing the at least one data request includes a request receiving stage, a request reading stage, and a request sending stage. The request receiving stage is used to write the data request sent by the computing device into the receiving queue based on a first type of threshold. The request reading stage is used to read the data request from the receiving queue based on a second type of threshold. The request sending stage is used to send the read data request to the corresponding target disk in the disk array based on a third type of threshold. Processing the at least one data request based on the first type of threshold, the second type of threshold, and the third type of threshold includes: When the target class threshold meets the preset conditions, the data request in the target stage is controlled based on the target class threshold; wherein, the target stage is the stage in the process of processing the at least one data request that processes the data request based on the target class threshold. According to the preset reduction rules, the threshold of the target class is reduced.

5. The method according to claim 4, characterized in that, The target class threshold includes sub-thresholds corresponding to various request types, and the receiving queue includes sub-queues corresponding to the various request types; before controlling data requests in the target stage based on the target class threshold when the target class threshold meets a preset condition, the method further includes: When at least one target sub-threshold in the target class threshold is greater than or equal to a preset threshold, it is determined that the target class threshold satisfies the preset condition; When the target class threshold meets a preset condition, the control of data requests in the target stage is based on the target class threshold, including: Determine a target sub-threshold that is greater than the preset threshold from the target class threshold; Based on the target sub-threshold and the preset threshold, the target data request is determined from the data requests in the target stage; For the target data request, perform the operation corresponding to the target stage.

6. The method according to claim 5, characterized in that, The step of determining the target data request from the data requests in the target stage based on the target sub-threshold and the preset threshold includes: The number of target data requests is determined based on the target sub-threshold and the preset threshold; Based on the number of target data requests and the request type corresponding to the target sub-threshold, target data requests are determined from the data requests in the target stage.

7. The method according to claim 5, characterized in that, When the target class threshold is the first class threshold, the request for target data, performing the operation corresponding to the target stage, includes: Based on the request type of the target data request, a first sub-queue is determined from the sub-queues corresponding to the various request types respectively; Write the target data request into the first sub-queue.

8. The method according to claim 5, characterized in that, When the target class threshold is the second class threshold, the request for target data, performing the operation corresponding to the target stage, includes: Based on the request type of the target data request, a second sub-queue is determined from the sub-queues corresponding to the various request types respectively; Read the target data request from the second sub-queue; The target data request is processed according to preset processing rules to determine the target disk in the disk array that corresponds to the target data request.

9. The method according to claim 8, characterized in that, The step of processing the target data request according to preset processing rules and determining the target disk in the disk array corresponding to the target data request includes: Obtain the disk array level and stripe size of the virtual disk accessed by the target data request; The target data request is parsed to obtain the logical address range corresponding to the target data request; Based on the disk array level, the stripe size, and the request type and logical address range corresponding to the target data request, the target data request is split to determine multiple sub-requests and the target disks corresponding to each sub-request.

10. The method according to claim 5, characterized in that, When the target class threshold is the third class threshold, the request for target data, performing the operation corresponding to the target stage, includes: The target data request is sent to the corresponding target disk; After the target disk completes the operation corresponding to the target data request, an interrupt operation corresponding to the target data request is executed based on the request type of the target data request.

11. The method according to claim 10, characterized in that, When the target data request is of any type among read request, write request, and disk maintenance request, the step of executing an interrupt operation corresponding to the target data request based on the request type of the target data request after the target disk completes the operation corresponding to the target data request includes: Perform a counting operation corresponding to the request type of the target data request; When the count value corresponding to the request type of the target data request reaches a preset count threshold, all data requests corresponding to the count value are determined. An interrupt merge operation is performed on all data requests corresponding to the count value to indicate the completion status of all data requests corresponding to the count value.

12. The method according to claim 11, characterized in that, The method further includes: When at least one of the first type of threshold, the second type of threshold, and the third type of threshold does not meet the preset condition, the preset counting threshold is increased to obtain the increased preset counting threshold. or, When the first type of threshold, the second type of threshold, and the third type of threshold all meet the preset conditions, the preset count threshold is reduced to obtain a reduced preset count threshold, which is used to perform an interruption merging operation on the target data request.

13. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the data request processing method as described in any one of claims 1-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 when the computer program is executed by a processor, it implements the steps of the data request processing method as described in any one of claims 1-12.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the data request processing method as described in any one of claims 1-12.