A method, system and storage medium for managing heterogeneous devices within a node

CN114968480BActive Publication Date: 2026-11-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210475649.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2026-11-03
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

In the application of heterogeneous device virtualization technology in data centers, there are specific problems that existing technologies cannot effectively solve, including: the inability of existing technologies to achieve efficient resource management and rational use of resources from heterogeneous devices.

Method used

By delaying the reclamation of heterogeneous devices in virtual machines, and selecting the device with the longest unused time for reclamation based on the resources and request status within the node, the rational utilization of heterogeneous devices can be achieved.

Benefits of technology

By delaying the recycling time of heterogeneous equipment, unreasonable recycling operations are avoided, the rational utilization of heterogeneous equipment is achieved, and the efficiency of resource use is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968480B_ABST
    Figure CN114968480B_ABST
Patent Text Reader

Abstract

The application discloses a kind of management methods, systems and storage medium of heterogeneous equipment in node, it is related to computer technical field, the method includes: receiving the use completion information of at least one heterogeneous equipment;According to the use completion information, determine whether the waiting queue exists virtual machine heterogeneous equipment request;According to the waiting queue does not exist virtual machine heterogeneous equipment request, the heterogeneous equipment of use completion is marked as sleep state equipment;Receive new virtual machine heterogeneous equipment request, and according to the new virtual machine heterogeneous equipment request, recycle the sleep state equipment.The application can use the equipment in virtual machine, not immediately recycle, but according to the resource and request situation in node, delay recovery time, avoid unreasonable recovery operation, when there are multiple optional equipment for recycling, select the longest time of non-use equipment for recycling, realize the rational use of heterogeneous equipment in node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to a management method, system, and storage medium for heterogeneous devices within a node. Background Technology

[0002] Currently, data centers are introducing heterogeneous computing devices, different from CPUs, such as GPUs (graphics processing units), FPGAs (Field Programmable Gate Arrays), and domain-specific accelerators to increase their computing density. Because the virtualization technology for these heterogeneous computing devices is still underdeveloped, these devices are typically provided to virtual machines for cloud users in a pass-through manner. While pass-through ensures the availability and high performance of heterogeneous devices within virtual machines, its scalability is poor and its utilization rate is relatively low. This is because, during the virtual machine's lifecycle, the pass-through heterogeneous device can only be exclusively used by that virtual machine and cannot be used by other virtual machines, even if the heterogeneous device is idle during this period.

[0003] Existing technologies propose a scheme where heterogeneous devices are not bound to virtual machines. This scheme is based on a hot-swapping mechanism, where heterogeneous devices passed to virtual machines are forcibly reclaimed by the host. If another virtual machine requests the heterogeneous device, the host can then pass the reclaimed device to it, enabling the reuse of heterogeneous devices across multiple virtual machines. However, this scheme only describes a mechanism where a single device can be shared and reused by multiple virtual machines, and typically, multiple heterogeneous devices exist within a single node. In the case of multiple heterogeneous devices, immediately forcibly reclaiming the device after use is unreasonable, as other idle devices may still exist. Furthermore, as long as the virtual machine hasn't terminated, the heterogeneous device is likely to be accessed again, and both reclamation and pass-through consume time, hindering efficient resource management. Summary of the Invention

[0004] To address at least one of the problems mentioned in the background art, this invention provides a method, system, and storage medium for managing heterogeneous devices within a node. Instead of immediately reclaiming devices that have been used in a virtual machine, the reclamation time is delayed based on the node's resources and request status, thus avoiding unreasonable reclamation operations. When multiple devices are available for reclamation, the device with the longest unused time is selected for reclamation, achieving rational utilization of heterogeneous devices within the node.

[0005] The specific technical solutions provided by the embodiments of the present invention are as follows:

[0006] Firstly, a method for managing heterogeneous devices within a node is provided, the method comprising:

[0007] Receive completion information for at least one heterogeneous device;

[0008] Based on the usage completion information, determine whether there are virtual machine heterogeneous device requests in the waiting queue;

