Method, device and equipment for realizing message signal interruption
1. A method for implementing message signaled interrupts, comprising:
the virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus equipment and initializes the interrupt resources when initializing; the number of the queues is multiple;
obtaining information of a message signal interrupt (msi) message configured by a client core for the memory mapped bus device;
and providing the configured information of the message signal interrupt message to the virtual machine management program.
2. The method of claim 1, wherein obtaining information for a message signaled interrupt message configured by a client core for the memory mapped bus device comprises:
obtaining address information of the message signal interruption message from a predefined address register; the address register is used for storing the address of the information of the message signal interrupt message;
and obtaining the information of the signal interruption message configured by the client kernel aiming at the memory mapping bus equipment according to the address information of the message signal interruption message.
3. The method of claim 1, wherein providing the information of the configured message signaled interrupt message to a virtual machine hypervisor comprises:
storing the obtained information of the message signal interrupt message configured by the client kernel aiming at the memory mapping bus equipment in a local cache;
obtaining message signal interruption enabling identification information;
and judging whether the message signal interruption is enabled or not according to the message signal interruption enabling identification information, and providing the information of the message signal interruption message stored in the local cache to the virtual machine management program when the judgment result is yes.
4. The method of claim 3, further comprising:
and returning to the step of obtaining the information of the message signal interrupt message configured by the client kernel aiming at the memory mapped bus equipment when the judgment result is negative.
5. A method for implementing message signaled interrupts, comprising:
when a client checks memory mapping bus equipment to carry out initialization operation, distributing corresponding message signal interrupt messages and interrupt numbers for each queue according to the queue number of the memory mapping bus equipment; the number of the queues is multiple;
configuring a message signaled interruption message for each queue;
providing information of the message signal interrupt message configured for each queue to the virtual machine monitor;
an information signal interrupt is enabled for the memory mapped bus device.
6. The method of claim 5, wherein providing information of the message signaled interruption message configured for each queue to a virtual machine monitor comprises:
judging whether the message signal interruption message and the interruption number are successfully distributed, if so, providing the information of the message signal interruption message configured aiming at each queue to the virtual machine monitor;
and if not, performing single interrupt configuration on the memory mapping bus equipment.
7. The method of claim 5 or 6, wherein providing information of the message signaled interruption message configured for each queue to a virtual machine monitor comprises:
and storing the address of the information of the message signaled interruption message configured for each queue into a predefined address register for storing the address of the information of the message signaled interruption message, so that the virtual machine monitor obtains the address of the information of the message signaled interruption message from the address register and obtains the information of the message signaled interruption message according to the address.
8. The method of claim 5, further comprising:
and acquiring the queue number of the memory mapping bus equipment.
9. The method of claim 8, wherein obtaining the number of queues of the memory-mapped bus device comprises:
obtaining a memory space written by a virtual machine monitor through a virtual transmission protocol and used for storing the queue number of the memory mapping bus equipment;
reading the virtual memory mapped input/output from the memory space via a virtual transfer protocol.
10. An apparatus for implementing message signaled interrupts, comprising:
the interrupt resource allocation unit is used for allocating interrupt resources according to the queue number of the memory mapping bus equipment and initializing the interrupt resources when the virtual machine monitor is initialized; the number of the queues is multiple;
an information obtaining unit of a message signal interrupt (msi) message, configured to obtain information of a message signal interrupt (msi) message configured by the client kernel for the memory mapped bus device;
and the information providing unit is used for providing the configured information of the message signal interrupt message to the virtual machine management program.
11. An electronic device, comprising:
a processor; and
a memory for storing a program for implementing the method for message signaled interruption, the device being powered on and executing the program for implementing the method for message signaled interruption by the processor, the following steps being performed:
the virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus equipment and initializes the interrupt resources when initializing; the number of the queues is multiple;
obtaining information of a message signal interrupt (msi) message configured by a client core for the memory mapped bus device;
and providing the configured information of the message signal interrupt message to the virtual machine management program.
12. A storage device, characterized in that,
a program stored with a program for implementing a method for message signaled interruption, the program being executable by a processor for performing the steps of:
the virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus equipment and initializes the interrupt resources when initializing; the number of the queues is multiple;
obtaining information of a message signal interrupt (msi) message configured by a client core for the memory mapped bus device;
and providing the configured information of the message signal interrupt message to the virtual machine management program.
13. A serverless processing method for event processing, comprising:
receiving event information triggered by a user;
calling a function to calculate and process the event information to obtain a processing result of the event information, wherein the function calculation is realized by adopting at least one of claims 1 to 9;
and returning the processing result to the user.
14. A method for server-less processing using elastic capacity expansion, comprising:
receiving digital content information sent by a user;
calling function calculation to perform elastic capacity expansion processing on the digital content information to obtain a mixed flow result of the digital content information, wherein the function calculation is realized by adopting at least one of claims 1 to 9;
and sending the mixed flow result to a terminal user.
15. A server-free processing method for data of the Internet of things is characterized by comprising the following steps:
receiving Internet of things data sent by equipment;
calling a function to calculate and process the data of the internet of things to obtain a processing result of the event information, wherein the function calculation is realized by adopting at least one of claims 1 to 9;
and returning the processing result to the user.
Background
In the development process of cloud computing technology, especially cloud native technology, security containers gradually become the focus of attention, the security containers are usually realized by adopting security sandboxes, the security sandboxes meet the cloud native container standard on one hand, on the other hand, a secure operating environment is provided for users, and meanwhile, the security sandboxes are widely applied to serverless (server-free) scenes due to the fact that the security sandboxes occupy less resources and are high in starting speed.
Some security sandboxes support memory mapped bus devices (i.e., memory mapped bus devices conforming to a virtual transport protocol, for example, mmio devices conforming to a virtio protocol), which have the advantages of simple implementation and high data security, but when the memory mapped bus devices are used, in many cases, the interrupt performance is low because only a conventional single interrupt is supported and multiple interrupts are not supported due to the limitation of the virtual transport protocol; in addition, due to lack of multi-interrupt support, multi-queue equipment accessed by the virtual machine cannot be supported.
Disclosure of Invention
The application provides a method for realizing message signal interruption, which aims to solve the problems that the existing virtual input and output equipment has low interruption performance and can not support multiple queues accessed by a virtual machine.
The application provides a method for realizing message signal interruption, which comprises the following steps:
the virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus equipment and initializes the interrupt resources when initializing; the number of the queues is multiple;
obtaining information of a message signal interrupt (msi) message configured by a client core for the memory mapped bus device;
and providing the configured information of the message signal interrupt message to the virtual machine management program.
Optionally, the obtaining information of the message signal interrupt message configured by the client kernel for the memory mapped bus device includes:
obtaining address information of the message signal interruption message from a predefined address register; the address register is used for storing the address of the information of the message signal interrupt message;
and obtaining the information of the signal interruption message configured by the client kernel aiming at the memory mapping bus equipment according to the address information of the message signal interruption message.
Optionally, the providing the configured information of the message signal interrupt message to the virtual machine management program includes:
storing the obtained information of the message signal interrupt message configured by the client kernel aiming at the memory mapping bus equipment in a local cache;
obtaining message signal interruption enabling identification information;
and judging whether the message signal interruption is enabled or not according to the message signal interruption enabling identification information, and providing the information of the message signal interruption message stored in the local cache to the virtual machine management program when the judgment result is yes.
Optionally, the method further includes:
and returning to the step of obtaining the information of the message signal interrupt message configured by the client kernel aiming at the memory mapped bus equipment when the judgment result is negative.
The present application further provides a method for implementing message signal interruption, including:
when a client checks memory mapping bus equipment to carry out initialization operation, distributing corresponding message signal interrupt messages and interrupt numbers for each queue according to the queue number of the memory mapping bus equipment; the number of the queues is multiple;
providing information of the message signal interrupt message configured for each queue to the virtual machine monitor;
an information signal interrupt is enabled for the memory mapped bus device.
Optionally, the providing, to the virtual machine monitor, information of the message signaled interrupt message configured for each queue includes:
judging whether the message signal interruption message and the interruption number are successfully distributed, if so, providing the information of the message signal interruption message configured aiming at each queue to the virtual machine monitor;
and if not, performing single interrupt configuration on the memory mapping bus equipment.
Optionally, the providing, to the virtual machine monitor, information of the message signaled interrupt message configured for each queue includes:
and storing the address of the information of the message signaled interruption message configured for each queue into a predefined address register for storing the address of the information of the message signaled interruption message, so that the virtual machine monitor obtains the address of the information of the message signaled interruption message from the address register and obtains the information of the message signaled interruption message according to the address.
Optionally, the method further includes:
and acquiring the queue number of the memory mapping bus equipment.
Optionally, the obtaining the number of queues of the memory mapped bus device includes:
obtaining a memory space written by a virtual machine monitor through a virtual transmission protocol and used for storing the queue number of the memory mapping bus equipment;
reading the virtual memory mapped input/output from the memory space via a virtual transfer protocol.
The present application further provides a device for implementing message signal interruption, including:
the interrupt resource allocation unit is used for allocating interrupt resources according to the queue number of the memory mapping bus equipment and initializing the interrupt resources when the virtual machine monitor is initialized; the number of the queues is multiple;
an information obtaining unit of a message signal interrupt (msi) message, configured to obtain information of a message signal interrupt (msi) message configured by the client kernel for the memory mapped bus device;
and the information providing unit is used for providing the configured information of the message signal interrupt message to the virtual machine management program.
The present application further provides an electronic device, comprising:
a processor; and
a memory for storing a program for implementing the method for message signaled interruption, the device being powered on and executing the program for implementing the method for message signaled interruption by the processor, the following steps being performed:
the virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus equipment and initializes the interrupt resources when initializing; the number of the queues is multiple;
obtaining information of a message signal interrupt (msi) message configured by a client core for the memory mapped bus device;
and providing the configured information of the message signal interrupt message to the virtual machine management program.
The present application also provides a storage device storing a program implementing the method for message signal interruption, the program being executed by a processor to perform the steps of:
the virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus equipment and initializes the interrupt resources when initializing; the number of the queues is multiple;
obtaining information of a message signal interrupt (msi) message configured by a client core for the memory mapped bus device;
and providing the configured information of the message signal interrupt message to the virtual machine management program.
The application also provides a serverless processing method for event processing, which comprises the following steps:
receiving event information triggered by a user;
calling a function to calculate and process the event information to obtain a processing result of the event information, wherein the function calculation is realized by adopting at least one of the methods for realizing the message signal interruption;
and returning the processing result to the user.
The present application further provides a server-less processing method using elastic capacity expansion, including:
receiving digital content information sent by a user;
calling function calculation to perform elastic capacity expansion processing on the digital content information to obtain a mixed flow result of the digital content information, wherein the function calculation is realized by adopting at least one of the methods for realizing message signal interruption;
and sending the mixed flow result to a terminal user.
The application also provides a server-free processing method for the data of the Internet of things, which comprises the following steps:
receiving Internet of things data sent by equipment;
calling a function calculation to process the data of the internet of things to obtain a processing result of the event information, wherein the function calculation is realized by adopting at least one of the methods for realizing message signal interruption;
and returning the processing result to the user.
Compared with the prior art, the method has the following advantages:
the method for realizing message signal interruption distributes interruption resources through a virtual machine monitor according to the queue number of memory mapping bus equipment, obtains information of a message signal interruption (msi) message configured by a client kernel aiming at the memory mapping bus equipment, and provides the information of the configured message signal interruption message to a virtual machine management program.
Drawings
Fig. 1 is a flowchart of a method for implementing message signal interruption according to a first embodiment of the present application.
Fig. 2 is a schematic structural diagram provided in an embodiment of the present application.
Fig. 3 is a flowchart for providing the configured information of the message signaled interruption message to the virtual machine management program according to the first embodiment of the present application.
Fig. 4 is a flowchart of a method for implementing message signal interruption according to a second embodiment of the present application.
Fig. 5 is an application scenario diagram of a method for server-less event processing according to a ninth embodiment of the present application.
Fig. 6 is an application scenario diagram of a serverless processing method using flexible capacity expansion according to a tenth embodiment of the present application.
Fig. 7 is an application scenario diagram of a method for server-less processing of internet of things data according to an eleventh embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather construed as limited to the embodiments set forth herein.
The first embodiment of the present application provides a method for implementing message signal interruption, and an execution subject of the method is a virtual machine monitor. This is explained below with reference to fig. 1.
As shown in fig. 1, in step S101, the virtual machine monitor allocates an interrupt resource according to the number of queues of the memory mapped bus device during initialization and initializes the interrupt resource; the number of the queues is multiple.
The Message Signaled Interrupts (MSI) is an interrupt that relies on a device writing a small piece of interrupt description data to a specific address to notify the CPU of the occurrence of an interrupt.
The Virtual Machine Monitor (VMM) is a system software, and can maintain a plurality of efficient and isolated program environments, which support a user to directly access real hardware, and is mainly used to manage resources of a virtual machine.
The Memory-mapped I/O refers to a virtual Memory-mapped bus device, and may be simulated by a virtual machine monitor. For example, the virtual network card and the virtual hard disk belong to the memory mapped bus device. The memory mapping bus device can comprise a mmio device following a virtio protocol, wherein virtio is a transmission protocol created in a virtualization mode, and a user virtual machine and a host (host) are used interactively.
The interrupt resource refers to an interrupt resource for servicing a queue of the input/output device.
Allocating interrupt resources according to the number of queues of the memory mapped bus device means allocating one interrupt resource to each queue of the memory mapped bus device to support multi-interrupt processing of the memory mapped bus device.
The virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus device and initializes the interrupt resources during initialization, and the method comprises the following steps: the method comprises the steps that a virtual machine monitor creates memory mapping bus equipment during initialization; and allocating interrupt resources according to the queue number of the memory mapping bus equipment and initializing the interrupt resources.
As shown in fig. 1, in step S102, information of a message signaled interrupt (msi) message configured by a client core for the memory mapped bus device is obtained.
The client kernel may refer to an operating system running on a virtual machine. For example, if Linux is running on a virtual machine, the guest kernel refers to the Linux operating system. The client kernel in FIG. 2 is a guest kernel.
As one embodiment, the obtaining information of the message signaled interrupt message configured by the client core for the memory mapped bus device includes:
obtaining address information of the message signal interruption message from a predefined address register; the address register is used for storing the address of the information of the message signal interrupt message;
and obtaining the information of the signal interruption message configured by the client kernel aiming at the memory mapping bus equipment according to the address information of the message signal interruption message.
In order to realize the interaction between the client kernel and the virtual machine monitor, an address register for storing the address of the information of the message signaled interruption message may be predefined, and after the client kernel stores the address of the information of the msi message in the address register, the virtual machine monitor may obtain the address information of the configured signaled interruption message from the address register, and then obtain the information of the signaled interruption message configured by the client kernel for the memory mapped bus device according to the address information.
As shown in fig. 1, in step S103, the configured information of the message signaled interrupt message is provided to the virtual machine hypervisor.
For example, the Virtual Machine manager in FIG. 2 is a KVM (Kernel-based Virtual Machine).
And providing the configured information of the message signaled interruption message to the virtual machine management program, namely completing the configuration process of the message signaled interruption.
In particular, the virtual machine monitor may obtain information of one configured message signaled interrupt message at a time, and may provide the information of the configured message signaled interrupt message to the virtual machine hypervisor.
In order to improve efficiency, the virtual machine monitor may further store the obtained information of the configured message signaled interruption message in a local cache, and provide the information of the plurality of configured message signaled interruption messages to the virtual machine manager together.
The providing the configured information of the message signal interrupt message to the virtual machine management program comprises:
storing the obtained information of the message signal interrupt message configured by the client kernel aiming at the memory mapping bus equipment in a local cache;
obtaining message signal interruption enabling identification information;
judging whether message signal interruption is enabled or not according to the message signal interruption enabling identification information, and providing the information of the message signal interruption message stored in the local cache to the virtual machine management program when the judgment result is yes;
and returning to the step of obtaining the information of the message signal interrupt message configured by the client kernel aiming at the memory mapped bus equipment when the judgment result is negative.
Fig. 3 is a flowchart for providing the configured information of the message signaled interrupt message to the virtual machine management program according to the first embodiment of the present application.
A second embodiment of the present application provides a method for implementing message signaled interruption, in which an execution subject is a client kernel, and is described below with reference to fig. 4.
As shown in fig. 4, in step 401, when the client core performs an initialization operation on the memory mapped bus device, a corresponding message signal interrupt message and an interrupt number are allocated to each queue according to the number of queues of the memory mapped bus device; the number of the queues is multiple.
The client kernel may refer to an operating system running on a virtual machine. For example, if Linux is running on a virtual machine, the guest kernel refers to the Linux operating system.
As an implementation manner, the second embodiment of the present application may further include:
and acquiring the queue number of the memory mapping bus equipment.
The obtaining the number of queues of the memory mapped bus device includes:
obtaining a memory space written by a virtual machine monitor through a virtual transmission protocol and used for storing the queue number of the memory mapping bus equipment;
reading the virtual memory mapped input/output from the memory space via a virtual transfer protocol.
As an implementation manner, before the step of allocating a corresponding message signal interrupt message and interrupt number to each queue according to the number of queues of the memory mapped bus device, the second embodiment of the present application may further include:
a processing framework in the client kernel for processing message signaled interrupts is accessed.
As shown in fig. 4, in step 402, a message signaled interrupt message is configured for each queue.
When the message signaled interrupt message is configured for each queue, the message signaled interrupt message may be configured in accordance with a register of a predefined msi.
As shown in fig. 4, in step 403, the information of the message signaled interrupt message configured for each queue is provided to the virtual machine monitor.
The providing information of the message signaled interruption message configured for each queue to the virtual machine monitor comprises:
judging whether the message signal interruption message and the interruption number are successfully distributed, if so, providing the information of the message signal interruption message configured aiming at each queue to the virtual machine monitor;
and if not, performing single interrupt configuration on the memory mapping bus equipment.
The providing information of the message signaled interruption message configured for each queue to the virtual machine monitor comprises:
and storing the address of the information of the message signaled interruption message configured for each queue into a predefined address register for storing the address of the information of the message signaled interruption message, so that the virtual machine monitor obtains the address of the information of the message signaled interruption message from the address register and obtains the information of the message signaled interruption message according to the address.
As shown in FIG. 4, in step 404, a message signal interrupt is enabled for the memory mapped bus device.
After the information of the message semaphore interrupt message configured for each queue is provided to the virtual machine monitor by the client core, the message semaphore interrupt can be enabled for the memory mapped bus device.
In particular, the message signal interrupt may be enabled according to a predefined register format.
For example, # define VIRTIO _ MMIO _ MSI _ CSR _ ENABLE 0x8000 is predefined
A 1 may be written to VIRTIO _ MMIO _ MSI _ CSR _ ENABLE, enabling the message signal to be interrupted.
By the method of the embodiment of the present application, a message signal interrupt processing mode of the memory mapped bus device is realized, the interrupt processing performance of the memory mapped bus device is improved, and the problems that the existing virtual input/output device has low interrupt performance and cannot support multiple queues accessed by virtual machines are solved.
Corresponding to the method for implementing message signal interruption provided in the first embodiment of the present application, a third embodiment of the present application also provides a device for implementing message signal interruption.
The device for realizing message signal interruption comprises:
the interrupt resource allocation unit is used for allocating interrupt resources according to the queue number of the memory mapping bus equipment and initializing the interrupt resources when the virtual machine monitor is initialized; the number of the queues is multiple;
an information obtaining unit of a message signal interrupt (msi) message, configured to obtain information of a message signal interrupt (msi) message configured by the client kernel for the memory mapped bus device;
and the information providing unit is used for providing the configured information of the message signal interrupt message to the virtual machine management program.
Optionally, the information obtaining unit of the message signal interrupt (msi) message is specifically configured to:
obtaining address information of the message signal interruption message from a predefined address register; the address register is used for storing the address of the information of the message signal interrupt message;
and obtaining the information of the signal interruption message configured by the client kernel aiming at the memory mapping bus equipment according to the address information of the message signal interruption message.
Optionally, the information providing unit is specifically configured to:
storing the obtained information of the message signal interrupt message configured by the client kernel aiming at the memory mapping bus equipment in a local cache;
obtaining message signal interruption enabling identification information;
judging whether message signal interruption is enabled or not according to the message signal interruption enabling identification information, and providing the information of the message signal interruption message stored in the local cache to the virtual machine management program when the judgment result is yes;
and returning to the step of obtaining the information of the message signal interrupt message configured by the client kernel aiming at the memory mapped bus equipment when the judgment result is negative.
It should be noted that, for the detailed description of the apparatus provided in the third embodiment of the present application, reference may be made to the related description of the first embodiment of the present application, and details are not described here again.
Corresponding to the method for implementing message signal interruption provided in the first embodiment of the present application, a fourth embodiment of the present application also provides an electronic device.
The electronic device includes:
a processor; and
a memory for storing a program for implementing the method for message signaled interruption, the device being powered on and executing the program for implementing the method for message signaled interruption by the processor, the following steps being performed:
the virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus equipment and initializes the interrupt resources when initializing; the number of the queues is multiple;
obtaining information of a message signal interrupt (msi) message configured by a client core for the memory mapped bus device;
and providing the configured information of the message signal interrupt message to the virtual machine management program.
Optionally, the obtaining information of the message signal interrupt message configured by the client kernel for the memory mapped bus device includes:
obtaining address information of the message signal interruption message from a predefined address register; the address register is used for storing the address of the information of the message signal interrupt message;
and obtaining the information of the signal interruption message configured by the client kernel aiming at the memory mapping bus equipment according to the address information of the message signal interruption message.
Optionally, the providing the configured information of the message signal interrupt message to the virtual machine management program includes:
storing the obtained information of the message signal interrupt message configured by the client kernel aiming at the memory mapping bus equipment in a local cache;
obtaining message signal interruption enabling identification information;
and judging whether the message signal interruption is enabled or not according to the message signal interruption enabling identification information, and providing the information of the message signal interruption message stored in the local cache to the virtual machine management program when the judgment result is yes.
Optionally, the electronic device further performs the following steps:
and returning to the step of obtaining the information of the message signal interrupt message configured by the client kernel aiming at the memory mapped bus equipment when the judgment result is negative.
It should be noted that, for the detailed description of the electronic device provided in the fourth embodiment of the present application, reference may be made to the related description of the first embodiment of the present application, and details are not repeated here.
In correspondence with the method for implementing message signaled interruption provided in the first embodiment of the present application, a fifth embodiment of the present application further provides a storage device, storing a program for implementing the method for implementing message signaled interruption, where the program is executed by a processor and executes the following steps:
the virtual machine monitor allocates interrupt resources according to the queue number of the memory mapping bus equipment and initializes the interrupt resources when initializing; the number of the queues is multiple;
obtaining information of a message signal interrupt (msi) message configured by a client core for the memory mapped bus device;
and providing the configured information of the message signal interrupt message to the virtual machine management program.
It should be noted that, for the detailed description of the storage device provided in the fifth embodiment of the present application, reference may be made to the related description of the first embodiment of the present application, and details are not described here again.
Corresponding to the method for implementing message signal interruption provided in the second embodiment of the present application, a sixth embodiment of the present application also provides a device for implementing message signal interruption. The device comprises:
the interrupt message distribution unit is used for distributing corresponding message signal interrupt messages and interrupt numbers to each queue according to the queue number of the memory mapping bus equipment when the memory mapping bus equipment is checked in the client to carry out initialization operation; the number of the queues is multiple;
an interrupt message configuration unit, configured to configure a message signal interrupt message for each queue;
a configuration information providing unit for providing information of the message signal interrupt message configured for each queue to the virtual machine monitor;
an enable message signal interrupt unit to enable message signal interrupts for the memory mapped bus device.
Optionally, the configuration information providing unit is specifically configured to:
judging whether the message signal interruption message and the interruption number are successfully distributed, if so, providing the information of the message signal interruption message configured aiming at each queue to the virtual machine monitor;
and if not, performing single interrupt configuration on the memory mapping bus equipment.
Optionally, the configuration information providing unit is specifically configured to:
and storing the address of the information of the message signaled interruption message configured for each queue into a predefined address register for storing the address of the information of the message signaled interruption message, so that the virtual machine monitor obtains the address of the information of the message signaled interruption message from the address register and obtains the information of the message signaled interruption message according to the address.
Optionally, the apparatus further comprises:
and the queue number obtaining unit is used for obtaining the queue number of the memory mapped bus equipment.
Optionally, the queue number obtaining unit is specifically configured to:
obtaining a memory space written by a virtual machine monitor through a virtual transmission protocol and used for storing the queue number of the memory mapping bus equipment;
reading the virtual memory mapped input/output from the memory space via a virtual transfer protocol.
It should be noted that, for the detailed description of the apparatus provided in the sixth embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not described here again.
Corresponding to the method for implementing message signal interruption provided in the second embodiment of the present application, a seventh embodiment of the present application further provides an electronic device, including:
a processor; and
a memory for storing a program for implementing the method for message signaled interruption, the device being powered on and executing the program for implementing the method for message signaled interruption by the processor, the following steps being performed:
when a client checks memory mapping bus equipment to carry out initialization operation, distributing corresponding message signal interrupt messages and interrupt numbers for each queue according to the queue number of the memory mapping bus equipment; the number of the queues is multiple;
configuring a message signaled interruption message for each queue;
providing information of the message signal interrupt message configured for each queue to the virtual machine monitor;
an information signal interrupt is enabled for the memory mapped bus device.
Optionally, the providing, to the virtual machine monitor, information of the message signaled interrupt message configured for each queue includes:
judging whether the message signal interruption message and the interruption number are successfully distributed, if so, providing the information of the message signal interruption message configured aiming at each queue to the virtual machine monitor;
and if not, performing single interrupt configuration on the memory mapping bus equipment.
Optionally, the providing, to the virtual machine monitor, information of the message signaled interrupt message configured for each queue includes:
and storing the address of the information of the message signaled interruption message configured for each queue into a predefined address register for storing the address of the information of the message signaled interruption message, so that the virtual machine monitor obtains the address of the information of the message signaled interruption message from the address register and obtains the information of the message signaled interruption message according to the address.
Optionally, the electronic device further performs the following steps:
and acquiring the queue number of the memory mapping bus equipment.
Optionally, the obtaining the number of queues of the memory mapped bus device includes:
obtaining a memory space written by a virtual machine monitor through a virtual transmission protocol and used for storing the queue number of the memory mapping bus equipment;
reading the virtual memory mapped input/output from the memory space via a virtual transfer protocol.
It should be noted that, for the detailed description of the electronic device provided in the seventh embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not described here again.
In correspondence with the method for implementing message signaled interruption provided in the second embodiment of the present application, an eighth embodiment of the present application further provides a storage device, storing a program for implementing the method for implementing message signaled interruption, where the program is executed by a processor and executes the following steps:
when a client checks memory mapping bus equipment to carry out initialization operation, distributing corresponding message signal interrupt messages and interrupt numbers for each queue according to the queue number of the memory mapping bus equipment; the number of the queues is multiple;
configuring a message signaled interruption message for each queue;
providing information of the message signal interrupt message configured for each queue to the virtual machine monitor;
an information signal interrupt is enabled for the memory mapped bus device.
It should be noted that, for the detailed description of the storage device provided in the eighth embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not described here again.
A ninth embodiment of the present application provides a serverless processing method for event processing, including:
receiving event information triggered by a user;
calling a function to calculate and process the event information to obtain a processing result of the event information, wherein the function calculation is realized by adopting the methods provided by the first embodiment and the second embodiment;
and returning the processing result to the user.
This is explained in detail below with reference to fig. 5. In fig. 5, after a user uploads various files including pictures, videos, texts, and the like to an OSS (object storage) through a mobile phone terminal, a Web application, or a PC tool, a PutObject event of the OSS may trigger function computation to process the uploaded files.
The typical scenario of fig. 5 includes that after a user uploads a video file to an OSS, a trigger function calculates to acquire Meta information of an object and transmits the Meta information to a core algorithm library, and the core algorithm library pushes a corresponding video file to a CDN source station according to an algorithm to achieve processing of specific video hot loading. In another scenario, after the video file is uploaded to the OSS, the function is triggered to calculate and synchronize to perform multi-turn-rate processing, and the processed video file is stored in the OSS to complete lightweight data processing.
The function calculation in fig. 5 is implemented by using a serverless calculation using the method provided in the first embodiment of the present application.
A tenth embodiment of the present application provides a server-less processing method using elastic capacity expansion, including:
receiving digital content information sent by a user;
calling function calculation to perform elastic capacity expansion processing on the digital content information to obtain a mixed flow result of the digital content information, wherein the function calculation is realized by adopting the methods provided by the first embodiment and the second embodiment;
and sending the mixed flow result to a terminal user. This is explained in detail below with reference to fig. 6. In fig. 6, the client side of the live broadcast room collects and sends the audio and video of the main broadcast audience and the connected-to-live audience to the function calculation for mixed flow service, the function calculation collects the data and sends the data to the mixed flow service for synthesis, the synthesized picture video stream is pushed to the CDN, the terminal audience pulls the live broadcast stream in real time, and the mixed flow synthesized picture can be seen in real time.
In a video live broadcast application scene, a scene video live broadcast multi-person live broadcast is available, a main broadcast can simultaneously carry out live broadcast with a plurality of jobs, a plurality of audiences or friend pictures are accessed, the pictures are synthesized into one scene, and more audiences watching the live broadcast can watch the pictures.
The function calculation in fig. 6 is implemented by using a method provided in the first embodiment of the present application and using serverless calculation.
The function calculation is used as a real-time audio and video forwarding cluster accessed by the connected wheat audience and the anchor, and when the concurrent transmission comes, the function calculation automatically expands a plurality of execution environments to process real-time data streams; when the peak period of traffic has elapsed, resource usage is gracefully curtailed.
An eleventh embodiment of the present application provides a server-less processing method for internet of things data, including:
receiving Internet of things data sent by equipment;
calling a function to calculate and process the data of the internet of things to obtain a processing result of the event information, wherein the function calculation is realized by adopting the methods provided by the first embodiment and the second embodiment of the application;
and returning the processing result to the user.
This is explained in detail below with reference to fig. 7. In fig. 7, the content can be divided into 2 parts:
web application: simulating a social content updating and data processing flow, forwarding a request to function calculation for processing by a Web user through an API gateway, updating the processed content into a database by the function calculation, updating an index, and providing a search engine pushed by the index updating to an external client for retrieval by the other function calculation to finish the whole data closed-loop processing.
The intelligent equipment: and pushing the equipment state to function calculation processing through an IoT (Internet of things) gateway, and pushing the message to a mobile terminal for state confirmation and management through an API (application program interface) interface by the function calculation through a mobile push service.
The function calculation in fig. 7 is implemented by using a serverless calculation using the methods provided in the first and second embodiments of the present application.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), memory mapped input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:防止虚拟机恶意回滚的方法、装置及电子设备