Gds degradation method, electronic device, storage medium, and program product
By employing techniques such as acquiring global write locks, asynchronous polling, buffer pre-setting, and atomic route flipping, the problem of service interruption during GDS failure was solved, achieving seamless switching and service continuity during GDS degradation.
Patent Information
- Application Number
- CN202611637428.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-20
AI Technical Summary
In GDS scenarios that combine heterogeneous GPUs and cross-vendor data processors, when a GDS fails, the existing GDS degradation mechanism will abort in-transit I/O requests, causing the training process to be forcibly interrupted and services to be restarted, resulting in poor business continuity.
Upon receiving the downgrade trigger instruction, acquire the global write lock of the path control layer and suspend new I/O requests. Simultaneously, start an asynchronous thread to poll and wait for in-transit I/O requests to complete or reach the timeout threshold. Pre-allocate the host-locked memory buffer and initialize the I/O context of the target copy path. Switch the GDS source path to the target copy path through atomic instruction operations. After the in-transit I/O request is confirmed and returned, unregister the memory of the GDS source path and release GDS resources.
It achieves seamless switching and continuity of services in the event of GDS failure, avoids state races and data truncation caused by request mixing, and ensures the integrity of critical training data and continuous operation of services.
Smart Images

Figure CN123137948A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed training infrastructure for large artificial intelligence models, and in particular to a GDS degradation method, electronic device, storage medium and program product. Background Technology
[0002] In distributed training of large models, GPU Direct Storage (GDS) is widely used, allowing the Graphics Processing Unit (GPU) to interact directly with the storage medium through the Direct Memory Access (DMA) engine.
[0003] In existing technologies, in GDS scenarios combining heterogeneous GPUs and cross-vendor data processing units (DPUs), when a GDS fails, the existing GDS degradation mechanism will directly terminate in-transit I / O (Input / Output) requests, causing a forced interruption of the training process and a restart of the service, resulting in poor service continuity in the event of a GDS failure. Summary of the Invention
[0004] This application provides a GDS downgrade method, electronic device, storage medium, and program product to improve service continuity in the event of a GDS failure.
[0005] In a first aspect, embodiments of this application provide a GDS downgrade method, including:
[0006] Upon receiving the downgrade trigger instruction, acquire the global write lock of the path control layer and suspend the access of new I / O requests. At the same time, start an asynchronous thread to poll and wait for the I / O requests in transit to complete or reach the timeout threshold.
[0007] Pre-allocate a host-locked memory buffer and initialize the I / O context for the target copy path;
[0008] The GDS source path is switched to the target copy path through atomic instruction operations;
[0009] After the in-transit I / O request is confirmed and returned, the memory registration of the GDS source path is deregistered and the GDS resources are released.
[0010] In one possible implementation, receiving the degradation trigger command precedes the following:
[0011] Monitor runtime metrics, including: hard errors, timeouts, data errors, and performance degradation;
[0012] When any running indicator meets its preset conditions, a downgrade trigger instruction corresponding to the running indicator level is generated.
[0013] In one possible implementation, GDS includes cross-vendor GPUs, compute DPUs, and storage DPUs. The data link between the cross-vendor GPUs and compute DPUs in GDS is a high-risk link. The method further includes:
[0014] A tiered verification process is implemented for high-risk links. The tiered verification process includes: PCIe basic testing, driver initialization, functional consistency verification, high concurrency stability testing, controllable fault injection simulation, and end-to-end snapshot integration verification.
[0015] In one possible implementation, the method further includes:
[0016] Multi-dimensional data is continuously acquired according to the sampling period. The multi-dimensional data includes: I / O operation count, latency sample, aggregate bandwidth, CRC error rate, PCIe link quality, and hardware temperature.
[0017] The system performs sliding window denoising, exponential weighted smoothing, and normalization mapping on multi-dimensional data, and calculates the health score based on dynamic weight coefficients.
[0018] When the health score reaches the preset warning level, the corresponding warning action will be executed.
[0019] In one possible implementation, the process involves acquiring a global write lock from the path control layer and suspending new I / O request access, followed by:
[0020] Based on the business labels of the I / O descriptors, requests are divided into core data streams and auxiliary data streams;
[0021] Establish a reference count tracking table for the core data flow and perform processing according to the steps of waiting for in-transit I / O requests to complete or reaching the timeout threshold;
[0022] For auxiliary data streams, redirect them to a temporary buffer queue via a fast channel or perform safe discarding.
[0023] In one possible implementation, the GDS source path is switched to the target copy path via an atomic instruction operation, followed by:
[0024] Maintain a transaction log in memory that maps request IDs to target paths;
[0025] Record the final write endpoint of historical requests during dual-buffered parallel takeover.
[0026] In one possible implementation, the memory registration of the GDS source path is unregistered and hardware resources are released, followed by:
[0027] Start a lightweight background detection timer;
[0028] Test data blocks are distributed periodically and read / write verifications are performed.
[0029] When the detection criteria are met, the GDS path is determined to be restored.
[0030] Perform a reverse switch to the GDS source path.
[0031] Secondly, embodiments of this application provide a GDS downgrade device, including: an acquisition module and a processing module;
[0032] The acquisition module is used to acquire the global write lock of the path control layer and suspend the access of new I / O requests after receiving the downgrade trigger instruction. At the same time, it starts an asynchronous thread to poll and wait for the I / O requests in transit to complete or reach the timeout threshold.
[0033] The processing module is used to pre-allocate the host-locked memory buffer and initialize the I / O context of the target copy path;
[0034] The processing module is also used to switch the GDS source path to the target copy path through atomic instruction operations;
[0035] The processing module is also used to unregister the memory of the GDS source path and release GDS resources after the in-transit I / O request confirmation is returned.
[0036] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0037] The memory stores the instructions that the computer executes;
[0038] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0039] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0040] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0041] This application provides a GDS degradation method, electronic device, storage medium, and program product. Upon receiving a degradation trigger command, a global write lock is acquired at the path control layer, and new I / O requests are suspended. Simultaneously, an asynchronous thread is started to poll, waiting for in-transit I / O requests to complete or reach a timeout threshold. A host-locked memory buffer is pre-allocated, and the I / O context of the target copy path is initialized. Through atomic instruction operations, the GDS source path is switched to the target copy path. After the in-transit I / O request is confirmed, the memory registration of the GDS source path is deregistered, and GDS resources are released. This method improves service continuity in the event of a GDS failure. Attached Figure Description
[0042] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0043] Figure 1 A flowchart illustrating a GDS downgrade method provided in an embodiment of this application;
[0044] Figure 2 A flowchart illustrating a GDS multi-condition degradation triggering method provided in an embodiment of this application;
[0045] Figure 3 A flowchart illustrating a GDS hierarchical verification and adaptive degradation method provided in this application embodiment;
[0046] Figure 4 This is a schematic diagram of the structure of a GDS downgrade device provided in an embodiment of this application;
[0047] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0048] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0049] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0050] In the field of distributed training of large-scale artificial intelligence models, GDS technology is often used for checkpoint persistence, key-value caching for swapping in and out, and training data prefetching. A typical system consists of a host CPU (Central Processing Unit), a heterogeneous GPU array, a smart network interface card, a Non-Volatile Memory Express (NVMe) storage array, and host memory. The training framework schedules high-speed data paths through relevant interfaces to complete the writing and loading of model states.
[0051] In related technologies, cross-vendor heterogeneous deployments typically employ end-to-end one-time verification and binary state judgment. Upon successful initialization, a direct connection path is immediately enabled; in case of an error, in-transit requests are aborted or the entire process is rolled back to a host memory copy path. This approach directly aborts requests upon failure, making the training process easily interrupted, and checkpoint data and cached data may also be truncated or corrupted.
[0052] This application provides a GDS degradation method. Upon receiving a degradation trigger command, it acquires a global write lock on the path control layer and suspends new I / O requests. Simultaneously, it starts an asynchronous thread to poll, waiting for in-transit I / O requests to complete or reach a timeout threshold. It pre-allocates a host-locked memory buffer and initializes the I / O context of the target copy path. Through atomic instruction operations, it switches the GDS source path to the target copy path. After the in-transit I / O request is confirmed, it unregisters the memory of the GDS source path and releases GDS resources. This method introduces path write lock suspension and parallel pre-allocation of new and old channels to establish a double-buffered data plane. It utilizes atomic routing pointer flipping to achieve control plane switching and combines asynchronous emptying of in-transit I / O requests with background probing loop. This ensures seamless switching between GDS direct transmission and software copy paths while guaranteeing normal in-transit I / O operations. This improves service continuity in the event of GDS failure.
[0053] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0054] Figure 1 This is a flowchart illustrating a GDS downgrade method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method may include:
[0055] S101. Upon receiving the downgrade trigger instruction, acquire the global write lock of the path control layer and suspend the access of new I / O requests. At the same time, start an asynchronous thread to poll and wait for the I / O requests in transit to complete or reach the timeout threshold.
[0056] A global write lock can be used to prevent new requests from being dispatched to the current GDS direct transmission channel, so that subsequent requests will not be submitted through this path during the handover.
[0057] Suspending new I / O request access can be specifically implemented by temporarily closing the submission entry for the current GDS channel, or by marking the current path as unaccessible in the submission queue, thereby intercepting newly arriving read and write requests at the routing level.
[0058] Asynchronous threads can execute polling logic in parallel in the background, periodically checking whether submitted I / O requests in transit have returned to the completion queue and recording the number and status of incomplete requests. When all in-transit I / O requests are completed, the polling thread returns a completion signal to the main process. When the waiting time reaches the timeout threshold, it returns a timeout status and enters subsequent cleanup processing. The timeout threshold is used to limit the waiting window. When an in-transit I / O request does not return within the timeout threshold, the switching control logic either enters controlled termination or switches to subsequent compensation processing. The timeout threshold can be set according to the actual situation.
[0059] In some embodiments, the global write lock is executed synchronously with the suspension of new I / O request access to ensure that no new concurrent writes occur during the clearing of I / O requests in transit, thereby allowing subsequent route flips to be established on a stable state. Through this step, historical requests on the GDS source path can continue to complete under controlled conditions, while new requests are blocked during the handover, avoiding state races and data truncation caused by request mixing.
[0060] In some embodiments, the process involves acquiring a global write lock in the path control layer and suspending new I / O request access, followed by: dividing the request into a core data stream and an auxiliary data stream based on the service label of the I / O descriptor; establishing a reference count tracking table for the core data stream and performing processing according to the steps of waiting for the I / O request in transit to complete or reaching a timeout threshold; and for the auxiliary data stream, redirecting it to a temporary buffer queue via a fast channel or performing safe discard processing.
[0061] The I / O descriptor carries request metadata, with business tags attached and used for classification to distinguish between training master data requiring continuity and non-critical data with tolerable latency. Core data flows typically correspond to requests such as checkpoint writes, key-value cache synchronization, or training state writes to disk, while auxiliary data flows correspond to log or debugging requests. A reference count tracking table records the in-transit reference relationships for each core request during switching, using request identifier, target path identifier, and commit status as associated fields to prevent the release of its processing context before confirmation. The fast lane, which can consist of a memory queue, bypass forwarding path, or lightweight redirection interface, quickly removes auxiliary data flows from the write lock protection window. A temporary buffer queue temporarily stores non-critical requests that still need to be retained, and safe discard is used to directly release resources for discardable requests.
[0062] After acquiring a global write lock, the path control layer prohibits new requests from entering the original GDS path and reads the business tags in the I / O descriptors to complete the classification. For core data flows, the control layer writes the request ID, reference count, and commit status to the trace table and continuously checks the return status of in-transit I / O requests until all are completed or the safety timeout threshold is reached before releasing the corresponding record. For auxiliary data flows, based on the current buffer capacity and switching sequence, they are written to a temporary buffer queue through a fast channel, or safely discarded if it is determined that they do not affect consistency. During this process, the trace table can reside in host memory and the count consistency is maintained by atomic operations. The buffer queue can adopt a circular queue structure to reduce insertion overhead; in practical applications, other models of this structure can also be selected.
[0063] In this way, core requests can remain traceable, verifiable, and convergent within the switching window, while auxiliary requests are isolated from the main waiting link. This ensures the continuity of the path takeover process and reduces the impact on critical training data, while keeping the data endpoints and processing status consistent during controlled switching.
[0064] S102. Pre-allocate the host-locked memory buffer and initialize the I / O context of the target copy path.
[0065] The host-locked memory buffer can be used to handle data transfer and relay access to the target copy path, so that the target path after a subsequent switch can directly use the prepared carrying space.
[0066] The target copy path can be an alternative copy path for data access after GDS downgrade. Its I / O context is initialized during the pre-configuration phase so that newly incoming I / O requests can be processed immediately after the route switch is completed.
[0067] In some embodiments, the host-locked memory buffer and the I / O context of the target copy path can be prepared in parallel to form a data plane foundation that can be directly taken over. This step eliminates the need to temporarily allocate buffer resources or rebuild the execution environment during switching, enabling the target path to quickly take over requests after route flipping and reducing additional jitter during switching.
[0068] S103. Switch the GDS source path to the target copy path through atomic instruction operations.
[0069] Atomic instruction operations are used to ensure that the update process of this control variable cannot be interrupted or observed by concurrent threads, thus avoiding intermediate states during switching. The global routing pointer can be switched from the GDS source path to the target copy path. The global routing pointer can be a core control variable in the path control layer, used to indicate which path should handle newly arriving I / O requests.
[0070] In some embodiments, after confirming that the I / O context of the target path has been initialized and the host-locked memory buffer is ready, the path control layer invokes atomic swap, atomic write, or compare-and-swap instructions to update the routing pointer from the GDS source path address or identifier to the target path address or identifier in one go. Once this update takes effect, subsequent new I / O requests are routed to the target path, while the GDS source path continues to retain the right to process submitted I / O requests in transit. The unidirectional flipping of the global routing pointer ensures a clear boundary between the old and new paths, preventing requests from switching back and forth between the two paths. After the atomic flip is completed, the path control layer can immediately release access to the target path, allowing the target path to begin accepting new requests, while maintaining the service continuity of the GDS source path for in-transit I / O requests. Through this step, the system completes route takeover within a small time window, maintaining the determinism of the switching action and providing a control basis for the parallel existence of the old and new paths.
[0071] In some embodiments, switching the GDS source path to the target copy path may further include: maintaining a transaction log in memory that maps request IDs to the target path; and recording the final write endpoint of historical requests during dual-buffer parallel takeover.
[0072] When an atomic instruction unidirectionally flips the global routing pointer from the GDS source path to the target path, the control module first marks the buffer corresponding to the target path as in a takeover state, and then directly directs newly arriving requests to the target path. Meanwhile, the GDS source path continues to carry historical requests that entered the link before the flip, thus forming a dual-buffer parallel takeover state. During this process, the transaction log continuously receives metadata such as request ID, target path, and timestamp. Write operations are completed atomically to ensure that no mapping loss or duplicate overwriting occurs during the switchover. For historical requests still on the GDS source path, the system synchronously generates a final write landing record when the write is completed, an acknowledgment is returned, or the disk write is completed, and populates the corresponding entry in the transaction log to achieve consistent evidence of the request trajectory and landing information. This method ensures that the old and new paths continue to be carried in parallel after the route flip. The transaction log provides a stable mapping between the request ID and the target path, and the final write landing record of historical requests completes the write ownership information during the switchover, making the write trajectory during the switchover process traceable and verifiable, and ensuring the integrity of the metadata required for subsequent consistency recovery and troubleshooting.
[0073] S104. After the in-transit I / O request confirmation is returned, unregister the memory of the GDS source path and release the GDS resources.
[0074] The return of an in-transit I / O request acknowledgment indicates that all requests submitted but not yet completed on the GDS source path before the degradation was triggered have returned completion results, and these results have been confirmed by the polling thread or the control layer to be complete. The GDS source path no longer carries unfinished historical requests and enters the resource reclamation phase.
[0075] Unregistering a GDS source path from memory can be specifically achieved by removing the registration relationship between the GDS source path and the relevant memory, revoking its address binding and permission binding in the GDS access channel, so that the old path no longer retains the right to directly access the relevant memory pages.
[0076] Releasing GDS resources can include reclaiming data queues, descriptors, transport channel handles, and state objects associated with data forwarding occupied by the GDS source path, and returning these resources to the system resource pool or for use by subsequent tasks.
[0077] In some embodiments, the deregistration and resource release actions are executed sequentially after the in-transit I / O requests return. First, memory registration is deregistered, then GDS resources are reclaimed, ensuring that no incomplete requests dependent on the old path mappings exist when resource release occurs. Through this step, the system completes a smooth migration from the GDS source path to the target path. Resources associated with the old path are promptly reclaimed, while the new path is already in a sustainable state, thus ending the degradation process without terminating in-transit I / O requests.
[0078] In some embodiments, unregistering the memory of the GDS source path and releasing hardware resources may further include: starting a background lightweight probe timer; periodically sending test data blocks and performing read / write verification; determining that the GDS path has recovered when the probe passes the test; and performing a reverse switch to the GDS source path.
[0079] After the background probe timer is started, the control module sends test data blocks to the target path according to a preset period and confirms whether the GDS link has recovered to a state that allows handover through read and write verification. When several consecutive probe results meet the requirements (such as correct data, normal latency, etc.), the GDS path is determined to have recovered, and a reverse handover to the GDS source path is executed. The reverse handover also adopts a double-buffering mechanism, switching the routing pointer back to the GDS path, while the software path buffer waits for the old I / O to complete and is then released. Furthermore, during the probe process where the background lightweight probe timer periodically sends test data blocks, the probe interval is dynamically adjusted based on the continuous probe results. When continuous probes fail, an exponential backoff extension strategy for the probe interval is triggered, reducing the frequency of test data blocks sent to the target GDS path to release I / O channel resources and avoid frequent probes interfering with normal service traffic.
[0080] Based on the above analysis, this application provides a GDS degradation method, which includes acquiring a global write lock of the path control layer and suspending new I / O requests after receiving a degradation trigger instruction. Simultaneously, an asynchronous thread is started to poll and wait for in-transit I / O requests to complete or reach a timeout threshold. A host-locked memory buffer is pre-allocated and the I / O context of the target copy path is initialized. The GDS source path is switched to the target copy path through atomic instruction operations. After the in-transit I / O request is confirmed and returned, the memory registration of the GDS source path is deregistered and GDS resources are released. Through the coordinated execution of global write lock, asynchronous polling, buffer pre-setting, I / O context initialization, atomic route flipping, and resource cleanup, historical requests on the GDS source path can complete and reach their destination, and new requests can continue continuously on the target path. The switching process does not require interrupting in-transit I / O requests, achieving smooth degradation and orderly resource reclamation, thereby improving service continuity in the event of GDS failure.
[0081] Based on the above embodiments, the following, in conjunction with Figure 2 This paper introduces a method for triggering GDS multi-condition degradation.
[0082] Figure 2 This is a flowchart illustrating a GDS multi-condition degradation triggering method provided in an embodiment of this application. Figure 2 As shown, the method may include:
[0083] S201. Monitor operational indicators, including: hard errors, timeouts, data errors, and performance degradation.
[0084] Hard error metrics are used to indicate the triggering conditions of serious faults during runtime. The monitoring module can make judgments based on the driver return code of the GPU direct-to-memory link, the DMA commit failure flag, or the device-side unrecoverable abnormal flag. For example, hard error metrics can be errors such as detection initialization failure, DMA transfer error, NVMe I / O error, and firmware fatal error.
[0085] The timeout metric primarily detects the waiting time for a single I / O DMA completion. The single I / O completion waiting timeout describes an abnormal state where the duration from submission to completion of a single I / O request exceeds a preset waiting threshold. The monitoring module can set a timer for each request and compare it with the preset waiting threshold.
[0086] The main data error metric is the end-to-end CRC (Cyclic Redundancy Check) error rate. The end-to-end CRC error rate measures the proportion of data writes or reads that fail to pass through the check during transmission, disk writes, and return. The monitoring module can calculate the ratio of the number of failed checks to the total number of checks and set an error rate threshold.
[0087] The performance degradation metric primarily detects sustained aggregate bandwidth. The sustained aggregate bandwidth deviation from the baseline is used to measure the degree of sustained degradation of the current aggregate throughput relative to the historical baseline. The monitoring module can aggregate the effective bandwidth of multiple channels within a fixed sampling window and compare the difference or ratio with the baseline bandwidth established during the initialization phase. It also counts the duration for which the sustained bandwidth is lower than the baseline bandwidth. If the duration reaches a preset time threshold, performance degradation is determined.
[0088] S202. When any running indicator meets its preset conditions, a downgrade trigger instruction corresponding to the running indicator level is generated.
[0089] Multiple operational indicators in S201 are continuously monitored in parallel. When any operational indicator meets the preset conditions, the corresponding response level is executed. The response levels include: emergency degradation, rapid degradation, and early warning degradation.
[0090] In some embodiments, the monitoring module can be deployed as a software daemon thread on the host CPU side, periodically reading status registers, log events, and performance counters from the smart network interface card, NVMe controller, and GPU driver, and mapping various statuses to runtime metrics. For hard errors, an immediate trigger can be used as a preset condition; for single I / O completion timeouts, a condition can be set for multiple consecutive completion wait times exceeding a preset threshold without entering the completion queue; for end-to-end CRC check error rates, a condition can be set for error rates reaching a threshold within a sliding window; for continuous aggregated bandwidth deviation from the baseline, a condition can be set for bandwidth falling below the baseline bandwidth for multiple consecutive sampling periods. The monitoring results are output as a corresponding level of degradation trigger instruction and sent to the degradation takeover logic of the path control layer to maintain in-transit I / O request processing and routing switching.
[0091] The following section, with reference to Table 1, explains the various operational indicators and preset conditions of GDS:
[0092] Table 1
[0093]
[0094] As shown in Table 1, an emergency degradation is triggered immediately when any failure or error occurs in the hard error indicators; a rapid degradation is triggered when the single I / O completion wait time significantly exceeds the preset wait threshold multiple times consecutively; a rapid degradation is triggered when the end-to-end CRC check error rate exceeds the error rate threshold; and a warning degradation is triggered when the continuously aggregated bandwidth is significantly lower than the baseline bandwidth for a duration reaching the preset time threshold. The corresponding action for emergency degradation is to immediately switch the software path, the corresponding action for rapid degradation is to switch the software path, and the corresponding action for warning degradation is to first mark suspicious cases, and then trigger degradation if the detection indicators continuously meet the conditions.
[0095] Based on the above analysis, this application provides a GDS multi-condition degradation triggering method. By continuously collecting runtime indicators and judging them according to a unified threshold system, it can map severe faults, single request blocking, data integrity abnormalities, and continuous bandwidth degradation into different levels of degradation triggering instructions. This transforms the fuzzy link degradation process into a definite hierarchical decision signal, enabling the system to match differentiated degradation processing according to the severity of the fault, effectively reducing the probability of false triggering and preparing to take over resources in advance.
[0096] Based on any of the above embodiments, the following, in conjunction with Figure 3 This paper explains the GDS hierarchical verification and adaptive degradation method.
[0097] Figure 3 This is a flowchart illustrating a GDS hierarchical verification and adaptive degradation method provided in an embodiment of this application. Figure 3 As shown, the method may include:
[0098] In the S301 and GDS verification phase, the GDS path is divided according to risk level, and a graded verification process is performed on high-risk data links between GPUs and computing DPUs across vendors in the GDS path.
[0099] In some embodiments, GDS includes cross-vendor GPUs, compute DPUs, and storage DPUs, and the data link between the cross-vendor GPUs and compute DPUs in GDS is a high-risk link; a graded verification process is performed on the high-risk link, which includes: PCIe basic detection, driver initialization, functional consistency verification, high concurrency stability testing, controllable fault injection simulation, and end-to-end snapshot integration verification.
[0100] GDS is used for GPU direct storage transfer scenarios, where cross-vendor GPUs, compute DPUs, and storage DPUs respectively undertake compute, protocol offloading, and storage routing functions.
[0101] During the GDS verification phase, the path from DPU to NVMe solid-state drive (SSD) is natively supported by the DPU vendor and has complete documentation, so it can be classified as a low-risk path, mainly performing smoke verification. The path from compute DPU to storage DPU is a cross-generational path within the same vendor with standard protocols, so it can be classified as a medium-risk path, mainly performing parameter compatibility testing. The path between cross-vendor GPUs and compute DPUs involves different vendors' Peripheral Component Interconnect Express (PCIe) controllers, driver stacks, and memory registration implementations, so it is classified as a high-risk path, performing a tiered verification process.
[0102] The tiered verification process for high-risk links can include: PCIe basic testing, driver initialization, functional consistency verification, high-concurrency stability testing, controllable fault injection simulation, and end-to-end snapshot integration verification. The tiered verifications are executed sequentially, with each level having clearly defined pass or fail criteria; if a pass is not achieved, the process stops.
[0103] Among them, PCIe basic testing can be used to confirm the link training status, negotiation rate, channel width, and register read / write connectivity. For example, the verification content of PCIe basic testing can include: PCIe link training, BAR (Base Address Register) space mapping, basic DMA read / write registers, etc.; according to the standard, it can be: lspci identification is normal, and DMA read / write is error-free; when this stage of verification fails, it can be located as a hardware problem.
[0104] Driver initialization can be used to load GPU-side drivers, DPU-side drivers, and GDS-related kernel modules, and to verify DMA mapping and memory registration capabilities. For example, driver initialization verification may include: GDS driver loading, device handle opening, memory registration, NVMe device enumeration, etc.; a passing standard is: all items pass without errors using a testing tool (such as gdscheck); when this stage of verification fails, it can be located as a driver issue or a version compatibility issue.
[0105] Functional consistency verification can be used to perform controlled read and write operations and compare the returned data, offset address, and check value. For example, the verification content of functional consistency verification may include: single-queue small block random read and write, low queue depth, verification of functional correctness and latency. When the verification fails at this stage, it can be located as a basic functional problem, and it is necessary to check the driver or firmware fault.
[0106] High-concurrency stability testing can be used to continuously initiate transmission requests under conditions of high queue depth and multiple concurrent sessions, and record throughput, latency, and retry status. For example, the verification content of high-concurrency stability testing can include: large block sequential writes, high queue depth, testing aggregate bandwidth, and concurrency stability; the criteria can be: aggregate bandwidth reaching a high percentage of the bandwidth threshold, and continuous operation without errors; when this stage of verification fails, it can be located as a performance tuning issue, and relevant parameters can be adjusted.
[0107] Controllable fault injection simulation can be used to apply anomalies such as link deceleration, instantaneous retraining, or data bit flipping in an isolated environment to verify the link's response to anomalies. For example, the verification content of controllable fault injection simulation can include: mixed traffic of checkpoint and KV Cache (Key-Value Cache), using software-layer controllable and reversible fault injection to simulate PCIe deceleration, link interruption, DMA latency, and occasional CRC errors (performing basic PCIe checks before injection, setting injection strength, duration, and frequency), etc. The passing criteria are: the fault does not cause data corruption, the degradation mechanism is triggered normally; no real L1 hardware faults (continuous link interruption, BAR mapping failure, etc.) are induced during the injection, and the basic PCIe checks pass after the injection. If the verification fails at this stage, the fault tolerance mechanism needs to be improved and the error handling path strengthened. If a real hardware fault is induced, the injection should be stopped immediately.
[0108] End-to-end snapshot integration verification can be used to integrate the checkpoint write, read, and restore actions of the training framework into the same verification loop, and confirm that snapshot data can be completely migrated between the GPU, DPU, and storage. For example, the verification content of end-to-end snapshot integration verification may include: interfacing with the training framework, the entire process of actual checkpoint saving or loading, and key verification of cache metrics: KV cache swapping out or in consistency, cache loading throughput and end-to-end latency, cache hit rate, and GPU memory or host locked memory buffer reuse efficiency. The criteria for passing these verifications are: correct checkpoint write or loading; reproducible training or inference output after KV cache reload (zero cache data corruption); cache loading latency, hit rate, and throughput all meet the standards; and continuous and stable operation. If this stage of verification fails, it indicates an overall process problem, requiring full-process joint debugging.
[0109] During the GDS system deployment initialization phase, the end-to-end data path is first risk-classified based on the vendor compatibility between the computing unit and the smart network interface card (NIC). A tiered verification process is then executed, and the verified adaptation parameters and threshold baselines are written to the configuration table. Once the system enters the regular training and runtime state, the control module switches to dynamic monitoring mode. It reads the configuration table baseline and executes a real-time calculation process that continuously acquires multi-dimensional data according to the sampling period, performs sliding window denoising, exponential weighted smoothing and normalization mapping, and calculates a health score based on dynamic weight coefficients. The deployment phase's tiered verification and runtime online monitoring are isolated by a timeline. The verification phase generates the baseline configuration and releases system monitoring resources, while the runtime phase performs high-frequency indicator collection and continuous scoring calculations based on this baseline, avoiding resource contention between long-cycle verification tasks and lightweight probe threads.
[0110] The above method first confirms physical connectivity, then verifies driver and protocol capabilities, subsequently tests link stability under load and abnormal conditions, and finally completes integration verification by combining the snapshot service of the training framework. This allows compatibility defects between cross-vendor GPUs and computing DPU links to be exposed before deployment. This reduces operational interruptions caused by bandwidth attenuation, occasional verification errors, or protocol incompatibility, and improves the continuous availability and data integrity of the GDS path in distributed training.
[0111] During the S302 and GDS operation phases, multi-dimensional data is continuously acquired according to the sampling period.
[0112] Multi-dimensional data is continuously acquired according to the sampling period. The multi-dimensional data includes: I / O operation count, latency sample, aggregate bandwidth, CRC error rate, PCIe link quality, and hardware temperature.
[0113] The sampling period can be set according to the actual situation; for example, the sampling period can be set to 1 second.
[0114] Among the multi-dimensional data, I / O operation counts can be used to characterize access activity within a unit sampling period (e.g., 60 seconds); latency samples can be used to characterize read / write response latency, for example, calculated based on the most recent 100 I / O samples; aggregate bandwidth can be used to characterize link throughput, for example, calculated using an exponentially weighted moving average smoothing method (e.g., a smoothing coefficient set to 0.3); CRC error rate can be used to characterize the proportion of transmission check failures; PCIe link quality can be used to characterize the stability of the underlying interconnect; and hardware temperature can be used to characterize the operating thermal state. The above data can be synchronously read within the sampling period by the path control layer, driver monitoring module, or firmware-side acquisition interface, and written to a circular buffer for subsequent noise reduction and scoring processing.
[0115] S303. Perform sliding window denoising, exponential weighted smoothing and normalization mapping on multi-dimensional data, and calculate the health score based on the dynamic weight coefficients.
[0116] Sliding window denoising can filter continuous sampling points according to a preset window length, eliminating spurious samples exceeding a threshold or suppressing transient anomalies using median replacement; exponentially weighted smoothing can recursively calculate the time decay coefficient of the denoised sequence, giving more weight to recent states in the score; normalization mapping can convert data of different dimensions into a unified numerical range, facilitating their participation in the same scoring model. Dynamic weight coefficients can be adjusted online based on the fluctuation range of current indicators, the degree of deviation from historical baselines, and the correlation between indicators, enabling the health score to reflect the operational trend.
[0117] The health score can be obtained by weighted summation of normalized data from each dimension. For example, the health score can range from 0 to 100, with a higher score indicating a healthier GDS status.
[0118] S304. When the health score reaches the preset level warning conditions, the corresponding warning processing shall be executed.
[0119] For example, preset tiered early warning conditions can be represented by setting ranges for health scores, with different ranges corresponding to different warning levels. The specific correspondence between health scores and levels can be set according to actual conditions. For instance, when the health score is 80-100, the warning level is green, indicating a healthy state; when the health score is 60-79, the warning level is yellow, indicating a sub-healthy state; when the health score is 40-59, the warning level is orange, indicating an abnormal state; and when the health score is less than 40, the warning level is red, indicating a faulty state.
[0120] The corresponding early warning processing can include: triggering mild jitter alerts, link sub-health alerts, or severe anomaly alerts, and driving log recording, threshold tightening, request rate limiting, path observation, or degradation preparation. This early warning processing is executed in conjunction with the GDS path control layer to issue early warnings in the early stages of link performance degradation and to reserve conditions for subsequent takeover.
[0121] The following section explains the health score and corresponding early warning procedures, referring to Table 2:
[0122] Table 2
[0123]
[0124] When the health score is in the range of 60-79, the corresponding warning action can be: reduce concurrency and increase monitoring frequency; when the health score is in the range of 40-59, the corresponding warning action can be: warm up the software path context and prepare for degradation; when the health score is less than 40, the corresponding warning action can be: immediately trigger degradation and switch to running on the software path.
[0125] Furthermore, during the state transition process corresponding to the health score, a hysteresis design mechanism (leaving a buffer zone between the recovery threshold and the re-degradation threshold, such as a recovery threshold of 75 points and a re-degradation threshold of 65 points) is adopted for threshold buffer management. A state buffer zone is preset between the early warning degradation zone and the emergency degradation zone. When the health score crosses the early warning threshold, a degradation preparation action is triggered. The degradation state is lifted only when the health score rises back to the recovery threshold. The recovery threshold is higher than the early warning threshold. The state buffer zone is used to suppress frequent oscillations in the critical state and is linked to operational indicators for judgment. When any operational indicator meets the preset conditions, a degradation action is directly triggered from any current state.
[0126] Based on the above analysis, the acquisition module inputs the raw time-series data into a sliding window filter to remove instantaneous spikes. Then, an exponential weighting algorithm is used to attenuate the weights of historical data, strengthening the representation of recent conditions. Normalization mapping maps indicators of different dimensions to a unified numerical space. Dynamic weight coefficients are updated online based on the fluctuation range of each indicator and its deviation from the baseline, and a weighted sum is used to obtain a continuous health score. The scoring module compares the continuous values with multi-level warning intervals, triggering corresponding level-based rate limiting, load reduction, or context warm-up commands. This process effectively filters false alarms caused by instantaneous network congestion and load fluctuations, activating protection before latent faults evolve into data corruption, extending the warning window period, and reducing the risk of service interruption.
[0127] S305. Parallel monitoring of runtime indicators, including: hard errors, timeouts, data errors, and performance degradation.
[0128] The execution process of S305 can be found in S201, and will not be repeated here.
[0129] S306. When any running state indicator meets its preset conditions, a downgrade trigger instruction corresponding to the running state indicator level is generated.
[0130] The execution process of S306 can be found in S202, and will not be repeated here.
[0131] After receiving the downgrade trigger instruction, S307 and GDS acquire the global write lock of the path control layer and suspend the access of new I / O requests. At the same time, they start an asynchronous thread to poll and wait for the I / O requests in transit to complete or reach the timeout threshold.
[0132] The execution process of S307 can be found in S101, and will not be repeated here.
[0133] S308. Pre-allocate the host-locked memory buffer and initialize the I / O context of the target copy path.
[0134] The execution process of S308 can be found in S102, and will not be repeated here.
[0135] S309. Switch the GDS source path to the target copy path through atomic instruction operations.
[0136] The execution process of S309 can be found in S103, and will not be repeated here.
[0137] S310. After the in-transit I / O request confirmation is returned, unregister the memory of the GDS source path and release the GDS resources.
[0138] The execution process of S310 can be found in S104, and will not be repeated here.
[0139] Based on the above analysis, this application provides a GDS hierarchical verification and adaptive degradation method. During the GDS verification phase, GDS paths are divided according to risk levels, and a hierarchical verification process is performed on high-risk data links between cross-vendor GPUs and computing DPUs within the GDS path. During the GDS operation phase, multi-dimensional data is continuously acquired according to the sampling period; sliding window denoising, exponential weighted smoothing, and normalization mapping are performed on the multi-dimensional data, and a health score is calculated based on dynamic weight coefficients; when the health score reaches the preset hierarchical warning conditions, corresponding warning processing is executed. Parallel monitoring of operational indicators, including hard errors, timeouts, data errors, and performance degradation, is conducted; when any operational indicator meets its preset conditions, a degradation trigger instruction corresponding to the operational indicator's level is generated. Upon receiving the downgrade trigger instruction, acquire the global write lock of the path control layer and suspend new I / O requests. Simultaneously, start an asynchronous thread to poll and wait for in-transit I / O requests to complete or reach the timeout threshold. Pre-allocate the host-locked memory buffer and initialize the I / O context of the target copy path. Through atomic instruction operations, switch the GDS source path to the target copy path. After the in-transit I / O request is confirmed and returned, unregister the memory of the GDS source path and release GDS resources.
[0140] Figure 4 This is a schematic diagram of the structure of a GDS downgrade device provided in an embodiment of this application, as shown below. Figure 4 As shown, the GDS downgrade device 400 provided in this application embodiment includes: an acquisition module 401 and a processing module 402;
[0141] The acquisition module 401 is used to acquire the global write lock of the path control layer and suspend the access of new I / O requests after receiving the downgrade trigger instruction. At the same time, it starts an asynchronous thread to poll and wait for the I / O requests in transit to complete or reach the timeout threshold.
[0142] Processing module 402 is used to pre-allocate host-locked memory buffers and initialize the I / O context of the target copy path;
[0143] The processing module 402 is also used to switch the GDS source path to the target copy path through atomic instruction operations;
[0144] The processing module 402 is also used to unregister the memory registration of the GDS source path and release the GDS resources after the in-transit I / O request confirmation is returned.
[0145] The GDS downgrade device provided in this application embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0146] In one possible implementation, the acquisition module 401 is further configured to:
[0147] Monitor runtime metrics, including: hard errors, timeouts, data errors, and performance degradation;
[0148] When any running indicator meets its preset conditions, a downgrade trigger instruction corresponding to the running indicator level is generated.
[0149] In one possible implementation, GDS includes cross-vendor GPUs, compute DPUs, and storage DPUs. The data link between the cross-vendor GPUs and compute DPUs in GDS is a high-risk link. Processing module 402 is also used for:
[0150] A tiered verification process is implemented for high-risk links. The tiered verification process includes: PCIe basic testing, driver initialization, functional consistency verification, high concurrency stability testing, controllable fault injection simulation, and end-to-end snapshot integration verification.
[0151] In one possible implementation, the processing module 402 is further configured to:
[0152] Multi-dimensional data is continuously acquired according to the sampling period. The multi-dimensional data includes: I / O operation count, latency sample, aggregate bandwidth, CRC error rate, PCIe link quality, and hardware temperature.
[0153] The system performs sliding window denoising, exponential weighted smoothing, and normalization mapping on multi-dimensional data, and calculates the health score based on dynamic weight coefficients.
[0154] When the health score reaches the preset warning level, the corresponding warning action will be executed.
[0155] In one possible implementation, the processing module 402 is further configured to:
[0156] Based on the business labels of the I / O descriptors, requests are divided into core data streams and auxiliary data streams;
[0157] Establish a reference count tracking table for the core data flow and perform processing according to the steps of waiting for in-transit I / O requests to complete or reaching the timeout threshold;
[0158] For auxiliary data streams, redirect them to a temporary buffer queue via a fast channel or perform safe discarding.
[0159] In one possible implementation, the processing module 402 is further configured to:
[0160] Maintain a transaction log in memory that maps request IDs to target paths;
[0161] Record the final write endpoint of historical requests during dual-buffered parallel takeover.
[0162] In one possible implementation, the processing module 402 is further configured to: start a background lightweight probe timer; periodically send test data blocks and perform read / write verification; determine that the GDS path has been restored when the probe meets the standard; and perform a reverse switch to the GDS source path.
[0163] The GDS downgrade device provided in this application embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0164] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 500 provided in this application embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 500 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.
[0165] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0166] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. The embodiments of this application will not be repeated here.
[0167] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0168] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0169] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0170] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0171] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0172] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0173] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0174] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0175] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0176] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0177] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0178] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0179] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A GDS downgrade method, characterized in that, The method includes: Upon receiving the downgrade trigger instruction, acquire the global write lock of the path control layer and suspend the access of new I / O requests. At the same time, start an asynchronous thread to poll and wait for the I / O requests in transit to complete or reach the timeout threshold. Pre-allocate a host-locked memory buffer and initialize the I / O context for the target copy path; The GDS source path is switched to the target copy path through atomic instruction operations; After the in-transit I / O request is confirmed and returned, the memory registration of the GDS source path is deregistered and the GDS resources are released.
2. The method according to claim 1, characterized in that, After receiving the downgrade trigger command, the preceding steps also include: Monitor runtime metrics, including: hard errors, timeouts, data errors, and performance degradation; When any of the aforementioned operational indicators meets its respective preset conditions, a downgrade trigger instruction corresponding to the level of the operational indicator is generated.
3. The method according to claim 2, characterized in that, The GDS includes cross-vendor GPUs, compute DPUs, and storage DPUs. The data link between the cross-vendor GPUs and compute DPUs in the GDS is a high-risk link. The method further includes: A tiered verification process is performed on the high-risk links. The tiered verification process includes: PCIe basic detection, driver initialization, functional consistency verification, high concurrency stability testing, controllable fault injection simulation, and end-to-end snapshot integration verification.
4. The method according to claim 3, characterized in that, The method further includes: Multi-dimensional data is continuously acquired according to the sampling period. The multi-dimensional data includes: I / O operation count, latency sample, aggregate bandwidth, CRC error rate, PCIe link quality, and hardware temperature. The multi-dimensional data is subjected to sliding window denoising, exponential weighted smoothing and normalization mapping, and a health score is calculated based on the dynamic weight coefficients. When the health score reaches the preset level warning condition, the corresponding warning process will be executed.
5. The method according to claim 4, characterized in that, The process of acquiring the global write lock of the path control layer and suspending new I / O request access also includes: Based on the business labels of the I / O descriptors, requests are divided into core data streams and auxiliary data streams; A reference count tracking table is established for the core data stream, and processing is performed according to the steps of waiting for in-transit I / O requests to complete or reach the timeout threshold; For the auxiliary data stream, it is either redirected to a temporary buffer queue via a fast channel or subjected to safe discarding.
6. The method according to claim 5, characterized in that, The step of switching the GDS source path to the target copy path via atomic instruction operations further includes: Maintain a transaction log in memory that maps request IDs to target paths; Record the final write endpoint of historical requests during dual-buffered parallel takeover.
7. The method according to any one of claims 1-6, characterized in that, The process of unregistering the memory registration of the GDS source path and releasing hardware resources then includes: Start a lightweight background detection timer; Test data blocks are distributed periodically and read / write verifications are performed. When the detection criteria are met, the GDS path is determined to be restored. Perform a reverse switch to the GDS source path.
8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method according to any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method described in any one of claims 1-7.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.