[0009] If there are no virtual machine heterogeneous device requests in the waiting queue, the heterogeneous device that has been used is marked as a sleeping device.

[0010] Receive new virtual machine heterogeneous device requests, and reclaim the sleeping device according to the new virtual machine heterogeneous device requests.

[0011] Furthermore, the method also includes:

[0012] If the sleep state device does not exist, the new virtual machine heterogeneous device request is added to the waiting queue.

[0013] Furthermore, it also includes:

[0014] If there are virtual machine heterogeneous device requests in the waiting queue, the heterogeneous devices that have been used are recycled;

[0015] The heterogeneous device service that has been used is allocated to the virtual machine corresponding to the heterogeneous device request.

[0016] Furthermore, the allocation of the heterogeneous device service to the virtual machine corresponding to the heterogeneous device request specifically includes:

[0017] Query the first virtual machine corresponding to the first virtual machine heterogeneous device request that entered the waiting queue;

[0018] The heterogeneous device service that has been used is assigned to the first virtual machine.

[0019] Furthermore, before reclaiming the sleeping device according to the new virtual machine heterogeneous device request, the process includes:

[0020] Based on the new virtual machine heterogeneous device request, query whether there are any idle heterogeneous devices;

[0021] If such a virtual machine exists, the idle heterogeneous device is allocated to serve the virtual machine corresponding to the new heterogeneous device request.

[0022] If no idle heterogeneous device exists, the sleep state device is reclaimed.

[0023] Furthermore, when the heterogeneous device that has been used is marked as a sleep state device, the sleep state time is recorded.

[0024] Furthermore, the step of reclaiming the sleeping device according to the new virtual machine heterogeneous device request specifically includes:

[0025] If there are multiple sleep state devices, compare the sleep state times of the multiple sleep state devices;

[0026] Recycle the heterogeneous device that has been in a sleep state for the longest time.

[0027] Secondly, a management system for heterogeneous devices within a node is provided, the system comprising:

[0028] A receiving module is configured to receive usage completion information for at least one of the heterogeneous devices;

[0029] The determination module is used to determine whether there is a virtual machine heterogeneous device request in the waiting queue based on the usage completion information.

[0030] The setting module is used to mark the heterogeneous device that has been used as a sleep device if there is no virtual machine heterogeneous device request in the waiting queue.

[0031] A processing module is configured to receive new virtual machine heterogeneous device requests and reclaim the sleeping device according to the new virtual machine heterogeneous device requests.

[0032] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0033] Receive completion information for at least one heterogeneous device;

[0034] Based on the usage completion information, determine whether there are virtual machine heterogeneous device requests in the waiting queue;

[0035] If there are no virtual machine heterogeneous device requests in the waiting queue, the heterogeneous device that has been used will be marked as a sleeping device;

[0036] Receive new virtual machine heterogeneous device requests, and reclaim the sleeping device according to the new virtual machine heterogeneous device requests.

[0037] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, performs the following steps:

[0038] Receive completion information for at least one heterogeneous device;

[0039] Based on the usage completion information, determine whether there are virtual machine heterogeneous device requests in the waiting queue;

[0040] If there are no virtual machine heterogeneous device requests in the waiting queue, the heterogeneous device that has been used will be marked as a sleeping device;

[0041] Receive new virtual machine heterogeneous device requests, and reclaim the sleeping device according to the new virtual machine heterogeneous device requests.

[0042] The embodiments of the present invention have the following beneficial effects:

[0043] 1. In this invention, after a heterogeneous device has finished using its device, the system determines whether there is a virtual machine heterogeneous device request in the waiting queue, and then marks the used heterogeneous device as a sleeping device. When a new virtual machine heterogeneous device request is received, the sleeping device is recycled and allocated to the new virtual machine heterogeneous device request so that the corresponding virtual machine can use it. This method of delaying the recycling of devices that have finished using them in the virtual machine avoids the waste of time caused by unreasonable recycling. At the same time, the device with the longest sleep time is selected for recycling, so as to achieve the rational utilization of heterogeneous devices within the node.

