(19)
(11)EP 3 343 364 B1

(12)EUROPEAN PATENT SPECIFICATION

(45)Mention of the grant of the patent:
01.01.2020 Bulletin 2020/01

(21)Application number: 16847827.9

(22)Date of filing:  31.05.2016
(51)Int. Cl.: 
G06F 9/455  (2018.01)
(86)International application number:
PCT/CN2016/084022
(87)International publication number:
WO 2017/049945 (30.03.2017 Gazette  2017/13)

(54)

ACCELERATOR VIRTUALIZATION METHOD AND APPARATUS, AND CENTRALIZED RESOURCE MANAGER

BESCHLEUNIGERVIRTUALISIERUNGSVERFAHREN UND -VORRICHTUNG SOWIE ZENTRALISIERTER RESSOURCENMANAGER

PROCÉDÉ ET APPAREIL DE VIRTUALISATION D'ACCÉLÉRATEUR, ET GESTIONNAIRE DE RESSOURCES CENTRALISÉ


(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

(30)Priority: 25.09.2015 CN 201510621728

(43)Date of publication of application:
04.07.2018 Bulletin 2018/27

(73)Proprietor: Huawei Technologies Co., Ltd.
Longgang District Shenzhen, Guangdong 518129 (CN)

(72)Inventors:
  • TANG, Chaofei
    Shenzhen Guangdong 518129 (CN)
  • YAO, Zhiming
    Shenzhen Guangdong 518129 (CN)
  • XIAO, Kun
    Shenzhen Guangdong 518129 (CN)

(74)Representative: Thun, Clemens 
Mitscherlich PartmbB Patent- und Rechtsanwälte Sonnenstraße 33
80331 München
80331 München (DE)


(56)References cited: : 
CN-A- 102 314 377
CN-A- 105 159 753
US-A1- 2014 351 811
CN-A- 104 541 242
US-A1- 2007 220 217
  
      
    Note: Within nine months from the publication of the mention of the grant of the European patent, any person may give notice to the European Patent Office of opposition to the European patent granted. Notice of opposition shall be filed in a written reasoned statement. It shall not be deemed to have been filed until the opposition fee has been paid. (Art. 99(1) European Patent Convention).


    Description

    TECHNICAL FIELD



    [0001] The present invention relates to the Internet field, and in particular, to an accelerator virtualization method and apparatus, and a centralized resource manager.

    BACKGROUND



    [0002] A virtualization technology can implement dynamic allocation, flexible scheduling, and cross-domain sharing of Internet resources to improve IT resource utilization, and therefore becomes a new development trend of the Internet.

    [0003] An accelerator is a type of Internet resource and a function unit. It offloads some original CPU functions onto the accelerator for processing, to reduce load on a CPU. Currently, widely used accelerators include graphics accelerators, cryptographic accelerators, video codec accelerators, compression accelerators, and the like. However, currently, it is increasingly difficult to meet an offload requirement of the CPU by using a single accelerator. To improve performance of the accelerator, the accelerator urgently needs to be combined with an Internet resource virtualization technology. In a VirtIO solution, a virtual machine monitor creates a pair of transmit and receive queues for each virtual acceleration resource. The transmit and receive queues are implemented based on a shared memory. The virtual acceleration resource accesses a physical acceleration resource by using the transmit and receive queues. The virtual machine monitor schedules the transmit and receive queues of each virtual acceleration resource, to implement access to the physical acceleration resource.

    [0004] In the prior art, virtualization of the Internet resources generally has two methods: a VirtIO solution, and an SRIOV (single-root IO virtualization) solution. In the VirtIO solution, a virtual machine monitor (also referred to as virtual machine manager, or hypervisor) creates a pair of transmit and receive queues for each virtual resource, and the virtual resource accesses a physical resource by using the transmit and receive queues and by scheduling by the virtual machine monitor. The SRIOV solution is a PCIe bus-based IO virtualization technology, and a physical resource is interconnected with a CPU by using a PCIe bus. In the SRIOV solution, a transmit and receive queue is integrated into hardware by using software, and the hardware can be directly accessed from a virtual machine, thereby improving performance.

    [0005] With the virtualization technology, a physical resource may be virtualized into multiple virtual resources. The multiple virtual resources are combined to form a virtual machine. Service processing units may be deployed on the virtual machine to implement different service functions. A typical virtualization system, as shown in FIG. 1, includes a centralized resource manager 101, a virtual machine monitor 102, and virtual machines 103 and 104. The centralized resource manager and the virtual machine monitor may be implemented based on software of a physical CUP. The software may be some function modules of an operating system or some relatively independent function software; a specific form is not limited. The centralized resource manager 101 is configured to manage various physical resources 107, and specific representative products include open-source software openstack, VMware company's vCenter, Huawei's FusionSphere, and the like. The virtual machine monitor 102 is configured to manage virtual resources. As shown in FIG. 1, a service processing unit 105 is deployed on the virtual machine 103, and a service processing unit 106 is deployed on the virtual machine 104. Workloads separately run on the service processing units 105 and 106. There may be multiple service loads running on each service processing unit. A virtual resource on the virtual machine may be divided by attribute into a virtual computing resource, a virtual storage resource, a virtual network interface card resource, and the like. Likewise, a physical resource may be divided into a physical computing resource, a physical storage resource, and a physical network interface card resource. The virtual machine accesses a corresponding physical resource by using a virtual resource and transfers a workload to the corresponding physical resource.

    [0006] However, virtualization of an accelerator cannot be implemented by using a prior-art virtualization technology, and a virtual machine including a virtual accelerator cannot be created. As a result, the accelerator cannot be used in a virtual machine.

    [0007] US 2014/0351811 A1 discloses a method for providing application packages with hardware accelerators. In some examples, an application package for a datacenter may include an application and multiple hardware accelerators associated with the application. Each hardware accelerator may be configured for a different datacenter hardware configuration. When a datacenter receives the application package, it may select the appropriate hardware accelerator for implementation based on its hardware configuration.

    SUMMARY



    [0008] Embodiments of the present invention provide an acceleration virtualization method and apparatus, so as to resolve a problem that accelerator virtualization cannot be implemented in the prior art.

    [0009] To resolve the foregoing technical problem, the embodiments of the present invention disclose the following technical solutions:
    According to an aspect, an accelerator virtualization method is provided, where the method is applied to a host, a centralized resource manager and a virtual machine monitor run on the host, and the method includes:

    receiving, by the centralized resource manager, a virtual machine resource configuration command, where the virtual machine resource configuration command includes to-be-created virtual accelerator information;

    selecting, by the centralized resource manager, a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command;

    generating, by the centralized resource manager, description information used to describe the matching physical accelerator; and

    sending, by the centralized resource manager, a first virtual machine creation command to the virtual machine monitor, where the first virtual machine creation command includes the description information, so that after receiving the first virtual machine creation command, the virtual machine monitor creates a first virtual machine including a first virtual accelerator corresponding to the matching physical accelerator, where the first virtual accelerator is generated by using the description information; or sending, by the centralized resource manager, a second virtual machine creation command to the virtual machine monitor, where the second virtual machine creation command includes a description information obtaining identifier, so that the virtual machine monitor creates a second virtual machine after receiving the second virtual machine creation command, and the second virtual machine generates a second virtual accelerator after obtaining the description information according to the description information obtaining identifier;

    wherein the matching physical accelerator is not on the host, and after the virtual machine monitor creates the first virtual machine or the second virtual machine, the method further comprises:
    sending, by the virtual machine monitor, a communication address and a matching physical accelerator identifier to a remote accelerator management unit on a node, wherein the matching physical accelerator is located on the node, so that the virtual machine monitor communicates with the remote accelerator management unit by using the communication address, and the remote accelerator management unit communicates with a corresponding matching physical accelerator by using the matching physical accelerator identifier.



    [0010] With reference to the first aspect, in a first possible implementation of the first aspect, before the receiving, by the centralized resource manager, a virtual machine resource configuration command, the method further includes:

    obtaining, by the centralized resource manager, physical accelerator information, where the physical accelerator includes at least a local physical accelerator or a remote physical accelerator; and

    generating, by the centralized resource manager, a physical accelerator information file according to the physical accelerator information, so as to generate the physical accelerator resource pool; and

    the selecting, by the centralized resource manager, a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command includes:

    selecting, by the centralized resource manager, matched physical accelerator information from the physical accelerator information file according to the to-be-created virtual accelerator information, and using a physical accelerator corresponding to the matched physical accelerator information as the matching physical accelerator.



    [0011] With reference to the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the selecting, by the centralized resource manager, a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator includes:

    selecting, by the centralized resource manager, the matched matching physical accelerator from the physical accelerator resource pool according to the physical location; and/or

    selecting, by the centralized resource manager, the matched matching physical accelerator from the physical accelerator resource pool according to a physical accelerator load.



    [0012] With reference to any one of the first aspect to the second possible implementation of the first aspect, in a third possible implementation of the first aspect, after the virtual machine monitor creates the first virtual machine or the second virtual machine, the method further includes:
    transferring, by the virtual accelerator, an acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by a service unit on the virtual machine; and returning a processing result of the matching physical accelerator to the service unit, where the virtual accelerator is the first virtual accelerator or the second virtual accelerator.

    [0013] With reference to the third possible implementation of the first aspect, in a fourth possible implementation of the first aspect, the matching physical accelerator is not on the host, and the transferring, by the virtual accelerator, an acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by a service unit on the virtual machine; and returning a processing result of the matching physical accelerator to the service unit includes:

    sending, by the virtual accelerator, a handshake protocol-based handshake request to the remote accelerator management unit and receiving a handshake success response fed back by the accelerator management unit;

    sending, by the virtual accelerator, the acceleration request to the remote accelerator management unit, so that the remote accelerator management unit sends the acceleration request to a corresponding matching physical accelerator for processing;

    receiving, by the virtual accelerator, an acceleration request response sent by the remote accelerator management unit, where the acceleration request response includes the processing result that is returned to the remote accelerator management unit by the matching physical accelerator after the matching physical accelerator processes the acceleration request; and

    sending, by the virtual accelerator, the acceleration request response to the service unit, where

    the virtual accelerator is the first virtual accelerator or the second virtual accelerator.



    [0014] According to a second aspect, an accelerator virtualization apparatus is provided, where the apparatus is applied to a host, the apparatus includes a centralized resource manager and a virtual machine monitor, and the centralized resource manager includes:

    a receiving unit, configured to receive a virtual machine resource configuration command, where the virtual machine resource configuration command includes to-be-created virtual accelerator information;

    a matching physical accelerator selection unit, configured to select a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command received by the receiving unit;

    a generation unit, configured to generate description information used to describe the matching physical accelerator; and

    a sending unit, configured to send a first virtual machine creation command to the virtual machine monitor, where the first virtual machine creation command includes the description information, so that after receiving the first virtual machine creation command, the virtual machine monitor creates a first virtual machine including a first virtual accelerator corresponding to the matching physical accelerator, where the first virtual accelerator is generated by using the description information; or the sending unit, configured to send a second virtual machine creation command to the virtual machine monitor, where the second virtual machine creation command includes a description information obtaining identifier, so that the virtual machine monitor creates a second virtual machine after receiving the second virtual machine creation command, and the second virtual machine generates a second virtual accelerator after obtaining the description information according to the description information obtaining identifier;

    wherein the matching physical accelerator is not on the host, and after the virtual machine monitor creates the first virtual machine or the second virtual machine, the virtual machine monitor is further configured to send a communication address and a matching physical accelerator identifier to a remote accelerator management unit on a node, wherein the matching physical accelerator is located on the node, so that the virtual machine monitor communicates with the remote accelerator management unit by using the communication address, and the remote accelerator management unit communicates with a corresponding matching physical accelerator by using the matching physical accelerator identifier.



    [0015] With reference to the second aspect, in a first possible implementation of the second aspect, the centralized resource manager further includes:

    a physical accelerator information obtaining unit, configured to obtain physical accelerator information, where the physical accelerator includes at least a local physical accelerator or a remote physical accelerator; and

    a physical accelerator resource pool generation unit, configured to generate a physical accelerator information file according to the physical accelerator information, so as to generate the physical accelerator resource pool; and

    the matching physical accelerator selection unit is further configured to: select matched physical accelerator information from the physical accelerator information file according to the to-be-created virtual accelerator information, and use a physical accelerator corresponding to the matched physical accelerator information as the matching physical accelerator.



    [0016] With reference to the first possible implementation of the second aspect, in a second possible implementation of the second aspect, the matching physical accelerator selection unit is further configured to select the matched matching physical accelerator from the physical accelerator resource pool according to the physical location; and/or
    the matching physical accelerator selection unit is further configured to select the matched matching physical accelerator from the physical accelerator resource pool according to a physical accelerator load.

    [0017] With reference to any one of the second aspect to the second possible implementation of the second aspect, in a third possible implementation of the second aspect, after the virtual machine monitor creates the first virtual machine or the second virtual machine, the virtual accelerator is configured to: transfer an acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by a service unit on the virtual machine, and return a processing result of the matching physical accelerator to the service unit, where the virtual accelerator is the first virtual accelerator or the second virtual accelerator.

    [0018] With reference to the third possible implementation of the second aspect, in a fourth possible implementation of the second aspect, the matching physical accelerator is not on the host, and the first virtual accelerator is further configured to send a handshake protocol-based handshake request to the remote accelerator management unit and receive a handshake success response fed back by the remote accelerator management unit;
    the first virtual accelerator is further configured to send the acceleration request to the remote accelerator management unit, so that the remote accelerator management unit sends the acceleration request to a corresponding matching physical accelerator for processing;
    the virtual accelerator is further configured to receive an acceleration request response sent by the remote accelerator management unit, where the acceleration request response is the processing result that is returned to the remote accelerator management unit by the matching physical accelerator after the matching physical accelerator processes the acceleration request; and
    the virtual accelerator is further configured to send the acceleration request response to the service unit, where the virtual accelerator is the first virtual accelerator or the second virtual accelerator.

    [0019] The embodiments of the present invention disclose an accelerator virtualization method. In the embodiments of the present invention, virtualization of a physical accelerator can be implemented by means of interaction between a centralized resource manager and a virtual machine monitor, laying a foundation for more convenient use of these physical accelerators subsequently. In addition, accelerator virtualization in the embodiments of the present invention is implemented based on the centralized resource manager and the virtual machine monitor and requires slight software modification, and therefore is easy to implement.

    BRIEF DESCRIPTION OF DRAWINGS



    [0020] To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show merely some embodiments of the present invention, and persons of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.

    FIG. 1 is a schematic diagram of a virtualization system in the prior art;

    FIG. 2 is a flowchart of an accelerator virtualization method according to Embodiment 1 of the present invention;

    FIG. 3 is a flowchart of a load transfer method according to Embodiment 3 of the present invention;

    FIG. 4 is a schematic diagram of an application scenario according to Embodiment 4 of the present invention;

    FIG. 5 is a schematic structural diagram of an accelerator virtualization apparatus according to Embodiment 5 of the present invention;

    FIG. 6 is a schematic structural diagram of a host according to Embodiment 6 of the present invention; and

    FIG. 7 is a schematic diagram of an architecture of a system according to Embodiment 1 of the present invention.


    DESCRIPTION OF EMBODIMENTS


    Embodiment 1



    [0021] The following embodiments of the present invention provide an accelerator virtualization method and apparatus, and a centralized resource manager, so as to implement accelerator virtualization and improve a resource sharing degree.

    [0022] The following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are merely a part rather than all of the embodiments of the present invention. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

    [0023] FIG. 7 is a schematic diagram of an architecture of a system according to this embodiment of the present invention. As shown in FIG. 7, a node on which a host 700 is located includes a software layer 701 and a hardware layer 702. The software layer 701 includes a centralized resource manager 7011 and a virtual machine monitor 7012. The hardware layer may include a processor 7021, a memory 7022, and the like.

    [0024] In addition, the system in this embodiment of the present invention further includes a physical accelerator resource pool 703. The physical accelerator resource pool 703 includes multiple physical accelerators, for example, a physical accelerator 1, a physical accelerator 2, ..., and a physical accelerator N shown in FIG. 7.

    [0025] Based on the system architecture shown in FIG. 7, accelerator virtualization can be implemented in this embodiment of the present invention. FIG. 2 is a flowchart of an accelerator virtualization method according to this embodiment of the present invention. As shown in FIG. 2, the method is applied to a host. A centralized resource manager and a virtual machine monitor run on the host. The method includes the following steps.

    [0026] Step 201. The centralized resource manager receives a virtual machine resource configuration command, where the virtual machine resource configuration command includes to-be-created virtual accelerator information.

    [0027] The virtual machine resource configuration command may be from operation and maintenance software, which, for example, may be relatively independent software such as MANO, or may be a software module within large software. The operation and maintenance software sends the virtual machine resource configuration command to the centralized resource manager when learning that application software has a requirement for a virtual accelerator. The foregoing technology is the prior art, and details are not described herein.

    [0028] The virtual machine resource configuration command is used to configure a virtual machine resource. A resource in the present invention includes virtual CPU information, virtual storage resource information, and virtual network resource information that are required by a to-be-created virtual machine. Both the foregoing information and a configuration method are the prior art. For example, when implementation is based on open-source software openstack, this configuration command may be implemented in form of an XML file, and the virtual machine resource is configured by using the XML file. If another software platform is used, a corresponding command defined on the another software platform may also be used for implementation, and details are not described herein.

    [0029] In this embodiment, in addition to the foregoing information, the virtual machine resource configuration command further includes the to-be-created virtual accelerator information, which may be specifically obtained by extending the resource configuration command. For example, based on openstack, an XML file may be extended to include the to-be-created virtual accelerator information.

    [0030] The to-be-created virtual accelerator information is used to indicate a requirement of a requestor on a virtual accelerator that needs to be created. For example, the information may include: a type of the to-be-created virtual accelerator (for example, encryption, decryption, or compression), an acceleration capability (for example, a capability such as a reachable traffic processing level or a delay control amount), a communications protocol, a communication address, and other information. The communications protocol and the communication address are optional. If a physical accelerator is located on a remote node, the communications protocol and the communication address are required. If a physical accelerator is located on a local node, the information may be omitted.

    [0031] A "node" in this embodiment of the present invention is generally classified by physical location and may be set based on a system structure, a distance, a requirement, or the like. An equipment room may be a node, a cabinet may also be a node, and a slot and a board may also be nodes. Each node may include a host or may further include a physical accelerator. The host is mainly configured to implement some general service processing, while the physical accelerator accelerates some particular services. At least two nodes are included in communication. For ease of description, one of the two nodes may be referred to as a "local node", and the other may be referred to as a "remote node". For example, in the two nodes, one cabinet C1 may be referred to as a local node, and the other cabinet C2 may be referred to as a remote node. Alternatively, one equipment room H1 may be referred to a local node, and the other equipment room H2 may be referred to as a remote node. It should be noted that concepts such as the foregoing node, host, and accelerator and specific implementation of the concepts (for example, a host is implemented based on a general purpose processor, and a physical accelerator is implemented based on a dedicated hardware device) are concepts known to persons skilled in the art, and details are not described in this embodiment. Because a host is generally implemented based on a CPU, for ease of description, functions implemented by a CPU that are mentioned below may be considered as functions implemented by a host.

    [0032] Step 202. The centralized resource manager selects a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command.

    [0033] For example, if in the to-be-created virtual accelerator information, a required type of a virtual accelerator is encryption and an acceleration capability requires reaching 1 Gbps, a physical accelerator whose accelerator type is encryption and whose acceleration capability can reach 1 Gbps (that is, being greater than or equal to 1 Gbps) is selected from the physical accelerator resource pool as the matching physical accelerator.

    [0034] In this embodiment, the physical accelerator resource pool is a resource pool including multiple physical accelerators. Implementation forms of these physical accelerators are not limited. For example, the physical accelerators may be PCIe bus-based accelerators, and these accelerators are connected to the CPU by using PCIe interfaces. Alternatively, the physical accelerators may be accelerators integrated into the CPU, or network-based accelerators. Specific implementation forms and methods (for example, implementation by using chips such as an FPGA or an ASIC) of these physical accelerators are known to persons skilled in the art, and details are not described herein.

    [0035] Step 203. The centralized resource manager generates description information used to describe the matching physical accelerator.

    [0036] The description information is used to describe the matching physical accelerator and is to be used during subsequent virtual accelerator generation. The concept of the virtual accelerator is similar to concepts of many existing virtual devices (such as a virtual network interface card and a virtual port). That is, the virtual accelerator is a software-virtualized accelerator (that is, a software module) corresponding to a physical accelerator. The "accelerator" simulated by using software may transfer some parameters to another application program by using some interfaces, so that after receiving these parameters, the another application program considers that there is a real "accelerator", and communicates with the "accelerator". Optionally, to more visually and conveniently use the virtual accelerator, the "virtual accelerator" may be presented on a user interface. A user may operate the "virtual accelerator" on a graphical interface. An application program may send an acceleration request to the "virtual accelerator" when the application program needs to accelerate a service. Then, the virtual accelerator forwards the acceleration request to a matched physical accelerator for processing.

    [0037] To generate the software module, namely, the "virtual accelerator" corresponding to the matching physical accelerator, the description information needs to be used, that is, to know, according to the description information, a type of the "virtual accelerator" to be generated. The description information includes but is not limited to the following information: the aforementioned information such as the accelerator type and the acceleration capability; some location information used to indicate a location of the accelerator, for example, the information may be a BDF number (a bus number, a device number, and a function number) of the PCIe card when the accelerator is connected, based on a PCIe bus, to the CPU as a PCIe card, or may include an IP address, a port number, or the like information when an accelerator is connected to the CPU via a network; and various attribute information required based on an actual requirement. How to generate the "virtual accelerator" according to the description information is a technology known to persons skilled in the art, and details are not described herein.

    [0038] For ease of management, the description information may be written into a file and saved. Certainly, the description information may be saved in another manner. This is not limited in this embodiment of the present invention.

    [0039] Step 204. The centralized resource manager sends a first virtual machine creation command to the virtual machine monitor, where the first virtual machine creation command includes the description information, so that after receiving the first virtual machine creation command, the virtual machine monitor creates a first virtual machine including a first virtual accelerator corresponding to the matching physical accelerator, where the first virtual accelerator is generated by using the description information.

    [0040] Alternatively, step 204 may be: The centralized resource manager sends a second virtual machine creation command to the virtual machine monitor, where the second virtual machine creation command includes a description information obtaining identifier, so that the virtual machine monitor creates a second virtual machine after receiving the second virtual machine creation command, and the second virtual machine generates a second virtual accelerator after obtaining the description information according to the description information obtaining identifier. The second implementation of step 204 is shown in a dashed box in FIG. 2, and a corresponding reference numeral is also shown in a dashed box.

    [0041] In this step, the virtual machine creation command is a command used to create a virtual machine in the prior art. For example, based on a Linux system, the command shown below may be used:
    ./x86_64-softmmu/qemu-system-x86_64-hda /home/image/VM_KVM_MSG0.img -cpu host -m 2048 -smp 4 -net nic,model=virtio -net tap,script=/etc/qemu-ifup -nographic -vnc :22

    [0042] In this embodiment, both the first virtual machine creation command and the second virtual machine creation command are commands based on the virtual machine creation command. To enable the virtual machine monitor to create, according to the description information, the first virtual machine including a virtual accelerator, in this embodiment, the first virtual machine creation command is obtained by making some slight modifications to an original virtual machine creation command and adding a field that can instruct to create the virtual accelerator. For example, the modified command may be shown as follows:
    ./x86_64-softmmu/qemu-system-x86_64-had /home/image/VM_KVM_MSG0.img -cpu host -m 2048 -smp 4 -net nic,model=virtio -net tap,script=/etc/qemu-ifup -nographic -vnc :22 -device ivshmem,shm="sa_vf1",size=1m

    [0043] The underlined part in the foregoing command is a newly added parameter, indicating that the virtual accelerator is generated by reading a file "sa_vf1" (description information of the to-be-generated virtual accelerator is saved in the file). Certainly, this implementation method is only an example. Persons skilled in the art may directly transfer the description information, but not use the file, to enable the virtual machine monitor to obtain the description information and generate, according to the description information, the first virtual machine including the virtual accelerator corresponding to the description information.

    [0044] Modifying the existing virtual machine creation command to obtain the second virtual machine creation command is to add the description information obtaining identifier. The identifier does not instruct the virtual machine monitor to generate a virtual accelerator when the virtual machine monitor generates a virtual machine, but instructs the virtual machine monitor to enable the second virtual machine to obtain the description information according to the description information obtaining identifier and generate the virtual accelerator after the virtual machine monitor generates the second virtual machine. The second virtual machine learns from the identifier that the virtual accelerator further needs to be generated, and then obtains the description information at a default location (the location may be alternatively obtained by interacting with the centralized resource manager). For example, a file saved with the description information is obtained from a disk path.

    [0045] In this embodiment of the present invention, before step 201, before the centralized resource manager receives the virtual machine resource configuration command, the method may further include:

    obtaining, by the centralized resource manager, physical accelerator information, where the physical accelerator includes at least a local physical accelerator or a remote physical accelerator; and

    generating, by the centralized resource manager, a physical accelerator information file according to the physical accelerator information, so as to generate the physical accelerator resource pool; and

    the selecting, by the centralized resource manager, a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command includes:
    selecting, by the centralized resource manager, matched physical accelerator information from the physical accelerator information file according to the to-be-created virtual accelerator information, and using a physical accelerator corresponding to the matched physical accelerator information as the matching physical accelerator.



    [0046] The physical accelerator information includes but is not limited to the following information: a physical resource name, an address of a node on which a physical resource is located, and a function, and an attribute, a capability, and an available state of the physical resource. Each node collects and reports physical accelerator information of the node to the centralized resource manager. When a physical accelerator changes, each node may also proactively report to the centralized resource manager, and the centralized resource manager updates the physical accelerator resource pool.

    [0047] In this embodiment, the centralized resource manager obtains the physical accelerator information, so as to manage and schedule all physical accelerators.

    [0048] In this embodiment of the present invention, the physical accelerator resource pool is actually equivalent to a database, and data in the physical accelerator resource pool may be one or more physical accelerator information files. Any saving manner of a database may be used as a saving manner of the physical accelerator resource pool. A management structure of the physical accelerator resource pool in an embodiment may be shown in Table 1.
    Table 1
    Accelerator nameAddress of a node on which the accelerator is locatedFunctionAttributeCapabilityStatus
    AE1 IP address Function Feature1=y/n Capability1=a Available/Unavailable
          Feature2=y/n Capability2=b
          ...  
          Featurek=y/n  


    [0049] The physical accelerator resource pool shown in Table 1 is shown in a list form. Table 1 lists only one row as an example. Each row in the list may be corresponding to one physical accelerator information file. Each physical accelerator information file is corresponding to one physical accelerator. Alternatively, the entire list is corresponding to one physical accelerator information file. Each row in the list is corresponding to one physical accelerator.

    [0050] In this embodiment of the present invention, the physical accelerator resource pool is used to manage the physical accelerators in the system, facilitating management on all the physical accelerators and improving efficiency in selection of the matching physical resource.

    [0051] The following method may further be used to select the matching physical accelerator:
    The centralized resource manager selects the matched matching physical accelerator from the physical accelerator resource pool according to the physical location; and/or
    the centralized resource manager selects the matched matching physical accelerator from the physical accelerator resource pool according to a physical accelerator load.

    [0052] Physical accelerators may be divided into local physical accelerators and remote physical accelerators according to physical locations. The local physical accelerator is located on a local node, that is, the local physical accelerator is located on a node, where the host is located on the node. The remote physical accelerator is located on a non-host node, that is, the remote physical accelerator is located on a remote node.

    [0053] In a general case, a delay of communication between the centralized resource manager and the local physical accelerator is relatively short, and a physical accelerator with a relatively light load has a relatively fast response speed. Therefore, the local physical accelerator or the physical accelerator with a relatively light load may be preferentially selected. Alternatively, selection may be made by considering both the physical location and the load.

    [0054] In the accelerator virtualization method according to this embodiment of the present invention, accelerator virtualization can be implemented. In addition, accelerator virtualization in this embodiment of the present invention is implemented based on a centralized resource manager and a virtual machine monitor and requires slight software modification, and therefore is easy to implement.

    Embodiment 2



    [0055] Based on Embodiment 1, this embodiment discloses an accelerator virtualization method. A location of a matching physical accelerator is not limited in Embodiment 1. For example, the matching physical accelerator may be located on a local node, or may be located on a remote node. When the matching physical accelerator is located on a local node, the accelerator virtualization method disclosed in Embodiment 1 may be used. This embodiment mainly describes a case in which the matching physical accelerator is located on a remote node. Specifically, in this case, after a virtual machine monitor creates a first virtual machine or a second virtual machine, the method further includes:
    sending, by the virtual machine monitor, a communication address and a matching physical accelerator identifier to a remote accelerator management unit on a node, where the matching physical accelerator is located on the node, so that the virtual machine monitor communicates with the remote accelerator management unit by using the communication address, and the remote accelerator management unit communicates with a corresponding matching physical accelerator by using the matching physical accelerator identifier. The remote accelerator management unit may be a function unit that is located on the remote node and that can manage a physical accelerator on the remote node under the control of the centralized resource manager. The remote accelerator management unit may be a separate software module, or may be a software submodule in an operating system of the remote node. The remote accelerator management unit, for example, is a physical acceleration engine.

    [0056] In many application scenarios, local accelerator resources are extremely limited for an operating system. Therefore, accelerator virtualization imposes a relatively high requirement for a non-local remote accelerator resource. In this embodiment of the present invention, if the matching physical accelerator is not on the host, communication with the matching physical accelerator may be still implemented. That is, in this embodiment of the present invention, when a physical accelerator is located at a remote end, accelerator virtualization can still be implemented, improving a resource sharing degree.

    Embodiment 3



    [0057] Based on the foregoing embodiments, this embodiment of the present invention discloses an accelerator virtualization method, and the method is used to describe how to process a service based on the foregoing method. Specifically, after a centralized resource manager creates a first virtual machine or a second virtual machine, the method provided in this embodiment further includes:
    transferring, a virtual accelerator, an acceleration request to a matching physical accelerator for processing, where the acceleration request is sent by a service unit on a virtual machine; and returning a processing result of the matching physical accelerator to the service unit.

    [0058] The virtual accelerator in this embodiment is the first virtual accelerator, or may be the second virtual accelerator, and needs to be the same as the virtual accelerator created in step 204 in the foregoing embodiment. That is, if the first virtual accelerator is created, the first virtual accelerator transfers the acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by the service unit. If the second virtual accelerator is created, the second virtual accelerator transfers the acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by the service unit.

    [0059] The transferring an acceleration request to a matching physical accelerator for processing, where the acceleration request is sent by a service unit on a virtual machine is equivalent to transferring an acceleration load on the virtual machine to the matching physical accelerator for processing. In this way, a physical resource sharing degree can be improved, and load pressure on the virtual machine and on a host can be reduced.

    [0060] According to the foregoing embodiment, the matching physical accelerator may be located on a local node, or may be located on a remote node. When the matching physical accelerator is located on a local node, the virtual accelerator receives the acceleration request from the service unit and sends the acceleration request to a local accelerator management unit. The local accelerator management unit sends the acceleration request to a corresponding matching physical accelerator for processing. After processing the acceleration request, the matching physical accelerator located on the local node feeds back a processing result to the virtual accelerator by using the local accelerator management unit, and the virtual accelerator sends the processing result to the service unit.

    [0061] When the matching physical accelerator is located on a remote node, because there is interaction between the local node and the remote node, the case is more complex. The following describes in detail how to implement load transfer when the matching physical accelerator is not on the host.

    [0062] FIG. 3 is a flowchart of a load transfer method according to this embodiment of the present invention. In this embodiment, the matching physical accelerator is not on the local host, but on the remote node. The method for transferring, by the virtual accelerator, the acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by the service unit on the virtual machine; and returning the processing result of the matching physical accelerator to the service unit is specifically shown in FIG. 3 and includes the following steps.

    [0063] Step 301. The virtual accelerator sends a handshake protocol-based handshake request to a remote accelerator management unit and receives a handshake success response fed back by the remote accelerator management unit.

    [0064] In this embodiment, sending and receiving the handshake protocol-based handshake request is used to establish a connection between the virtual accelerator and the remote accelerator management unit. A specific implementation of sending and receiving the handshake protocol-based handshake request to establish a connection between the virtual accelerator and the remote accelerator management unit is the same as that in the prior art. For example, a TCP handshake protocol-based handshake request may be used for connection establishment, and details are not described herein.

    [0065] Step 302. The virtual accelerator sends an acceleration request to the remote accelerator management unit, so that the remote accelerator management unit sends the acceleration request to a corresponding matching physical accelerator for processing.

    [0066] In actual application, after the connection is established between the virtual accelerator and the remote accelerator management unit, the virtual accelerator may communicate with the remote accelerator management unit. The acceleration request sent by the virtual accelerator is encapsulated into an acceleration request message packet and then is decapsulated during subsequent processing. Encapsulation and decapsulation may use the prior art, and details are not described herein.

    [0067] The acceleration request may include a request based on a basic communications protocol and a first acceleration request communications protocol. The basic communications protocol may include various prior-art protocols used for communication, for example, the Ethernet protocol or the TCP protocol.

    [0068] The first acceleration request communication information includes an acceleration request ID, an acceleration request type, an acceleration request buffer address and length, an acceleration response buffer address and length, acceleration request data, and the like.

    [0069] The acceleration request ID is used to distinguish different acceleration requests. The acceleration operation type may be a graphics acceleration request or a cryptographic acceleration request. The acceleration request buffer address and length and the acceleration response buffer address and length are storage areas that need to be used during processing of the acceleration request. The acceleration request data may be various data included in the accelerator request. The foregoing information is the same as or similar to that in the prior art, and details are not described herein.

    Step 303. The virtual accelerator receives an acceleration request response sent by the remote accelerator management unit, where the acceleration request response is a processing result that is returned to the remote accelerator management unit by the matching physical accelerator after the matching physical accelerator processes the acceleration request.

    Step 304. The virtual accelerator sends the acceleration request response to the service unit.



    [0070] The acceleration request response may include a response based on a basic communications protocol and a second acceleration request communications protocol. The request based on the second acceleration request communications protocol includes the acceleration request ID, an acceleration operation result, the acceleration request buffer address and length, an acceleration destination data buffer address and length, and acceleration response data.

    [0071] Information included in the acceleration request response is the same as or similar to the first acceleration request communication information, and details are not repeated herein.

    [0072] After obtaining the acceleration request response, the virtual accelerator may obtain processed data according to the acceleration request response and release buffers used in the foregoing processing process.

    [0073] In this embodiment, the virtual accelerator is the first virtual accelerator or the second virtual accelerator, and needs to be the same as the virtual accelerator created in step 204 in the foregoing embodiment. That is, if the first virtual accelerator is created, the first virtual accelerator transfers the acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by the service unit. If the second virtual accelerator is created, the second virtual accelerator transfers the acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by the service unit.

    [0074] In this embodiment of the present invention, the transferring an acceleration request to a matching physical accelerator for processing, where the acceleration request is sent by a service unit on a virtual machine is equivalent to transferring an acceleration load on the virtual machine to the matching physical accelerator for processing. In this way, a physical resource sharing degree can be improved, and load pressure on the virtual machine and on a host can be reduced.

    Embodiment 4



    [0075] Based on the foregoing embodiments, this embodiment provides an application scenario. FIG. 4 is a schematic diagram of the application scenario according to this embodiment of the present invention. As shown in FIG. 4, a host 410 has a requirement for accelerator virtualization. A centralized resource manager 420 and a virtual machine monitor 450 run on the host 410. A local physical acceleration engine 411 and a local physical accelerator 412 are on the host 410. The local physical acceleration engine 411 may manage the local physical accelerator 412 according to a command of the centralized resource manager 420 and transfer an acceleration request of a service unit on the host to the local physical accelerator 412 for processing. It should be noted that, the local physical acceleration engine 411 represents a function module. This part of function may alternatively be implemented by the centralized resource manager in practice (which is equivalent to adding a corresponding function to the centralized resource manager). In this embodiment, the local physical acceleration engine 411 is a function module separate from the centralized resource manager.

    [0076] The centralized resource manager 420 selects a matching physical accelerator from a physical accelerator resource pool according to a requirement. The selected matching physical accelerator in this embodiment includes the local physical accelerator 412 and/or a remote physical accelerator 432 located on a remote node 430.

    [0077] The remote node 430 includes a remote physical acceleration engine 434 and the remote physical accelerator 432. The remote physical accelerator engine 434 may manage the remote physical accelerator 432 according to a command of the centralized resource manager 420, and transfer the acceleration request of the service unit on the host 410 to the remote physical accelerator 432 for processing.

    [0078] In this embodiment of the present invention, a function of the remote physical acceleration engine 434 is the same as that of the remote accelerator management unit in the foregoing embodiment.

    [0079] The centralized resource manager 420 creates a local virtual accelerator 413 on the host 410. The local virtual accelerator 413 accesses the local physical accelerator 412 by using the local physical acceleration engine 411.

    [0080] The centralized resource manager 420 creates a virtual client 414 on the host 410. The virtual client 414 communicates, by using a local communication module 415, with a remote communication module 433 located on the remote node 430 and communicates with the remote physical acceleration engine 434 by using the remote communication module 433.

    [0081] In this embodiment, the virtual client 414 is equivalent to a virtual accelerator.

    [0082] A communication function of the local communication module 415 may be integrated into the virtual client 414. A communication function of the remote communication module 433 may be integrated into the remote physical acceleration engine 434. After the communication functions are integrated, the local communication module 415 and the remote communication module 433 may be omitted.

    [0083] In this embodiment, a created virtual machine 440 includes a local virtual acceleration engine 441, the local virtual accelerator 413, the virtual client 414, and the local communication module 415.

    [0084] In the application scenario according to this embodiment of the present invention, the acceleration request of the service unit on the host 410 may be transferred to the local physical accelerator 412 and/or the remote physical accelerator 432 for processing. In this way, processing efficiency of the host 410 can be improved, a load on the host 410 can be reduced, and a sharing degree of the physical accelerator can be improved.

    Embodiment 5



    [0085] Based on the foregoing embodiments, this embodiment of the present invention discloses an accelerator virtualization apparatus. The apparatus is applied to a host. As shown in FIG. 5, the apparatus includes a centralized resource manager 510 and a virtual machine monitor 520. The centralized resource manager 510 includes:

    a receiving unit 511, configured to receive a virtual machine resource configuration command, where the virtual machine resource configuration command includes to-be-created virtual accelerator information;

    a matching physical accelerator selection unit 512, configured to select a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command received by the receiving unit 511;

    a generation unit 513, configured to generate description information used to describe the matching physical accelerator; and

    a sending unit 514, configured to send a first virtual machine creation command to the virtual machine monitor, where the first virtual machine creation command includes the description information, so that after receiving the first virtual machine creation command, the virtual machine monitor creates a first virtual machine including a first virtual accelerator corresponding to the matching physical accelerator, where the first virtual accelerator is generated by using the description information; or the sending unit, configured to send a second virtual machine creation command to the virtual machine monitor, where the second virtual machine creation command includes a description information obtaining identifier, so that the virtual machine monitor creates a second virtual machine after receiving the second virtual machine creation command, and the second virtual machine generates a second virtual accelerator after obtaining the description information according to the description information obtaining identifier.



    [0086] Accelerator virtualization can be implemented by using the accelerator virtualization apparatus in this embodiment of the present invention, and is easy to implement.

    [0087] In this embodiment of the present invention, the centralized resource manager 510 further includes:

    a physical accelerator information obtaining unit, configured to obtain physical accelerator information, where the physical accelerator includes at least a local physical accelerator or a remote physical accelerator; and

    a physical accelerator resource pool generation unit, configured to generate a physical accelerator information file according to the physical accelerator information, so as to generate the physical accelerator resource pool; and

    the matching physical accelerator selection unit 512 is further configured to: select matched physical accelerator information from the physical accelerator information file according to the to-be-created virtual accelerator information, and use a physical accelerator corresponding to the matched physical accelerator information as the matching physical accelerator.



    [0088] Optionally, the matching physical accelerator selection unit 512 is further configured to select the matched matching physical accelerator from the physical accelerator resource pool according to the physical location; and/or
    the matching physical accelerator selection unit 512 is further configured to select the matched matching physical accelerator from the physical accelerator resource pool according to a physical accelerator load.

    [0089] Optionally, the matching physical accelerator is not on the host, and after the virtual machine monitor 520 creates the first virtual machine or the second virtual machine, the virtual machine monitor 520 is further configured to send a communication address and a matching physical accelerator identifier to a remote accelerator management unit on a node, where the matching physical accelerator is located on the node, so that the virtual machine monitor 520 communicates with the remote accelerator management unit by using the communication address, and the remote accelerator management unit communicates with a corresponding matching physical accelerator by using the matching physical accelerator identifier.

    [0090] Optionally, after the centralized resource manager 510 creates the first virtual machine or the second virtual machine, the virtual accelerator is configured to: transfer an acceleration request to the matching physical accelerator for processing, where the acceleration request is sent by a service unit on the virtual machine, and return a processing result of the matching physical accelerator to the service unit, where the virtual accelerator is the first virtual accelerator or the second virtual accelerator.

    [0091] Optionally, the matching physical accelerator is not on the host, and the virtual accelerator is further configured to: send a handshake protocol-based handshake request to a remote accelerator management unit and receive a handshake success response fed back by the remote accelerator management unit;
    the virtual accelerator is further configured to send the acceleration request to the remote accelerator management unit, so that the remote accelerator management unit sends the acceleration request to a corresponding matching physical accelerator for processing;
    the virtual accelerator is further configured to receive an acceleration request response sent by the remote accelerator management unit, where the acceleration request response is the processing result that is returned to the remote accelerator management unit by the matching physical accelerator after the matching physical accelerator processes the acceleration request; and
    the virtual accelerator is further configured to send the acceleration request response to the service unit, where
    the virtual accelerator is the first virtual accelerator or the second virtual accelerator.

    [0092] Accelerator virtualization can be implemented by using the accelerator virtualization apparatus in this embodiment of the present invention. This improves a resource sharing degree and is easy to implement.

    Embodiment 6



    [0093] Based on the foregoing embodiments, this embodiment of the present invention discloses a host. As shown in FIG. 6, FIG. 6 is a schematic structural diagram of the host according to this embodiment of the present invention. The host includes:
    a processor 601 and a memory 602. The processor is configured to read code stored in the memory to run a virtual machine monitor and a centralized resource manager. The virtual machine monitor and the centralized resource manager are configured to execute the methods disclosed in the foregoing embodiments.

    [0094] It may be clearly understood by persons skilled in the art that technologies in the embodiments of the present invention may be implemented by software plus necessary universal hardware, where the universal hardware includes a universal integrated circuit, a universal CPU, a universal memory, a universal device, and the like, and definitely may also be implemented by application-specific hardware, like an application-specific integrated circuit, an application-specific CPU, an application-specific memory, an application-specific device, and the like, but in many cases, the former one is preferred. Based on such an understanding, the technical solutions of the present invention essentially or the part contributing to the prior art may be implemented in a form of a software product. The software product is stored in a storage medium, such as a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a hard disk, or an optical disc, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform the methods described in the embodiments or some parts of the embodiments of the present invention.

    [0095] The embodiments in this specification are all described in a progressive manner, for same or similar parts in the embodiments, reference may be made to these embodiments, and each embodiment focuses on a difference from other embodiments. Especially, a system embodiment is basically similar to a method embodiment, and therefore is described briefly; for related parts, reference may be made to partial descriptions in the method embodiment.


    Claims

    1. An accelerator virtualization method, applied to a host, wherein a centralized resource manager and a virtual machine monitor run on the host, and the method comprises:

    receiving, by the centralized resource manager, a virtual machine resource configuration command, wherein the virtual machine resource configuration command comprises to-be-created virtual accelerator information (201);

    selecting, by the centralized resource manager, a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command (202);

    generating, by the centralized resource manager, description information used to describe the matching physical accelerator (203); and

    sending, by the centralized resource manager, a first virtual machine creation command to the virtual machine monitor, wherein the first virtual machine creation command comprises the description information, so that after receiving the first virtual machine creation command, the virtual machine monitor creates a first virtual machine comprising a first virtual accelerator corresponding to the matching physical accelerator, wherein the first virtual accelerator is generated by using the description information (204); or sending, by the centralized resource manager, a second virtual machine creation command to the virtual machine monitor, wherein the second virtual machine creation command comprises a description information obtaining identifier, so that the virtual machine monitor creates a second virtual machine after receiving the second virtual machine creation command, and the second virtual machine generates a second virtual accelerator after obtaining the description information according to the description information obtaining identifier (204);

    wherein the matching physical accelerator is not on the host, and after the virtual machine monitor creates the first virtual machine or the second virtual machine, the method further comprises:
    sending, by the virtual machine monitor, a communication address and a matching physical accelerator identifier to a remote accelerator management unit on a node, wherein the matching physical accelerator is located on the node, so that the virtual machine monitor communicates with the remote accelerator management unit by using the communication address, and the remote accelerator management unit communicates with a corresponding matching physical accelerator by using the matching physical accelerator identifier.


     
    2. The method according to claim 1, wherein before the receiving, by the centralized resource manager, a virtual machine resource configuration command, the method further comprises:

    obtaining, by the centralized resource manager, physical accelerator information, wherein the physical accelerator comprises at least a local physical accelerator or a remote physical accelerator; and

    generating, by the centralized resource manager, a physical accelerator information file according to the physical accelerator information, so as to generate the physical accelerator resource pool; and

    the selecting, by the centralized resource manager, a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command comprises:
    selecting, by the centralized resource manager, matched physical accelerator information from the physical accelerator information file according to the to-be-created virtual accelerator information, and using a physical accelerator corresponding to the matched physical accelerator information as the matching physical accelerator.


     
    3. The method according to claim 2, wherein the selecting, by the centralized resource manager, a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator comprises:

    selecting, by the centralized resource manager, the matched matching physical accelerator from the physical accelerator resource pool according to a physical location; and/or

    selecting, by the centralized resource manager, the matched matching physical accelerator from the physical accelerator resource pool according to a physical accelerator load.


     
    4. The method according to any one of claims 1 to 3, wherein after the virtual machine monitor creates the first virtual machine or the second virtual machine, the method further comprises:
    transferring, by the virtual accelerator, an acceleration request to the matching physical accelerator for processing, wherein the acceleration request is sent by a service unit on the virtual machine; and returning a processing result of the matching physical accelerator to the service unit, wherein the virtual accelerator is the first virtual accelerator or the second virtual accelerator.
     
    5. The method according to claim 4, wherein the matching physical accelerator is not on the host, and the transferring, by the virtual accelerator, an acceleration request to the matching physical accelerator for processing, wherein the acceleration request is sent by a service unit on the virtual machine; and returning a processing result of the matching physical accelerator to the service unit comprises:

    sending, by the virtual accelerator, the acceleration request to the remote accelerator management unit, so that the remote accelerator management unit sends the acceleration request to a corresponding matching physical accelerator for processing;

    receiving, by the virtual accelerator, an acceleration request response sent by the remote accelerator management unit, wherein the acceleration request response comprises the processing result that is returned to the remote accelerator management unit by the matching physical accelerator after the matching physical accelerator processes the acceleration request; and

    sending, by the virtual accelerator, the acceleration request response to the service unit.


     
    6. An accelerator virtualization apparatus, applied to a host, wherein the apparatus comprises a centralized resource manager (510) and a virtual machine monitor (520), and the centralized resource manager (510) comprises:

    a receiving unit (511), configured to receive a virtual machine resource configuration command, wherein the virtual machine resource configuration command comprises to-be-created virtual accelerator information;

    a matching physical accelerator selection unit (512), configured to select a matched physical accelerator from a physical accelerator resource pool as a matching physical accelerator according to the to-be-created virtual accelerator information in the virtual machine resource configuration command received by the receiving unit (511);

    a generation unit (513), configured to generate description information used to describe the matching physical accelerator; and

    a sending unit (514), configured to send a first virtual machine creation command to the virtual machine monitor, wherein the first virtual machine creation command comprises the description information, so that after receiving the first virtual machine creation command, the virtual machine monitor creates a first virtual machine comprising a first virtual accelerator corresponding to the matching physical accelerator, wherein the first virtual accelerator is generated by using the description information; or a sending unit, configured to send a second virtual machine creation command to the virtual machine monitor, wherein the second virtual machine creation command comprises a description information obtaining identifier, so that the virtual machine monitor creates a second virtual machine after receiving the second virtual machine creation command, and the second virtual machine generates a second virtual accelerator after obtaining the description information according to the description information obtaining identifier;

    wherein the matching physical accelerator is not on the host, and after the virtual machine monitor (520) creates the first virtual machine or the second virtual machine, the virtual machine monitor (520) is further configured to send a communication address and a matching physical accelerator identifier to a remote accelerator management unit on a node, wherein the matching physical accelerator is located on the node, so that the virtual machine monitor (520) communicates with the remote accelerator management unit by using the communication address, and the remote accelerator management unit communicates with a corresponding matching physical accelerator by using the matching physical accelerator identifier.


     
    7. The apparatus according to claim 6, wherein the centralized resource manager (510) further comprises:

    a physical accelerator information obtaining unit, configured to obtain physical accelerator information, wherein the physical accelerator comprises at least a local physical accelerator or a remote physical accelerator; and

    a physical accelerator resource pool generation unit, configured to generate a physical accelerator information file according to the physical accelerator information, so as to generate the physical accelerator resource pool; and

    the matching physical accelerator selection unit is further configured to: select matched physical accelerator information from the physical accelerator information file according to the to-be-created virtual accelerator information, and use a physical accelerator corresponding to the matched physical accelerator information as the matching physical accelerator.


     
    8. The apparatus according to claim 7, wherein the matching physical accelerator selection unit is further configured to select the matched matching physical accelerator from the physical accelerator resource pool according to a physical location; and/or
    the matching physical accelerator selection unit is further configured to select the matched matching physical accelerator from the physical accelerator resource pool according to a physical accelerator load.
     
    9. The apparatus according to any one of claims 6 to 8, wherein after the virtual machine monitor (520) creates the first virtual machine or the second virtual machine, the virtual accelerator is configured to: transfer an acceleration request to the matching physical accelerator for processing, wherein the acceleration request is sent by a service unit on the virtual machine, and return a processing result of the matching physical accelerator to the service unit, wherein the virtual accelerator is the first virtual accelerator or the second virtual accelerator.
     
    10. The apparatus according to claim 9, wherein the matching physical accelerator is not on the host, and
    the virtual accelerator is further configured to send the acceleration request to the remote accelerator management unit, so that the remote accelerator management unit sends the acceleration request to a corresponding matching physical accelerator for processing;
    the virtual accelerator is further configured to receive an acceleration request response sent by the remote accelerator management unit, wherein the acceleration request response is the processing result that is returned to the remote accelerator management unit by the matching physical accelerator after the matching physical accelerator processes the acceleration request; and
    the virtual accelerator is further configured to send the acceleration request response to the service unit.
     


    Ansprüche

    1. Verfahren zum Virtualisieren eines Beschleunigers, das in einem Host angewandt wird, wobei eine zentralisierte Ressourcenverwaltung und ein virtueller Maschinenmonitor auf dem Host ablaufen, und wobei das Verfahren umfasst:

    Empfangen in der zentralisierten Ressourcenverwaltung eines Befehls zum Konfigurieren einer virtuellen Maschinenressource, wobei der Befehl zum Konfigurieren einer virtuellen Maschinenressource Informationen über zu erstellende virtuelle Beschleuniger umfasst (201);

    Auswählen durch die zentralisierte Ressourcenverwaltung eines passenden physischen Beschleunigers aus einem Ressourcenpool von physischen Beschleunigern als einen passenden physischen Beschleuniger gemäß den Informationen über zu erstellende virtuelle Beschleuniger in dem virtuellen Befehl zum Konfigurieren einer virtuellen Maschinenressource (202);

    Erzeugen durch die zentralisierte Ressourcenverwaltung von Beschreibungsinformationen, die verwendet werden, um den passenden physischen Beschleuniger zu beschreiben (203); und

    Senden eines Befehls zum Erstellen einer ersten virtuellen Maschine von der zentralisierten Ressourcenverwaltung an den virtuellen Maschinenmonitor, wobei der Befehl zum Erstellen einer ersten virtuellen Maschine die Beschreibungsinformationen umfasst, sodass der virtuelle Maschinenmonitor nach dem Empfangen des Befehls zum Erstellen einer ersten virtuellen Maschine eine erste virtuelle Maschine erstellt, die einen ersten virtuellen Beschleuniger umfasst, der dem passenden physischen Beschleuniger entspricht, wobei der erste virtuelle Beschleuniger erzeugt wird, indem die Beschreibungsinformationen verwendet werden (204); oder Senden eines Befehls zum Erstellen einer zweiten virtuellen Maschine von der zentralisierten Ressourcenverwaltung an den virtuellen Maschinenmonitor gesendet wird, wobei der Befehl zum Erstellen einer zweiten virtuellen Maschine eine Kennung umfasst, welche die Beschreibungsinformationen erhält, sodass der virtuelle Maschinenmonitor nach dem Empfangen des Befehls zum Erstellen einer zweiten virtuellen Maschine eine zweite virtuelle Maschine erstellt, und wobei die zweite virtuelle Maschine nach dem Erhalten der Beschreibungsinformationen einen zweiten virtuellen Beschleuniger gemäß der Kennung erzeugt, welche die Beschreibungsinformationen erhält (204);

    wobei sich der passende physische Beschleuniger nicht in dem Host befindet, und wobei das Verfahren, nachdem der virtuelle Maschinenmonitor die erste virtuelle Maschine oder die zweite virtuelle Maschine erstellt hat, außerdem umfasst:
    Senden einer Kommunikationsadresse und einer Kennung eines passenden physischen Beschleunigers von dem virtuellen Maschinenmonitor an eine ferne Beschleunigerverwaltungseinheit in einem Knoten, wobei der passende physische Beschleuniger in dem Knoten angebracht ist, sodass der virtuelle Maschinenmonitor mit der fernen Beschleunigerverwaltungseinheit kommuniziert, indem die Kommunikationsadresse verwendet wird, und wobei die ferne Beschleunigerverwaltungseinheit mit einem entsprechenden passenden physischen Beschleuniger kommuniziert, indem die Kennung des passenden physischen Beschleunigers verwendet wird.


     
    2. Verfahren nach Anspruch 1, wobei das Verfahren vor dem Empfangen eines Befehls zum Konfigurieren einer virtuellen Maschinenressource in der zentralisierten Ressourcenverwaltung, außerdem umfasst:

    Erhalten von Informationen über physische Beschleuniger in der zentralisierten Ressourcenverwaltung, wobei der physische Beschleuniger mindestens einen lokalen physischen Beschleuniger oder einen fernen physischen Beschleuniger umfasst; und

    Erzeugen durch die zentralisierte Ressourcenverwaltung einer physischen Beschleunigerinformationsdatei gemäß den Informationen über physische Beschleuniger, um den Ressourcenpool von physischen Beschleunigern zu erzeugen; und

    wobei das Auswählen durch die zentralisierte Ressourcenverwaltung eines passenden physischen Beschleunigers aus einem Ressourcenpool von physischen Beschleunigern als einen passenden physischen Beschleuniger gemäß den Informationen über zu erstellende virtuelle Beschleuniger in dem virtuellen Befehl zum Konfigurieren einer virtuellen Maschinenressource, umfasst:
    Auswählen durch die zentralisierte Ressourcenverwaltung von Informationen über passende physische Beschleuniger aus der physischen Beschleunigerinformationsdatei gemäß den Informationen über zu erstellende virtuelle Beschleuniger, und Verwenden eines physischen Beschleunigers, der den Informationen über passende physische Beschleuniger entspricht, als den passenden physischen Beschleuniger.


     
    3. Verfahren nach Anspruch 2, wobei das Auswählen durch die zentralisierte Ressourcenverwaltung eines passenden physischen Beschleunigers aus einem Ressourcenpool von physischen Beschleunigern als einen passenden physischen Beschleuniger umfasst:

    Auswählen durch die zentralisierte Ressourcenverwaltung des passenden physischen Beschleunigers aus dem Ressourcenpool von physischen Beschleunigern gemäß einem physischen Ort; und/oder

    Auswählen durch die zentralisierte Ressourcenverwaltung des passenden physischen Beschleunigers aus dem Ressourcenpool von physischen Beschleunigern gemäß einer physischen Beschleunigerlast.


     
    4. Verfahren nach einem der Ansprüche 1 bis 3, wobei das Verfahren, nachdem der virtuelle Maschinenmonitor die erste virtuelle Maschine oder die zweite virtuelle Maschine erstellt, außerdem umfasst:
    Übertragen einer Beschleunigungsanfrage von dem virtuellen Beschleuniger zum Verarbeiten an den passenden physischen Beschleuniger, wobei die Beschleunigungsanfrage von einer Diensteinheit in der virtuellen Maschine gesendet wird; und Zurücksenden eines Verarbeitungsergebnisses von dem passenden physischen Beschleuniger an die Diensteinheit, wobei der virtuelle Beschleuniger der erste virtuelle Beschleuniger oder der zweite virtuelle Beschleuniger ist.
     
    5. Verfahren nach Anspruch 4, wobei sich der passende physische Beschleuniger nicht in dem Host befindet, und wobei das Übertragen einer Beschleunigungsanfrage von dem virtuellen Beschleuniger zum Verarbeiten an den passenden physischen Beschleuniger, wobei die Beschleunigungsanfrage von einer Diensteinheit in der virtuellen Maschine gesendet wird; und das Zurücksenden eines Verarbeitungsergebnisses von dem passenden physischen Beschleuniger an die Diensteinheit zurückgesendet wird, umfassen:

    Senden der Beschleunigungsanfrage von dem virtuellen Beschleuniger an die ferne Beschleunigerverwaltungseinheit, sodass die ferne Beschleunigerverwaltungseinheit die Beschleunigungsanfrage zum Verarbeiten an einen entsprechenden passenden physischen Beschleuniger sendet;

    Empfangen in dem virtuellen Beschleuniger einer Beschleunigungsanfrageantwort, die von der fernen Beschleunigerverwaltungseinheit gesendet wurde, wobei die Beschleunigungsanfrageantwort das Verarbeitungsergebnis umfasst, das von dem passenden physischen Beschleuniger an die ferne Beschleunigerverwaltungseinheit zurückgesendet wird, nachdem der passende physische Beschleuniger die Beschleunigungsanfrage verarbeitet hat; und

    Senden der Beschleunigungsanfrageantwort von dem virtuellen Beschleuniger an die Diensteinheit,


     
    6. Vorrichtung zum Virtualisieren eines Beschleunigers, die in einem Host angewandt wird, wobei die Vorrichtung eine zentralisierte Ressourcenverwaltung (510) und einen virtuellen Maschinenmonitor (520) umfasst, und wobei die zentralisierte Ressourcenverwaltung (510) umfasst:

    eine Empfangseinheit (511), die konfiguriert ist zum Empfangen eines Befehls zum Konfigurieren einer virtuellen Maschinenressource, wobei der Befehl zum Konfigurieren einer virtuellen Maschinenressource Informationen über zu erstellende virtuelle Beschleuniger umfasst;

    eine Einheit zum Auswählen eines passenden physischen Beschleunigers (512), die konfiguriert ist zum Auswählen eines passenden physischen Beschleunigers aus einem Ressourcenpool von physischen Beschleunigern als einen passenden physischen Beschleuniger gemäß den Informationen über zu erstellende virtuelle Beschleuniger in dem Befehl zum Konfigurieren einer virtuellen Maschinenressource, der von der Empfangseinheit (511) empfangen wurde;

    eine Erzeugungseinheit (513), die konfiguriert ist zum Erzeugen von Beschreibungsinformationen, die verwendet werden, um den passenden physischen Beschleuniger zu beschreiben; und

    eine Sendeeinheit (514), die konfiguriert ist zum Senden eines Befehls zum Erstellen einer ersten virtuellen Maschine an den virtuellen Maschinenmonitor, wobei der Befehl zum Erstellen einer ersten virtuellen Maschine die Beschreibungsinformationen umfasst, sodass der virtuelle Maschinenmonitor nach dem Empfangen des Befehls zum Erstellen einer ersten virtuellen Maschine eine erste virtuelle Maschine erstellt, die einen ersten virtuellen Beschleuniger umfasst, der dem passenden physischen Beschleuniger entspricht, wobei der erste virtuelle Beschleuniger erzeugt wird, indem die Beschreibungsinformationen verwendet werden; oder eine Sendeeinheit, die konfiguriert ist zum Senden eines Befehls zum Erstellen einer zweiten virtuellen Maschine an den virtuellen Maschinenmonitor, wobei der Befehl zum Erstellen einer zweiten virtuellen Maschine eine Kennung umfasst, welche die Beschreibungsinformationen erhält, sodass der virtuelle Maschinenmonitor nach dem Empfangen des Befehls zum Erstellen einer zweiten virtuellen Maschine eine zweite virtuelle Maschine erstellt, und wobei die zweite virtuelle Maschine nach dem Erhalten der Beschreibungsinformationen einen zweiten virtuellen Beschleuniger gemäß der Kennung erzeugt, welche die Beschreibungsinformationen erhält;

    wobei sich der passende physische Beschleuniger nicht in dem Host befindet, und wobei der virtuelle Maschinenmonitor (520), nachdem der virtuelle Maschinenmonitor (520) die erste virtuelle Maschine oder die zweite virtuelle Maschine erstellt, außerdem konfiguriert ist zum Senden einer Kommunikationsadresse und einer Kennung eines passenden physischen Beschleunigers an eine ferne Beschleunigerverwaltungseinheit in einem Knoten, wobei der passende physische Beschleuniger in dem Knoten angebracht ist, sodass der virtuelle Maschinenmonitor (520) mit der fernen Beschleunigerverwaltungseinheit kommuniziert, indem die Kommunikationsadresse verwendet wird, und wobei die ferne Beschleunigerverwaltungseinheit mit einem entsprechenden passenden physischen Beschleuniger kommuniziert, indem die Kennung des passenden physischen Beschleunigers verwendet wird.


     
    7. Vorrichtung nach Anspruch 6, wobei die zentralisierte Ressourcenverwaltung (510) außerdem umfasst: eine Einheit zum Erhalten von Informationen über physische Beschleuniger, die konfiguriert ist zum Erhalten von Informationen über physische Beschleuniger, wobei der physische Beschleuniger mindestens einen lokalen physischen Beschleuniger oder einen fernen physischen Beschleuniger umfasst; und eine Einheit zum Erzeugen eines Ressourcenpools von physischen Beschleunigern, die konfiguriert ist zum Erzeugen einer physischen Beschleunigerinformationsdatei gemäß den Informationen über physische Beschleuniger, um den Ressourcenpool von physischen Beschleunigern zu erzeugen; und
    wobei die Einheit zum Auswählen eines passenden physischen Beschleunigers außerdem konfiguriert ist zum: Auswählen von Informationen über passende physische Beschleuniger aus der physischen Beschleunigerinformationsdatei gemäß den Informationen über zu erstellende physische Beschleuniger, und Verwenden eines physischen Beschleunigers, der den Informationen über passende physische Beschleuniger entspricht, als den passenden physischen Beschleuniger.
     
    8. Vorrichtung nach Anspruch 7, wobei die Einheit zum Auswählen eines passenden physischen Beschleunigers außerdem konfiguriert ist zum Auswählen des passenden physischen Beschleunigers aus dem Ressourcenpool von physischen Beschleunigern gemäß einem physischen Ort; und/oder
    wobei die Einheit zum Auswählen eines passenden physischen Beschleunigers außerdem konfiguriert ist zum Auswählen des passenden physischen Beschleunigers aus dem Ressourcenpool von physischen Beschleunigern gemäß einer physischen Beschleunigerlast.
     
    9. Vorrichtung nach einem der Ansprüche 6 bis 8, wobei der virtuelle Maschinenmonitor (520) die erste virtuelle Maschine oder die zweite virtuelle Maschine erstellt, wobei der virtuelle Beschleuniger konfiguriert ist zum: Übertragen einer Beschleunigungsanfrage zum Verarbeiten an den passenden physischen Beschleuniger, wobei die Beschleunigungsanfrage von einer Diensteinheit in der virtuellen Maschine gesendet wird, und zum Zurücksenden eines Verarbeitungsergebnisses des passenden physischen Beschleunigers an die Diensteinheit, wobei der virtuelle Beschleuniger der erste virtuelle Beschleuniger oder der zweite virtuelle Beschleuniger ist.
     
    10. Vorrichtung nach Anspruch 9, wobei sich der passende physische Beschleuniger nicht in dem Host befindet, und
    wobei der virtuelle Beschleuniger außerdem konfiguriert ist zum Senden der Beschleunigungsanfrage an die ferne Beschleunigerverwaltungseinheit, sodass die ferne Beschleunigerverwaltungseinheit die Beschleunigungsanfrage zum Verarbeiten an einen entsprechenden passenden physischen Beschleuniger sendet;
    wobei der virtuelle Beschleuniger außerdem konfiguriert ist zum Empfangen einer Beschleunigungsanfrageantwort, die von der fernen Beschleunigerverwaltungseinheit gesendet wurde, wobei die Beschleunigungsanfrageantwort das Verarbeitungsergebnis ist, das von dem passenden physischen Beschleuniger an die ferne Beschleunigerverwaltungseinheit zurückgesendet wird, nachdem der passende physische Beschleuniger die Beschleunigungsanfrage verarbeitet hat; und
    wobei der virtuelle Beschleuniger außerdem konfiguriert ist zum Senden der Beschleunigungsanfrageantwort an die Diensteinheit.
     


    Revendications

    1. Procédé de virtualisation d'accélérateur, appliqué à un hôte, un gestionnaire de ressources centralisé et un moniteur de machines virtuelles fonctionnant sur l'hôte, et le procédé comprenant :

    la réception, par le gestionnaire de ressources centralisé, d'une commande de configuration de ressources de machine virtuelle, la commande de configuration de ressources de machine virtuelle comprenant des informations d'accélérateur virtuel à créer (201) ;

    la sélection, par le gestionnaire de ressources centralisé, d'un accélérateur physique adapté à partir d'un ensemble de ressources d'accélérateur physique en tant qu'accélérateur physique équivalent en fonction des informations d'accélérateur virtuel à créer dans la commande de configuration de ressources de machine virtuelle (202) ;

    la génération, par le gestionnaire de ressources centralisé, d'informations de description utilisées pour décrire l'accélérateur physique équivalent (203) ; et

    l'envoi, par le gestionnaire de ressources centralisé, d'une première commande de création de machine virtuelle au moniteur de machines virtuelles, la première commande de création de machine virtuelle comprenant les informations de description, de telle sorte qu'après avoir reçu la première commande de création de machine virtuelle, le moniteur de machines virtuelles crée une première machine virtuelle comprenant un premier accélérateur virtuel correspondant à l'accélérateur physique équivalent, le premier accélérateur virtuel étant généré au moyen des informations de description (204) ; ou l'envoi, par le gestionnaire de ressources centralisé, d'une deuxième commande de création de machine virtuelle au moniteur de machines virtuelles, la deuxième commande de création de machine virtuelle comprenant un identifiant d'obtention d'informations de description, de telle sorte que le moniteur de machines virtuelles crée une deuxième machine virtuelle après avoir reçu la deuxième commande de création de machine virtuelle, et la deuxième machine virtuelle génère un deuxième accélérateur virtuel après l'obtention des informations de description en fonction de l'identifiant d'obtention d'informations de description (204) ;

    l'accélérateur physique équivalent ne se trouvant pas sur l'hôte, et le procédé comprenant en outre, après que le moniteur de machines virtuelles a créé la première machine virtuelle ou la deuxième machine virtuelle :
    l'envoi, par le moniteur de machines virtuelles, d'une adresse de communication et d'un identifiant d'accélérateur physique équivalent à une unité de gestion d'accélérateurs distante sur un nœud, l'accélérateur physique équivalent étant situé sur le nœud, de telle sorte que le moniteur de machines virtuelles communique avec l'unité de gestion d'accélérateurs distante en utilisant l'adresse de communication, et l'unité de gestion d'accélérateurs distante communique avec un accélérateur physique équivalent correspondant en utilisant l'identifiant d'accélérateur physique équivalent.


     
    2. Procédé selon la revendication 1, le procédé comprenant en outre, avant la réception, par le gestionnaire de ressources centralisé, d'une commande de configuration de ressources de machine virtuelle :

    l'obtention, par le gestionnaire de ressources centralisé, d'informations d'accélérateur physique, l'accélérateur physique comprenant au moins un accélérateur physique local ou un accélérateur physique distant ; et

    la génération, par le gestionnaire de ressources centralisé, d'un fichier d'informations d'accélérateur physique en fonction des informations d'accélérateur physique, de manière à générer l'ensemble de ressources d'accélérateur physique ; et

    la sélection, par le gestionnaire de ressources centralisé, d'un accélérateur physique adapté à partir d'un ensemble de ressources d'accélérateur physique en tant qu'accélérateur physique équivalent en fonction des informations d'accélérateur virtuel à créer dans la commande de configuration de ressources de machine virtuelle comprenant :
    la sélection, par le gestionnaire de ressources centralisé, d'informations d'accélérateur physique adapté à partir du fichier d'informations d'accélérateur physique en fonction des informations d'accélérateur virtuel à créer, et l'utilisation d'un accélérateur physique correspondant aux informations d'accélérateur physique adapté en tant qu'accélérateur physique équivalent.


     
    3. Procédé selon la revendication 2, dans lequel la sélection, par le gestionnaire de ressources centralisé, d'un accélérateur physique adapté à partir d'un ensemble de ressources d'accélérateur physique en tant qu'accélérateur physique équivalent comprend :

    la sélection, par le gestionnaire de ressources centralisé, de l'accélérateur physique équivalent adapté à partir de l'ensemble de ressources d'accélérateur physique en fonction d'un emplacement physique ; et/ou

    la sélection, par le gestionnaire de ressources centralisé, de l'accélérateur physique équivalent adapté à partir de l'ensemble de ressources d'accélérateur physique en fonction d'une charge d'accélérateur physique.


     
    4. Procédé selon l'une quelconque des revendications 1 à 3, le procédé comprenant en outre, après que le moniteur de machines virtuelles a créé la première machine virtuelle ou la deuxième machine virtuelle :
    le transfert, par l'accélérateur virtuel, d'une requête d'accélération à l'accélérateur physique équivalent pour traitement, la requête d'accélération étant envoyée par une unité de service sur la machine virtuelle ; et le retour d'un résultat de traitement de l'accélérateur physique équivalent à l'unité de service, l'accélérateur virtuel étant le premier accélérateur virtuel ou le deuxième accélérateur virtuel.
     
    5. Procédé selon la revendication 4, dans lequel l'accélérateur physique équivalent ne se trouve pas sur l'autre, et le transfert, par l'accélérateur virtuel, d'une requête d'accélération à l'accélérateur physique équivalent pour traitement, la requête d'accélération étant envoyée par une unité de service sur la machine virtuelle ; et le retour d'un résultat de traitement de l'accélérateur physique équivalent à l'unité de service comprenant :

    l'envoi, par l'accélérateur virtuel, de la requête d'accélération à l'unité de gestion d'accélérateurs distante, de telle sorte que l'unité de gestion d'accélérateurs distante envoie la requête d'accélération à un accélérateur physique équivalent correspondant pour traitement ;

    la réception, par l'accélérateur virtuel, d'une réponse de requête d'accélération envoyée par l'unité de gestion d'accélérateurs distante, la réponse de requête d'accélération comprenant le résultat de traitement qui est retourné à l'unité de gestion d'accélérateurs distante par l'accélérateur physique équivalent après que l'accélérateur physique équivalent a traité la requête d'accélération ; et

    l'envoi, par l'accélérateur virtuel, de la réponse de requête d'accélération à l'unité de service.


     
    6. Appareil de virtualisation d'accélérateur, appliqué à un hôte, l'appareil comprenant un gestionnaire de ressources centralisé (510) et un moniteur de machines virtuelles (520), et le gestionnaire de ressources centralisé (510) comprenant :

    une unité de réception (511), configurée pour recevoir une commande de configuration de ressources de machine virtuelle, la commande de configuration de ressources de machine virtuelle comprenant des informations d'accélérateur virtuel à créer ;

    une unité de sélection d'accélérateur physique équivalent (512), configurée pour sélectionner un accélérateur physique adapté à partir d'un ensemble de ressources d'accélérateur physique en tant qu'accélérateur physique équivalent en fonction des informations d'accélérateur virtuel à créer dans la commande de configuration de ressources de machine virtuelle reçue par l'unité de réception (511) ;

    une unité de génération (513), configurée pour générer des informations de description utilisées pour décrire l'accélérateur physique équivalent ; et

    une unité d'envoi (514), configurée pour envoyer une première commande de création de machine virtuelle au moniteur de machines virtuelles, la première commande de création de machine virtuelle comprenant les informations de description, de telle sorte qu'après avoir reçu la première commande de création de machine virtuelle, le moniteur de machines virtuelles crée une première machine virtuelle comprenant un premier accélérateur virtuel correspondant à l'accélérateur physique équivalent, le premier accélérateur virtuel étant généré au moyen des informations de description ; ou une unité d'envoi, configurée pour envoyer une deuxième commande de création de machine virtuelle au moniteur de machines virtuelles, la deuxième commande de création de machine virtuelle comprenant un identifiant d'obtention d'informations de description, de telle sorte que le moniteur de machines virtuelles crée une deuxième machine virtuelle après avoir reçu la deuxième commande de création de machine virtuelle, et la deuxième machine virtuelle génère un deuxième accélérateur virtuel après l'obtention des informations de description en fonction de l'identifiant d'obtention d'informations de description ; l'accélérateur physique équivalent ne se trouvant pas sur l'hôte, et après que le moniteur de machines virtuelles (520) a créé la première machine virtuelle ou la deuxième machine virtuelle, le moniteur de machines virtuelles (520) étant également configuré pour envoyer une adresse de communication et un identifiant d'accélérateur physique équivalent à une unité de gestion d'accélérateurs distante sur un nœud, l'accélérateur physique équivalent étant situé sur le nœud, de telle sorte que le moniteur de machines virtuelles (520) communique avec l'unité de gestion d'accélérateurs distante en utilisant l'adresse de communication, et l'unité de gestion d'accélérateurs distante communique avec un accélérateur physique équivalent correspondant en utilisant l'identifiant d'accélérateur physique équivalent.


     
    7. Appareil selon la revendication 6, dans lequel le gestionnaire de ressources centralisé (510) comprend en outre :

    une unité d'obtention d'informations d'accélérateur physique, configurée pour obtenir des informations d'accélérateur physique, l'accélérateur physique comprenant au moins un accélérateur physique local ou un accélérateur physique distant ; et

    une unité de génération d'ensemble de ressources d'accélérateur physique, configurée pour générer un fichier d'informations d'accélérateur physique en fonction des informations d'accélérateur physique, de manière à générer l'ensemble de ressources d'accélérateur physique ; et

    l'unité de sélection d'accélérateur physique équivalent est également configurée pour : sélectionner des informations d'accélérateur physique adapté à partir du fichier d'informations d'accélérateur physique en fonction des informations d'accélérateur virtuel à créer, et utiliser un accélérateur physique correspondant aux informations d'accélérateur physique adapté en tant qu'accélérateur physique équivalent.


     
    8. Appareil selon la revendication 7, dans lequel l'unité de sélection d'accélérateur physique équivalent est également configurée pour sélectionner l'accélérateur physique équivalent adapté à partir de l'ensemble de ressources d'accélérateur physique en fonction d'un emplacement physique ; et/ou
    l'unité de sélection d'accélérateur physique équivalent est également configurée pour sélectionner l'accélérateur physique équivalent adapté à partir de l'ensemble de ressources d'accélérateur physique en fonction d'une charge d'accélérateur physique.
     
    9. Appareil selon l'une quelconque des revendications 6 à 8 dans lequel, après que le moniteur de machines virtuelles (520) a créé la première machine virtuelle ou la deuxième machine virtuelle, l'accélérateur virtuel est configuré pour : transférer une requête d'accélération à l'accélérateur physique équivalent pour traitement, la requête d'accélération étant envoyée par une unité de service sur la machine virtuelle, et retourner un résultat de traitement de l'accélérateur physique équivalent à l'unité de service, l'accélérateur virtuel étant le premier accélérateur virtuel ou le deuxième accélérateur virtuel.
     
    10. Appareil selon la revendication 9, dans lequel l'accélérateur physique équivalent ne se trouve pas sur l'hôte, et
    l'accélérateur virtuel est également configuré pour envoyer la requête d'accélération à l'unité de gestion d'accélérateurs distante, de telle sorte que l'unité de gestion d'accélérateurs distante envoie la requête d'accélération à un accélérateur physique équivalent correspondant pour traitement ;
    l'accélérateur virtuel est également configuré pour recevoir une réponse de requête d'accélération envoyée par l'unité de gestion d'accélérateurs distante, la réponse de requête d'accélération étant le résultat de traitement qui est retourné à l'unité de gestion d'accélérateurs distante par l'accélérateur physique équivalent après que l'accélérateur physique équivalent a traité la requête d'accélération ; et
    l'accélérateur virtuel est également configuré pour envoyer la réponse de requête d'accélération à l'unité de service.
     




    Drawing





















    REFERENCES CITED IN THE DESCRIPTION



    This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

    Patent documents cited in the description