US12498957B2 - Data processing method and apparatus, and readable medium and computing device - Google Patents
Data processing method and apparatus, and readable medium and computing deviceInfo
- Publication number
- US12498957B2 US12498957B2 US18/886,790 US202418886790A US12498957B2 US 12498957 B2 US12498957 B2 US 12498957B2 US 202418886790 A US202418886790 A US 202418886790A US 12498957 B2 US12498957 B2 US 12498957B2
- Authority
- US
- United States
- Prior art keywords
- target
- shared memory
- data
- physical processor
- write request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4812—Task transfer initiation or dispatching by interrupt, e.g. masked
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45575—Starting, stopping, suspending or resuming virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45579—I/O management, e.g. providing access to device drivers or storage
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45583—Memory management, e.g. access or allocation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/543—Local
Definitions
- the present disclosure relates to the field of virtual machine technologies, and in particular, to a data processing method, apparatus, readable medium, computing device, computer program product, and computer program.
- a data read/write device (such as a network adapter/disk) of a virtual machine is mostly a half-virtual device implemented based on a virtio protocol, and such a device may be referred to as a virtio device or a virtual device for short.
- a virtual device generally notifies a corresponding back-end service program to process a data read/write request, and in the process, a plurality of VM Exits are generally generated, thereby affecting performance of the virtual device.
- the present disclosure provides a data processing apparatus implemented at a computing device, a virtual machine is executed at the computing device.
- the data processing apparatus comprises:
- the present disclosure provides a computer readable storage medium having a computer program stored thereon.
- the computer program is executed by at least one physical processor to run a virtual machine and enable the virtual machine to implement steps of the method according to the first aspect.
- the present disclosure provides a computing device.
- the computing device comprises:
- the present disclosure provides a computer program product.
- the computer program product has program code stored thereon, instructions comprised in the program codes, when executed by at least one physical processor to run a virtual machine, and enable the virtual machine to implementing steps of the method according to the first aspect.
- the disclosure provides a computer program.
- the computer program is executed by at least one physical processor to run a virtual machine and enable the virtual machine to implement steps of the method according to the first aspect.
- FIG. 1 is an architecture diagram of a computing device provided according to an example embodiment
- FIG. 2 is a schematic flowchart of a data processing method provided according to an example embodiment
- FIG. 3 is a schematic flowchart of a specific implementation of step S 210 provided according to an example embodiment
- FIG. 4 is a schematic diagram of a data structure of data in a shared memory provided according to an example embodiment
- FIG. 5 is a schematic diagram of module connections of a data processing apparatus provided according to an example embodiment
- FIG. 6 is a schematic structural diagram of a computing device provided according to an example embodiment.
- a Virtqueue of the virtual device after a virtual device receives a data read/write request, a Virtqueue of the virtual device notifies a back-end service program by a Kick function, the Kick function writing a register of a device configuration space.
- the Kick function writing a register of a device configuration space may exit from a client mode to a host mode many times, which results in a plurality of VM Exits, thereby increasing a delay in processing a data read/write request, and further affecting performance of the virtual device.
- the data read/write request may also be referred to as an I/O (Input/Output) request.
- embodiments of the present disclosure provide a data processing method, apparatus, readable medium, computing device, computer program product and computer program.
- a target virtual device In response to receiving a data read/write request, a target virtual device first write, into a shared memory, target data comprised in the data read/write request, the target virtual device being a virtual device in the virtual machine; then sends an interrupt instruction to a target physical processor in the computing device through a pass-through register corresponding to the target virtual device, to enable the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, and informs, based on the target data, a corresponding back-end service program to process the data read/write request.
- the original manner of the virtual device writing the device configuration space is changed to sending an interrupt to the physical processor, so that the virtual machine does not need to exit the host mode when performing a inform, thereby reducing the VM Exit generated in the process of the virtual device writing the device configuration space, reducing a delay of processing a data read/write request, and improving the processing performance of the virtual device.
- FIG. 1 illustrates a schematic architecture diagram of a computing device provided according to an embodiment of the present disclosure.
- a host operating system (Host OS) is executed in the computing device, and a virtual machine is executed in the host operating system.
- the virtual machine includes a plurality of virtual devices (a virtual device 1 , a virtual device 2 , . . . , and a virtual device N).
- the computing device includes at least one physical processor.
- the computing device also applies for a shared memory capable that both the physical processor and the virtual machine can operate.
- the virtual machine further includes a virtual processor (not shown), and each virtual processor corresponds to a pass-through register, respectively.
- the virtual device can send the interrupt to the corresponding physical processor through the corresponding pass-through register.
- FIG. 2 is a schematic flowchart of a data processing method provided according to an example embodiment.
- the data processing method provided in an embodiment of the present disclosure may be executed by a computing device, and may specifically be executed by a data processing device.
- the device may be implemented by software and/or hardware and is configured in the computing device.
- a virtual machine is executed in the computing device.
- the data processing method according to an embodiment of the present disclosure may include the following steps.
- application programs may be installed on a virtual machine, and various data read/write requests may be generated in executing processes of the application programs, for example, a request for reading/writing a block device, a request for sending or receiving a data packet by using a network adapter device, and the like. Then, a data read/write request for a certain virtual device is received by the corresponding virtual device, and accordingly, the corresponding virtual device is the target virtual device.
- an application program in the virtual machine generates a request for reading data of the block device 1 , and in this case, the block device 1 is the target virtual device.
- each data read/write request includes data of a plurality of fields, and data of some specific fields in the data read/write request needs to be acquired by a subsequent target physical processor; therefore, the data of the specific fields may be understood as target data.
- the target data may include a read/write address, an address length, and device queue information.
- an address of the shared memory may be acquired by reading an MSR (Model-Specific Register), and the address is mapped to a middle of a kernel address of the virtual machine, so that the virtual device may access the shared memory.
- MSR Model-Specific Register
- a virtual machine may comprise a plurality of virtual processors, and each virtual processor may correspond to one pass-through register.
- each virtual processor may correspond to one pass-through register.
- different application programs may be executed on different virtual processors, and therefore, the pass-through register corresponding to the target virtual device may be understood as the pass-through register of the virtual processor executing the corresponding application program that generates the data read/write request.
- an application program 1 in a virtual machine generates a request for reading data of a block device 1 , the application program 1 is executed on a virtual processor 2 , and a pass-through register corresponding to the virtual processor 2 is a pass-through register 2 , and at this time, the block device 1 may operate the pass-through register 2 to send an interrupt instruction to a target physical processor in the computing device.
- the target physical processor is a predetermined physical processor for receiving an interrupt instruction sent through the pass-through register. It may be any one of a plurality of physical processors in the computing device, and may be preassigned during virtual machine creation as required. Then, the interrupt instruction of pass-through register operated by the virtual device is received by the target physical processor.
- the target physical processor may process the interrupt instruction by itself, that is, the target physical processor may read the target data from the shared memory according to the interrupt instruction, and further inform a corresponding back-end service program to process the data read/write request according to the target data.
- the target virtual device After receiving the data read/write request, the target virtual device may be stored in the virtual device hash table (scatterlist), and then the virtqueue of the target virtual device may provide add_buf to map data in the hash table to a front-end and back-end data shared area Vring, so that after receiving the informing, the back-end service program may acquire the data read/write request from the front-end and back-end shared area Fring, and perform processing.
- the virtual device hash table scatterlist
- the virtqueue of the target virtual device may provide add_buf to map data in the hash table to a front-end and back-end data shared area Vring, so that after receiving the informing, the back-end service program may acquire the data read/write request from the front-end and back-end shared area Fring, and perform processing.
- the target physical processor may not only execute the interrupt instruction by itself, but also send the interrupt instruction to another physical processor for execution, which is determined according to a current actual working load of each physical processor.
- a target virtual device in response to receiving a data read/write request, a target virtual device first write, into a shared memory, target data comprised in the data read/write request, the target virtual device being a virtual device in the virtual machine; then sends an interrupt instruction to a target physical processor in the computing device through a pass-through register corresponding to the target virtual device, to enable the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, and informs, based on the target data, a corresponding back-end service program to process the data read/write request.
- the original manner of the virtual device writing the device configuration space is changed to sending an interrupt to the physical processor, so that the virtual machine does not need to exit the host mode when performing a inform, thereby reducing the VM Exit generated in the process of the virtual device writing the device configuration space, reducing a delay of processing a data read/write request, and improving the processing performance of the virtual device.
- the virtual machine may be created as follows.
- a local advanced programmable interrupt controller In a creation process of a virtual machine, configuration of a local advanced programmable interrupt controller (LAPIC) is changed to x2apic.
- LAPIC local advanced programmable interrupt controller
- VMCS Virtual Machine Control Structure
- ICR interrupt command register
- a local advanced programmable interrupt controller For normal IPI (Interrupt-Procector Interrupt) interruption of the virtual machine, the interruption is implemented through a half-virtual PV_IPI (Para-Virtualization_IPI).
- the pass-through register is obtained by configuring the interrupt command register of the local advanced programmable interrupt controller to the pass-through mode during the creation of the virtual machine.
- the pass-through register may be a pass-through interrupt command register.
- the shared memory comprises a physical processor identifier.
- the method of the embodiments of the present disclosure may further comprise the following steps:
- a target virtual device may accurately determine a target physical processor, and send an interrupt instruction to the target virtual device.
- the target virtual device has a process of accessing the shared memory after receiving the data read/write request
- the target physical processor identifier may further be stored in the shared memory, thereby reducing access of the target virtual device among a plurality of memory areas.
- the shared memory comprises a content item for recording the target data.
- writing, into the shared memory, target data comprised in the data read/write request comprises the following steps.
- S 221 determining null items in the shared memory, a null item being a content item with a null parameter value in the shared memory.
- the shared memory may include a plurality of content items for recording parameter values, which are used for storing respective target data.
- a certain content item does not record the target data, that is, when the parameter value is null, the content item is a null item.
- the target virtual device may write the target data included in the data read/write request into any null entry in the shared memory.
- the target data comprises a read/write address, an address length and device queue information
- each content item may record three parameters of the read/write address, the address length and the device queue information in an array.
- FIG. 4 illustrates a schematic diagram of a data structure of data in a shared memory according to the foregoing embodiments.
- the shared memory comprises a target physical processor identifier and 170 content items for recording target data, and a reserved 128 Byte of space, where 170 content items for recording the target data are, for example, entry0, entry1, . . . , entry 169 in FIG. 4 .
- Each content item is used to record a read/write address, an address length, and device queue information.
- the interrupt instruction is further used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, determine a target physical device according to the target data and a predetermined index table, and inform a back-end service program corresponding to the target physical device to process the data read/write request.
- an API Application Programming Interface
- a physical device that is, parameters of target data corresponding to a PCI (Peripheral Component Interconnect) device
- PCI Peripheral Component Interconnect
- the target physical processor may acquire the target data from the shared memory according to the interrupt instruction, and then search the predetermined index table for the item matching the target data, thereby determining the corresponding target physical device, and further inform, based on the target data, a corresponding back-end service program to process the data read/write request.
- the target physical processor traverses the content item in the shared memory.
- Each non-null content item may match and find a target device according to bus_idx (idx being FAST_MMIO (Memory Mping I/O), MMIO and PIO (Port I/O) in sequence).
- the callback function of the target device is then executed, writing a number 1 in the callback function to the eventfd in the device structure.
- the service program in the user space may receive a notification, thereby completing the process of inform, based on the target data, a corresponding back-end service program to process the data read/write request.
- the target physical processor obtains, according to the interrupt instruction, target data from the shared memory, where the target data may be target data corresponding to a plurality of content items, respectively.
- the target data may be target data corresponding to a plurality of content items, respectively.
- a plurality of target physical devices may be determined simultaneously, and at the same time, a back-end service program corresponding to the plurality of target physical devices may be informed to process the data read/write request. That is to say, in a process of executing an interrupt instruction, target data in all non-null values in the shared memory is read.
- the target data in the shared memory is no longer used.
- the interrupt instruction is further used by the target physical processor to delete the target data from the shared memory according to the interrupt instruction after processing the data read/write request.
- the target data is deleted from the shared memory, so that each entry in the shared memory is null, so as to facilitate repeated use of the shared memory, so that when a subsequent target virtual device receives a data read/write request, the target data included in the data read/write request may be written into the shared memory again.
- FIG. 5 is a schematic diagram of module connections of a data processing apparatus according to an example embodiment. As shown in FIG. 5 , an embodiment of the present disclosure provides a data processing apparatus.
- the apparatus 500 is implemented at a computing device.
- a virtual machine is executed at the computing device.
- the apparatus 500 may include:
- the shared memory includes a physical processor identifier
- the apparatus 500 includes:
- the shared memory includes a content item for recording the target data
- the write module 510 includes:
- null item determination submodule configured to determining null items in the shared memory, a null item being a content item with a null parameter value in the shared memory; a write submodule, configured to write the target data into any one of the null items.
- the target data includes a read/write address, an address length, and device queue information.
- the pass-through register is obtained by configuring an interrupt command register of a local advanced programmable interrupt controller to a pass-through mode in a process of creating the virtual machine.
- the interrupt instruction is further used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, determine a target physical device according to the target data and a predetermined index table, and inform a back-end service program corresponding to the target physical device to process the data read/write request.
- the interrupt instruction is further used by the target physical processor to delete the target data from the shared memory according to the interrupt instruction after processing the data read/write request.
- FIG. 6 illustrates a block diagram of a computing device 600 suitable for use in implementing embodiments of the present disclosure.
- the terminal apparatus in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a PDA (Personal Digital Assistant), a PAD (tablet computer), a vehicle-mounted terminal such as a vehicle-mounted navigation terminal, and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like.
- the computing device illustrated in FIG. 6 is merely one example and should not impose any limitation on the scope of functionality and use of embodiments of the present disclosure.
- computing device 600 may include at least one physical processor 601 that may perform any of a variety of suitable actions and processes depending on a program stored in read only memory (ROM) 602 or a program loaded from memory 608 into random access memory (RAM) 603 .
- ROM read only memory
- RAM random access memory
- a variety of programs and data necessary for the operation of the computing device 600 are also stored in the RAM 603 .
- the physical processor 601 , the ROM 602 , and the RAM 603 are connected to each other via a bus 604 .
- An input/output (I/O) interface 605 is also connected to the bus 604 .
- the following devices may be connected to the I/O interface 605 : input devices 606 including, for example, touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, or the like; a memory 608 including, for example, a magnetic tape, a hard disk, or the like; and a communication device 609 .
- Communication device 609 may allow computing device 600 to communicate wirelessly or wired with other devices to exchange data. While FIG. 6 illustrates a computing device 600 having a variety of means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
- embodiments of the disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program comprising program code for performing the method as shown in the flowchart.
- the computer program may be downloaded and installed from the network via the communication device 609 , or installed from the memory 608 , or installed from the ROM 602 .
- the computer program is executed by the physical processor 601 , the described functions defined in the method of embodiments of the present disclosure are executed.
- the computer readable medium in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination thereof.
- a computer-readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
- the computer readable medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
- a computer readable medium may be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
- a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof.
- a computer readable signal medium may also be any computer readable medium that is not a computer readable medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
- Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including, but not limited to, wireline, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
- a computing device can communicate using any currently known or
- LAN local area network
- WAN wide area network
- Internet internetwork
- peer-to-peer network e. g., an ad hoc peer-to-peer network
- the computer readable medium may be included in the computing device, or may exist separately and not be installed in the computing device.
- the computer readable medium bears one or more programs.
- the computing device When the one or more programs are executed by the computing device, the computing device is enabled to: obtain a current process priority of a host application; adjusting a process priority of a target process of a host application corresponding to the host application to be consistent with the current process priority, wherein the target process creates, for the host application, a process necessary for running a virtual running environment of the host application; A dependency relationship exists between the process priority of the host application and the process priority of the target process, and the dependency relationship is used to enable the process priority of the target process to change following a change in the process priority of the host application.
- Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including, but not limited to, an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the ‘C’ programming language or similar programming languages.
- the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
- the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
- LAN local area network
- WAN wide area network
- Internet Service Provider for example, AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
- each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s).
- the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
- the modules involved in the embodiments of the present disclosure may be implemented by software or by hardware.
- the name of a module does not constitute a limitation to the module itself in a certain case.
- FPGAs Field-programmable Gate Arrays
- ASICs Program-specific Integrated Circuits
- ASSPs Program-specific Standard Products
- SOCs System-on-a-chip systems
- CPLDs Complex Programmable Logic Devices
- a machine-readable medium may be tangible media that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
- the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- the machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
- machine-readable media would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
- RAM random access memory
- ROM read-only memory
- EPROM or Flash memory erasable programmable read-only memory
- CD-ROM compact disc read-only memory
- magnetic storage device or any suitable combination of the foregoing.
- example 1 provides a data processing method implemented at a computing device, and a virtual machine is executed in the computing device.
- the method comprises:
- example 2 provides the method of example 1, wherein the shared memory comprises a physical processor identifier, and the method further comprises:
- example 3 provides the method of example 1 or 2, the shared memory comprises a content item for recording the target data, and writing, into the shared memory, target data comprised in the data read/write request comprises:
- example 4 provides the method of any of examples 1 to 3, the target data comprises a read/write address, an address length, and device queue information.
- example 5 provides the method of any of examples 1 to 4, wherein the pass-through register is obtained by configuring an interrupt command register of a local advanced programmable interrupt controller to a pass-through mode in a process of creating the virtual machine.
- example 6 provides the method of any of examples 1 to 5, the interrupt instruction is further used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, determine a target physical device according to the target data and a predetermined index table, and inform a back-end service program corresponding to the target physical device to process the data read/write request.
- example 7 provides the method of any of examples 1 to 6, wherein the interrupt instruction is further used by the target physical processor to delete the target data from the shared memory according to the interrupt instruction after processing the data read/write request.
- example 8 provides a data processing apparatus implemented at a computing device, and a virtual machine is executed at the computing device.
- the apparatus comprises:
- example 9 provides the apparatus of example 8, the shared memory comprises a physical processor identifier, the apparatus comprises:
- example 10 provides the apparatus of example 8 or 9, wherein the shared memory comprises a content item for recording the target data, and the write module comprises:
- example 11 provides the apparatus of any of examples 8 to 10, wherein the target data includes a read/write address, an address length, and device queue information.
- example 12 provides the apparatus of any of examples 8 to 11, the pass-through register is obtained by configuring an interrupt command register of a local advanced programmable interrupt controller to a pass-through mode in a process of creating the virtual machine.
- example 13 provides the apparatus of any of examples 8 to 12, the interrupt instruction is further used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, determine a target physical device according to the target data and a predetermined index table, and inform a back-end service program corresponding to the target physical device to process the data read/write request.
- example 14 provides the apparatus of any of examples 8 to 13, wherein the interrupt instruction is further used by the target physical processor to delete the target data from the shared memory according to the interrupt instruction after processing the data read/write request.
- example 15 provides having a computer program stored thereon, the computer program being executed by at least one physical processor to run a virtual machine and enable the virtual machine to implement steps of the method according to any of examples 1 to 7.
- example 16 provides a computing device, comprising:
- example 17 provides a computer program product having program code stored thereon, instructions comprised in the program codes, when executed by at least one physical processor to run a virtual machine, and enable the virtual machine to implementing steps of the method according to any of examples 1 to 7.
- example 18 provides being executed by at least one physical processor to run a virtual machine and enable the virtual machine to implement steps of the method according to any of examples 1 to 7.
- a target virtual device in response to receiving a data read/write request, a target virtual device first write, into a shared memory, target data comprised in the data read/write request, the target virtual device being a virtual device in the virtual machine; then sends an interrupt instruction to a target physical processor in the computing device through a pass-through register corresponding to the target virtual device, to enable the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, and informs, based on the target data, a corresponding back-end service program to process the data read/write request.
- the original manner of the virtual device writing the device configuration space is changed to sending an interrupt to the physical processor, so that the virtual machine does not need to exit the host mode when performing a inform, thereby reducing the IM Exit generated in the process of the virtual device writing the device configuration space, reducing a delay of processing a data read/write request, and improving the processing performance of the virtual device.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
-
- in response to a target virtual device receiving a data read/write request, writing, into a shared memory, target data comprised in the data read/write request, the target virtual device being a virtual device in the virtual machine;
- sending an interrupt instruction to a target physical processor in the computing device through a pass-through register corresponding to the target virtual device, the interrupt instruction being used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, and inform, based on the target data, a corresponding back-end service program to process the data read/write request.
-
- a write module configured to, in response to a target virtual device receiving a data read/write request, write, into a shared memory, target data comprised in the data read/write request, the target virtual device being a virtual device in the virtual machine;
- a sending module configured to send an interrupt instruction to a target physical processor in the computing device through a pass-through register corresponding to the target virtual device, the interrupt instruction being used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, and inform, according to the target data, a corresponding back-end service program to process the data read/write request.
-
- a memory having at least one computer program stored thereon;
- at least one physical processor configured to execute the at least one computer program in the memory to run a virtual machine and enable the virtual machine to implement steps of the method according to the first aspect.
-
- acquiring the physical processor identifier from the shared memory determining the target physical processor based on the physical processor identifier.
-
- a write module 510, configured to, in response to a target virtual device receiving a data read/write request, write, into a shared memory, target data comprised in the data read/write request, the target virtual device being a virtual device in the virtual machine;
- a sending module 520, configured to send an interrupt instruction to a target physical processor in the computing device through a pass-through register corresponding to the target virtual device, the interrupt instruction being used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, and inform, according to the target data, a corresponding back-end service program to process the data read/write request.
-
- a physical processor identifier acquiring module, configured to acquire the physical processor identifier from the shared memory;
- a target physical processor determination module, configured to determine the target physical processor based on the physical processor identifier.
-
- in response to a target virtual device receiving a data read/write request, writing, into a shared memory, target data comprised in the data read/write request, the target virtual device being a virtual device in the virtual machine;
- sending an interrupt instruction to a target physical processor in the computing device through a pass-through register corresponding to the target virtual device, the interrupt instruction being used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, and inform, based on the target data, a corresponding back-end service program to process the data read/write request.
-
- acquiring the physical processor identifier from the shared memory; determining the target physical processor based on the physical processor identifier.
-
- determining null items in the shared memory, a null item being a content item with a null parameter value in the shared memory;
- writing the target data into any one of the null items.
-
- a write module configured to, in response to a target virtual device receiving a data read/write request, write, into a shared memory, target data comprised in the data read/write request, the target virtual device being a virtual device in the virtual machine;
- a sending module configured to send an interrupt instruction to a target physical processor in the computing device through a pass-through register corresponding to the target virtual device, the interrupt instruction being used by the target physical processor to acquire the target data from the shared memory according to the interrupt instruction, and inform, according to the target data, a corresponding back-end service program to process the data read/write request.
-
- a physical processor identifier acquiring module, configured to acquire the physical processor identifier from the shared memory;
- a target physical processor determination module, configured to determine the target physical processor based on the physical processor identifier.
-
- a null item determination submodule, configured to determining null items in the shared memory, a null item being a content item with a null parameter value in the shared memory;
- a write submodule, configured to write the target data into any one of the null items.
-
- a memory device having at least one computer program stored thereon;
- at least one physical processor configured to execute the at least one computer program in the memory to run a virtual machine and enable the virtual machine to implement steps of the method according to any of examples 1 to 7.
Claims (17)
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210265459.9 | 2022-03-17 | ||
| CN202210265459.9A CN114625480A (en) | 2022-03-17 | 2022-03-17 | Data processing method, device, readable medium and computing equipment |
| PCT/CN2023/081161 WO2023174220A1 (en) | 2022-03-17 | 2023-03-13 | Data processing method and apparatus, and readable medium and computing device |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/081161 Continuation WO2023174220A1 (en) | 2022-03-17 | 2023-03-13 | Data processing method and apparatus, and readable medium and computing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| US20250004819A1 US20250004819A1 (en) | 2025-01-02 |
| US12498957B2 true US12498957B2 (en) | 2025-12-16 |
Family
ID=81901272
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/886,790 Active US12498957B2 (en) | 2022-03-17 | 2024-09-16 | Data processing method and apparatus, and readable medium and computing device |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US12498957B2 (en) |
| EP (1) | EP4481566A4 (en) |
| CN (1) | CN114625480A (en) |
| WO (1) | WO2023174220A1 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114625480A (en) * | 2022-03-17 | 2022-06-14 | 北京有竹居网络技术有限公司 | Data processing method, device, readable medium and computing equipment |
| CN116225345B (en) * | 2023-05-08 | 2023-08-11 | 珠海妙存科技有限公司 | Data storage method, controller and readable storage medium of eMMC |
Citations (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080294808A1 (en) * | 2007-05-23 | 2008-11-27 | Vmware, Inc. | Direct access to a hardware device for virtual machines of a virtualized computer system |
| US20090119087A1 (en) | 2007-11-06 | 2009-05-07 | Vmware, Inc. | Pass-through and emulation in a virtual machine environment |
| US20090287886A1 (en) * | 2008-05-13 | 2009-11-19 | International Business Machines Corporation | Virtual computing memory stacking |
| US20120167082A1 (en) * | 2010-12-23 | 2012-06-28 | Sanjay Kumar | Direct sharing of smart devices through virtualization |
| US20150163248A1 (en) * | 2012-04-13 | 2015-06-11 | Cisco Technology, Inc. | Automatic curation and modification of virtualized computer programs |
| CN106462451A (en) | 2014-06-20 | 2017-02-22 | 华为技术有限公司 | Interruption handling method and relevant device of virtual platform |
| CN108196945A (en) | 2016-12-08 | 2018-06-22 | 阿里巴巴集团控股有限公司 | A kind of communication method between cores, device and virtual equipment |
| CN108369604A (en) | 2017-12-28 | 2018-08-03 | 深圳前海达闼云端智能科技有限公司 | A kind of method, apparatus and electronic equipment of multiple operating system shared-file system |
| US20180321879A1 (en) * | 2015-12-31 | 2018-11-08 | Huawei Technologies Co., Ltd. | Method and Apparatus for Processing Read/Write Request in Physical Machine |
| CN112463307A (en) | 2020-12-11 | 2021-03-09 | 深信服科技股份有限公司 | Data transmission method, device, equipment and readable storage medium |
| US20210089471A1 (en) * | 2018-06-12 | 2021-03-25 | Huawei Technologies Co., Ltd. | Virtualized Cache Implementation Method And Physical Machine |
| US20210096901A1 (en) * | 2019-10-01 | 2021-04-01 | Qualcomm Incorporated | Shared memory buffers to submit an interrupt request worklist to a back end virtual machine |
| CN113110916A (en) | 2021-04-22 | 2021-07-13 | 深信服科技股份有限公司 | Virtual machine data reading and writing method, device, equipment and medium |
| CN113778611A (en) | 2021-07-06 | 2021-12-10 | 锐捷网络(苏州)有限公司 | Data transmission method, device, system and storage medium |
| CN113867993A (en) | 2021-12-03 | 2021-12-31 | 维塔科技(北京)有限公司 | Virtualized RDMA method, system, storage medium and electronic device |
| WO2022002106A1 (en) | 2020-07-01 | 2022-01-06 | 中兴通讯股份有限公司 | Interrupt processing method, interrupt manager, electronic device and computer-readable storage medium |
| CN114625480A (en) | 2022-03-17 | 2022-06-14 | 北京有竹居网络技术有限公司 | Data processing method, device, readable medium and computing equipment |
| US20220365802A1 (en) * | 2021-05-17 | 2022-11-17 | Intel Corporation | Virtualization of interprocessor interrupts |
| US20220365729A1 (en) * | 2019-01-31 | 2022-11-17 | Intel Corporation | Shared memory mechanism to support fast transport of sq/cq pair communication between ssd device driver in virtualization environment and physical ssd |
| US20230418640A1 (en) * | 2013-11-26 | 2023-12-28 | Dynavisor, Inc. | Dynamic I/O Virtualization Application Programming Interface |
| US20240192981A1 (en) * | 2021-06-25 | 2024-06-13 | Intel Corporation | Exitless guest to host notification |
-
2022
- 2022-03-17 CN CN202210265459.9A patent/CN114625480A/en active Pending
-
2023
- 2023-03-13 WO PCT/CN2023/081161 patent/WO2023174220A1/en not_active Ceased
- 2023-03-13 EP EP23769722.2A patent/EP4481566A4/en active Pending
-
2024
- 2024-09-16 US US18/886,790 patent/US12498957B2/en active Active
Patent Citations (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080294808A1 (en) * | 2007-05-23 | 2008-11-27 | Vmware, Inc. | Direct access to a hardware device for virtual machines of a virtualized computer system |
| US20090119087A1 (en) | 2007-11-06 | 2009-05-07 | Vmware, Inc. | Pass-through and emulation in a virtual machine environment |
| US20090287886A1 (en) * | 2008-05-13 | 2009-11-19 | International Business Machines Corporation | Virtual computing memory stacking |
| US20120167082A1 (en) * | 2010-12-23 | 2012-06-28 | Sanjay Kumar | Direct sharing of smart devices through virtualization |
| US20150163248A1 (en) * | 2012-04-13 | 2015-06-11 | Cisco Technology, Inc. | Automatic curation and modification of virtualized computer programs |
| US20230418640A1 (en) * | 2013-11-26 | 2023-12-28 | Dynavisor, Inc. | Dynamic I/O Virtualization Application Programming Interface |
| CN106462451A (en) | 2014-06-20 | 2017-02-22 | 华为技术有限公司 | Interruption handling method and relevant device of virtual platform |
| US20180321879A1 (en) * | 2015-12-31 | 2018-11-08 | Huawei Technologies Co., Ltd. | Method and Apparatus for Processing Read/Write Request in Physical Machine |
| CN108196945A (en) | 2016-12-08 | 2018-06-22 | 阿里巴巴集团控股有限公司 | A kind of communication method between cores, device and virtual equipment |
| CN108369604A (en) | 2017-12-28 | 2018-08-03 | 深圳前海达闼云端智能科技有限公司 | A kind of method, apparatus and electronic equipment of multiple operating system shared-file system |
| US20210089471A1 (en) * | 2018-06-12 | 2021-03-25 | Huawei Technologies Co., Ltd. | Virtualized Cache Implementation Method And Physical Machine |
| US20220365729A1 (en) * | 2019-01-31 | 2022-11-17 | Intel Corporation | Shared memory mechanism to support fast transport of sq/cq pair communication between ssd device driver in virtualization environment and physical ssd |
| US20210096901A1 (en) * | 2019-10-01 | 2021-04-01 | Qualcomm Incorporated | Shared memory buffers to submit an interrupt request worklist to a back end virtual machine |
| WO2022002106A1 (en) | 2020-07-01 | 2022-01-06 | 中兴通讯股份有限公司 | Interrupt processing method, interrupt manager, electronic device and computer-readable storage medium |
| CN112463307A (en) | 2020-12-11 | 2021-03-09 | 深信服科技股份有限公司 | Data transmission method, device, equipment and readable storage medium |
| CN113110916A (en) | 2021-04-22 | 2021-07-13 | 深信服科技股份有限公司 | Virtual machine data reading and writing method, device, equipment and medium |
| US20220365802A1 (en) * | 2021-05-17 | 2022-11-17 | Intel Corporation | Virtualization of interprocessor interrupts |
| US20240192981A1 (en) * | 2021-06-25 | 2024-06-13 | Intel Corporation | Exitless guest to host notification |
| CN113778611A (en) | 2021-07-06 | 2021-12-10 | 锐捷网络(苏州)有限公司 | Data transmission method, device, system and storage medium |
| CN113867993A (en) | 2021-12-03 | 2021-12-31 | 维塔科技(北京)有限公司 | Virtualized RDMA method, system, storage medium and electronic device |
| CN114625480A (en) | 2022-03-17 | 2022-06-14 | 北京有竹居网络技术有限公司 | Data processing method, device, readable medium and computing equipment |
Non-Patent Citations (8)
| Title |
|---|
| Dong et al., "Towards High-Quality I/O Virtualization", Systor'09, ACM, 2 Penn Plaza, Suite 701, New York, NY 10121-0701 USA, May 4, 2009, 26 pages. |
| Extended European Search Report for European Patent Application No. 23769722.2, mailed on Mar. 13, 2025, 8 pages. |
| International Search Report for PCT Patent Application No. PCT/CN2023/081161, mailed May 23, 2023, 5 pages. |
| Office Action for Chinese Patent Application No. 202210265459.9, mailed on Sep. 30, 2024, 14 pages. |
| Dong et al., "Towards High-Quality I/O Virtualization", Systor'09, ACM, 2 Penn Plaza, Suite 701, New York, NY 10121-0701 USA, May 4, 2009, 26 pages. |
| Extended European Search Report for European Patent Application No. 23769722.2, mailed on Mar. 13, 2025, 8 pages. |
| International Search Report for PCT Patent Application No. PCT/CN2023/081161, mailed May 23, 2023, 5 pages. |
| Office Action for Chinese Patent Application No. 202210265459.9, mailed on Sep. 30, 2024, 14 pages. |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2023174220A1 (en) | 2023-09-21 |
| EP4481566A1 (en) | 2024-12-25 |
| US20250004819A1 (en) | 2025-01-02 |
| CN114625480A (en) | 2022-06-14 |
| EP4481566A4 (en) | 2025-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12498957B2 (en) | Data processing method and apparatus, and readable medium and computing device | |
| CN116257320B (en) | DPU-based virtualization configuration management method, device, equipment and medium | |
| US12164949B2 (en) | Migration speed-up for multiple virtual machines | |
| US12430430B2 (en) | Selective malware scanning of files on virtualized snapshots | |
| WO2023179508A1 (en) | Data processing method and apparatus, readable medium and electronic device | |
| US20240420221A1 (en) | Order processing method and apparatus | |
| WO2023136899A1 (en) | Splitter and merger functions for multidimensional segmented media data | |
| CN117992204A (en) | Memory detection method, device, equipment and storage medium | |
| WO2023066079A1 (en) | Virtual machine resource allocation method and apparatus, medium and device | |
| US12375780B2 (en) | Multidimensional metadata for parallel processing of the segmented media data | |
| CN114398233B (en) | Load abnormality detection method and device, server and storage medium | |
| CN114637969A (en) | Authentication method and device for target object | |
| CN112835671A (en) | Application page scene switching method, device and device | |
| CN115242862A (en) | Network request control method, device, medium and electronic equipment | |
| CN114625433B (en) | Application startup method and system | |
| CN111831655B (en) | Data processing method, device, medium and electronic equipment | |
| WO2023109311A1 (en) | Resource access method and apparatus, and storage medium and electronic device | |
| CN115729824A (en) | Script testing method, device, equipment and storage medium | |
| US20260072610A1 (en) | Container-based read/write control method, apparatus, and device | |
| US12547335B2 (en) | Data migration method, electronic device, and storage medium | |
| CN111459893A (en) | Document processing method, device and electronic device | |
| US12197975B2 (en) | Asynchronous communication in cluster infrastructures | |
| US20250245062A1 (en) | Service scaling based on service dependencies | |
| CN111562913B (en) | Method, device and equipment for pre-creating view component and computer readable medium | |
| CN120639755A (en) | File uploading method, device, equipment, medium and product |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FEPP | Fee payment procedure |
Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: NON FINAL ACTION MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: FINAL REJECTION MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: NON FINAL ACTION MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: ALLOWED -- NOTICE OF ALLOWANCE NOT YET MAILED |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: AWAITING TC RESP., ISSUE FEE NOT PAID |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS |
|
| AS | Assignment |
Owner name: BEIJING YOUZHUJU NETWORK TECHNOLOGY CO., LTD., CHINA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:DOUYIN VISION CO., LTD.;REEL/FRAME:072939/0660 Effective date: 20251103 Owner name: BEIJING YOUZHUJU NETWORK TECHNOLOGY CO., LTD., CHINA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:SHANGHAI SUIXUNTONG ELECTRONIC TECHNOLOGY CO., LTD.;REEL/FRAME:072939/0656 Effective date: 20251103 Owner name: DOUYIN VISION CO., LTD., CHINA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:WANG, JIAN;REEL/FRAME:072939/0630 Effective date: 20251020 Owner name: SHANGHAI SUIXUNTONG ELECTRONIC TECHNOLOGY CO., LTD., CHINA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:LI, HANGJING;DENG, LIANG;XIE, YONGJI;AND OTHERS;REEL/FRAME:072939/0575 Effective date: 20250105 |
|
| STPP | Information on status: patent application and granting procedure in general |
Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED |
|
| STCF | Information on status: patent grant |
Free format text: PATENTED CASE |