[0044] 2. In the waiting queue, if there is a request for a heterogeneous device for a virtual machine, the heterogeneous device that has been used is reclaimed and the used heterogeneous device is allocated to serve the device corresponding to the request for the heterogeneous device of the virtual machine, so as to ensure that when there is a device request, the heterogeneous device can be allocated in a timely manner for its use.

[0045] 3. Before reclaiming a sleeping device based on a new virtual machine heterogeneous device request, first check if there is an idle heterogeneous device. If an idle device exists, allocate the idle device to serve the device corresponding to the new virtual machine heterogeneous device request; if no idle device exists, reclaim the sleeping device and allocate the reclaimed device to serve the device corresponding to the new virtual machine heterogeneous device request. Attached Figure Description

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

[0047] Figure 1 This is a schematic diagram illustrating the management method in this application;

[0048] Figure 2 This is a schematic diagram illustrating the specific process of the management method in this application;

[0049] Figure 3 This is a schematic diagram illustrating the internal structure of the computer device in this application. Detailed Implementation

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

[0051] Currently, data centers have introduced heterogeneous computing devices, such as GPUs (graphics processing units), FPGAs (Field Programmable Gate Arrays), and domain-specific accelerators, to improve their computing density. Because the virtualization technology for these heterogeneous computing devices is still underdeveloped, these devices are typically provided to virtual machines (VMs) for cloud users in a pass-through manner. While pass-through ensures the availability and high performance of heterogeneous devices within VMs, its scalability is poor and its utilization rate is relatively low. This is because, during the VM's lifecycle, the pass-through heterogeneous device can only be exclusively used by that VM and cannot be used by other VMs, even if the device is idle during this period. Existing technologies propose a scheme where heterogeneous devices are not bound to VMs. Based on a hot-swappable mechanism, a heterogeneous device pass-through to a VM can be forcibly reclaimed by the host. If another VM requests the heterogeneous device, the host can pass-through the reclaimed device to it, enabling the reuse of heterogeneous devices across multiple VMs. This scheme only describes a mechanism by which a single device can be shared and reused by multiple VMs, and typically, multiple heterogeneous devices exist within a single node. In scenarios with multiple heterogeneous devices, immediately and forcibly reclaiming each device after use is unreasonable. This is because other idle devices may exist, and as long as the virtual machine hasn't terminated, the heterogeneous device is likely to be accessed again. Reclaiming and pass-through both consume time, hindering efficient resource management. To address these issues, this application proposes a method, system, and storage medium for managing heterogeneous devices within a node, aiming to achieve rational utilization of resources within the node.

[0052] Example 1

[0053] A method for managing heterogeneous devices within a node, such as Figure 1 As shown, it includes the following steps:

[0054] Step S1: Receive usage completion information for at least one heterogeneous device, and determine whether there is a virtual machine heterogeneous device request in the waiting queue based on the usage completion information.

[0055] A single node may contain multiple heterogeneous devices, specifically GPUs, FPGAs, and domain-specific accelerators. These heterogeneous devices are used in conjunction with virtual machines (VMs) and are provided to VMs via pass-through for cloud users. However, during the VM's lifecycle, the pass-through heterogeneous device is exclusively used by that VM and cannot be used by other VMs, even if the device is idle during this period. Therefore, in this application, when a heterogeneous device finishes use, it sends a completion message. The host receives this message and then checks the waiting queue for any pending VM heterogeneous device requests, confirming that no such requests exist.

[0056] If a virtual machine heterogeneous device request exists in the waiting queue, the completed heterogeneous device is immediately reclaimed and assigned to the virtual machine corresponding to the request. Since there is only one virtual machine heterogeneous device request in the waiting queue, no selection is needed; the host directly assigns the completed heterogeneous device to that single request. If there are at least two virtual machine heterogeneous device requests in the waiting queue, they are arranged according to their order of entry. When the host queries the waiting queue, it finds the first virtual machine corresponding to the earliest heterogeneous device request and assigns the completed heterogeneous device to that first virtual machine, ensuring that the heterogeneous device works in conjunction with the virtual machine.

[0057] Step S2: If there are no virtual machine heterogeneous device requests in the waiting queue, mark the completed heterogeneous device as a sleeping device.

[0058] If there are no requests for heterogeneous devices in the waiting queue, the heterogeneous device that has been used is not immediately reclaimed. Instead, it is marked as a sleep device. This sleep state indicates that the device is not in use and can be reclaimed when needed, thus avoiding unreasonable reclamation operations. Furthermore, the sleep state time is recorded when the device is marked as sleep, facilitating subsequent calculation of its sleep time.

[0059] Step S3: Receive new virtual machine heterogeneous device requests and reclaim sleeping devices according to the new virtual machine heterogeneous device requests.

[0060] When a virtual machine needs to request a device, it first sends a new virtual machine heterogeneous device request. First, the host checks if there is an idle heterogeneous device based on the new request, where an idle heterogeneous device is identified by its idle state. If an idle heterogeneous device exists, it is allocated to serve the virtual machine corresponding to the new request. If no idle heterogeneous device exists, the sleeping device is reclaimed and allocated to the new request.

[0061] Specifically, if only one sleeping device exists, the host directly reclaims this sleeping device and allocates it to a new heterogeneous virtual machine requesting the corresponding virtual machine. If multiple sleeping devices exist, the sleep times of the multiple sleeping devices are compared, the sleeping device with the longest sleep time is found, and then the sleeping device with the longest sleep time is reclaimed for use by a new heterogeneous virtual machine requesting the corresponding virtual machine.

[0062] In addition, if there are no sleeping devices at this time, it means that all heterogeneous devices are in the working state and cannot be reclaimed. New virtual machine heterogeneous device requests need to be added to the waiting queue until an idle device or a sleeping device becomes available for allocation.

[0063] The above management method ensures that heterogeneous devices provided to virtual machines via pass-through are not immediately reclaimed after use. Instead, the host marks them as sleep devices, indicating that they are not in use and can be reclaimed when needed. This avoids wasted time due to unreasonable reclamation and pass-through. In this application, after a heterogeneous device is used, it is determined that there are no virtual machine heterogeneous device requests in the waiting queue, and then the used heterogeneous device is marked as a sleep device. When a new virtual machine heterogeneous device request is received, the sleep device is reclaimed and allocated to the new request. This delayed reclamation of devices after use within the virtual machine avoids wasted time due to unreasonable reclamation. Furthermore, the device with the longest sleep time is selected for reclamation, achieving rational utilization of heterogeneous devices within the node.

[0064] Example 2

[0065] Corresponding to the above embodiments, this application provides a management system for heterogeneous devices within a node, the system comprising:

[0066] The receiving module is used to receive usage completion information from at least one heterogeneous device;

[0067] The determination module is used to determine whether there are virtual machine heterogeneous device requests in the waiting queue based on the usage completion information;

[0068] The configuration module is used to mark heterogeneous devices that have been used as sleep devices if there are no virtual machine heterogeneous device requests in the waiting queue.

[0069] The processing module is used to receive new virtual machine heterogeneous device requests and reclaim sleep state devices according to the new virtual machine heterogeneous device requests.

[0070] In a preferred embodiment, the determination module is further configured to, when there are virtual machine heterogeneous device requests in the waiting queue, reclaim used heterogeneous devices and allocate the used heterogeneous devices to serve the virtual machines corresponding to the virtual machine heterogeneous device requests. Specifically, the used heterogeneous devices are immediately reclaimed and allocated to serve the virtual machines corresponding to the virtual machine heterogeneous device requests. Since there is only one virtual machine heterogeneous device request in the waiting queue after a device request enters it, no selection is required, and the host directly allocates the used heterogeneous device to the only virtual machine heterogeneous device request. If there are at least two virtual machine heterogeneous device requests in the waiting queue, the virtual machine heterogeneous device requests are arranged according to the order in which they entered the waiting queue. When the host queries the waiting queue, it finds the first virtual machine corresponding to the first virtual machine heterogeneous device request that entered the waiting queue first, and the host allocates the used heterogeneous device to serve the first virtual machine, so that the heterogeneous devices can be used in conjunction with the virtual machines.

[0071] In a preferred embodiment, the processing module is further configured to receive new virtual machine heterogeneous device requests and query whether there are any idle heterogeneous devices, wherein an idle heterogeneous device is in an idle state; if an idle heterogeneous device exists, the idle heterogeneous device is allocated to serve the device corresponding to the new virtual machine heterogeneous device request; if no idle heterogeneous device exists, the sleeping device is reclaimed and allocated to the virtual machine corresponding to the new virtual machine heterogeneous device request.

[0072] Specifically, if only one sleeping device exists, the host directly reclaims this sleeping device and allocates it to a new heterogeneous virtual machine requesting the corresponding virtual machine. If multiple sleeping devices exist, the sleep times of the multiple sleeping devices are compared, the sleeping device with the longest sleep time is found, and then the sleeping device with the longest sleep time is reclaimed for use by a new heterogeneous virtual machine requesting the corresponding virtual machine.

[0073] In a preferred embodiment, the processing module is further configured to add new virtual machine heterogeneous device requests to the waiting queue when no sleeping device exists. This indicates that all heterogeneous devices are currently in a working state and cannot be reclaimed. New virtual machine heterogeneous device requests need to be added to the waiting queue until an idle device or a sleeping device becomes available for allocation.

[0074] The management system in this embodiment enables the use of heterogeneous devices by passing them through to virtual machines. After use, the devices are not immediately recycled. Instead, the host marks them as sleep devices, indicating that the heterogeneous devices are not in use and can be recycled when needed, thus avoiding the waste of time caused by unreasonable recycling and pass-through.

[0075] Example 3

[0076] A computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:

[0077] Step 101: Receive completion information for at least one heterogeneous device;

[0078] Step 102: Based on the usage completion information, determine whether there are virtual machine heterogeneous device requests in the waiting queue;

[0079] Step 103: If there are no virtual machine heterogeneous device requests in the waiting queue, mark the completed heterogeneous device as a sleeping device;

[0080] Step 104: Receive new virtual machine heterogeneous device requests and reclaim sleeping devices according to the new virtual machine heterogeneous device requests.

[0081] In a preferred embodiment, step 102 further includes reclaiming used heterogeneous devices when there are virtual machine heterogeneous device requests in the waiting queue, and allocating the used heterogeneous devices to serve the virtual machines corresponding to the virtual machine heterogeneous device requests. Specifically, the used heterogeneous devices are immediately reclaimed and allocated to serve the virtual machines corresponding to the virtual machine heterogeneous device requests. Since there is only one virtual machine heterogeneous device request in the waiting queue after a device request enters it, no selection is required, and the host directly allocates the used heterogeneous device to the only virtual machine heterogeneous device request. If there are at least two virtual machine heterogeneous device requests in the waiting queue, the virtual machine heterogeneous device requests are arranged according to the order in which they entered the waiting queue. When the host queries the waiting queue, it finds the first virtual machine corresponding to the first virtual machine heterogeneous device request that entered the waiting queue first, and the host allocates the used heterogeneous device to serve the first virtual machine, so that the heterogeneous devices can be used in conjunction with the virtual machines.

[0082] In a preferred embodiment, step 103 further includes: if there are no virtual machine heterogeneous device requests in the waiting queue, the heterogeneous device that has been used is not immediately reclaimed. Instead, it is marked as a sleep device, indicating that it is not in use and can be reclaimed when needed, thus avoiding unreasonable reclamation operations. Furthermore, while marking the used heterogeneous device as a sleep device, the sleep state time of the device is recorded for subsequent calculation of its sleep time.

[0083] In a preferred embodiment, step 104 further includes the host querying whether there is an idle heterogeneous device based on the new virtual machine heterogeneous device request, wherein the idle heterogeneous device is in an idle state; if an idle heterogeneous device exists, the idle heterogeneous device is allocated to serve the virtual machine corresponding to the new virtual machine heterogeneous device request; if no idle heterogeneous device exists, the sleeping device is reclaimed and allocated to the new virtual machine heterogeneous device request.

[0084] Specifically, if only one sleeping device exists, the host directly reclaims this sleeping device and allocates it to a new virtual machine heterogeneous device request. If multiple sleeping devices exist, the sleep times of the multiple sleeping devices are compared, the sleeping device with the longest sleep time is found, and then the sleeping device with the longest sleep time is reclaimed for use by a new virtual machine heterogeneous device request.

[0085] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data of devices marked as being in sleep mode. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for managing heterogeneous devices within a node.

[0086] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0087] Example 4

[0088] In one embodiment of this invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0089] Step 201: Receive usage completion information for at least one heterogeneous device, and determine whether there is a virtual machine heterogeneous device request in the waiting queue based on the usage completion information;

[0090] Step 202: If there are no virtual machine heterogeneous device requests in the waiting queue, mark the heterogeneous device that has been used as a sleeping device;

[0091] Step 203: Receive new virtual machine heterogeneous device requests and reclaim sleeping devices according to the new virtual machine heterogeneous device requests.

[0092] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0093] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.

[0094] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for managing heterogeneous devices within a node, characterized in that, Multiple heterogeneous devices exist within a single node. These heterogeneous devices are provided to a virtual machine via pass-through. During the virtual machine's lifetime, the pass-through heterogeneous devices are exclusively used by that virtual machine. The method includes: Receive completion information for at least one of the heterogeneous devices; Based on the usage completion information, determine whether there are virtual machine heterogeneous device requests in the waiting queue; If there are virtual machine heterogeneous device requests in the waiting queue, the used heterogeneous devices are reclaimed, the first virtual machine corresponding to the first virtual machine heterogeneous device request that entered the waiting queue is queried, and the used heterogeneous devices are allocated to serve the first virtual machine. If there are no virtual machine heterogeneous device requests in the waiting queue, the recycling of heterogeneous devices that have been used is paused and the used heterogeneous devices are marked as sleeping devices. The sleeping state time of the sleeping devices is recorded. The sleeping state indicates that the heterogeneous device has not been used and can be recycled when needed. Receive a new virtual machine heterogeneous device request, and query whether there is an available heterogeneous device based on the new virtual machine heterogeneous device request; If such a virtual machine exists, the idle heterogeneous device is allocated to serve the virtual machine corresponding to the new heterogeneous device request. If no idle heterogeneous device exists, the sleeping device is reclaimed based on the new virtual machine heterogeneous device request, including: If only one sleeping device exists, then the sleeping device is directly reclaimed and the device is allocated to the corresponding virtual machine in the new virtual machine heterogeneous device request. If multiple sleeping devices exist, the sleep time of the multiple sleeping devices is compared, and the heterogeneous device with the longest sleep time is reclaimed so that it can be used by new virtual machine heterogeneous devices requesting the corresponding virtual machine. If the sleeping device does not exist, it means that all heterogeneous devices are currently in operation and cannot be reclaimed. The new virtual machine heterogeneous device request is added to the waiting queue until an idle device or a sleeping device becomes available for allocation.

2. A management system for heterogeneous devices within a node, characterized in that, The system for implementing the node internal equipment management method of claim 1, the system comprising: A receiving module is configured to receive usage completion information for at least one of the heterogeneous devices; The determination module is used to determine whether there is a virtual machine heterogeneous device request in the waiting queue based on the usage completion information. The setting module is used to mark the heterogeneous device that has been used as a sleeping device if there is no virtual machine heterogeneous device request in the waiting queue; A processing module is configured to receive new virtual machine heterogeneous device requests and reclaim the sleeping device according to the new virtual machine heterogeneous device requests.

3. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method of claim 1.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method of claim 1.

Citation Information

Patent Citations

  • Virtual machine switching methods, devices, electronic devices and computer program products

    CN107003891A

  • Stateless remote power management of computers

    US20120137146A1

  • Method, apparatus and device for managing system resource

    WO2015180111A1