WO2017008675A1 - Procédé et dispositif permettant de transmettre des données dans un environnement virtuel - Google Patents

Procédé et dispositif permettant de transmettre des données dans un environnement virtuel Download PDF

Info

Publication number
WO2017008675A1
WO2017008675A1 PCT/CN2016/089077 CN2016089077W WO2017008675A1 WO 2017008675 A1 WO2017008675 A1 WO 2017008675A1 CN 2016089077 W CN2016089077 W CN 2016089077W WO 2017008675 A1 WO2017008675 A1 WO 2017008675A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
shared memory
transmitted
primary
data transmission
Prior art date
Application number
PCT/CN2016/089077
Other languages
English (en)
Chinese (zh)
Inventor
李宇
张献涛
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017008675A1 publication Critical patent/WO2017008675A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/105Program control for peripheral devices where the programme performs an input/output emulation function
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/1652Handling requests for interconnection or transfer for access to memory bus based on arbitration in a multiprocessor architecture
    • G06F13/1663Access to shared memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Definitions

  • the present application relates to the field of computers, and in particular, to a technology for transmitting data in a virtualized environment.
  • Hot swapping a disk requires creating a virtual disk in the host. First insert the virtual disk into the host, copy the data to be transferred to the virtual disk, and then unplug the virtual disk from the host. Go to the virtual machine, copy the data to be transferred from the virtual disk to the virtual machine, and then pull out the virtual disk, so that the data transmission from the host to the virtual machine can be completed. It can be seen that the method of hot swapping a disk involves hot swapping of multiple devices, and the number of times of copying data is large, and the operation steps are too cumbersome, resulting in excessive system overhead.
  • the technical problem to be solved by the present application is how to transmit data in a virtualized environment, how to increase the transmission rate, and simplify the operation steps to reduce system overhead.
  • the present application provides a method for transmitting data in a virtual environment on a client device side, where the method includes: creating a first data transmission module; and allocating according to the first data transmission module a shared memory, and the shared memory allows the primary device to perform a read/write operation; and the first data transmission module performs data transmission with the shared memory, wherein the performing data transmission includes at least one of the following: The first to-be-transmitted data is stored in the shared memory, and the second to-be-transmitted data stored by the primary-end device in the shared memory is obtained.
  • storing the first to-be-transmitted data in the shared memory includes: reading the first to-be-transmitted data into a user space; and copying the first to-be-transmitted data from the user space to a location in a kernel space The shared memory.
  • copying the first to-be-transmitted data from the user space to the sharing located in a kernel space includes: copying, according to the related capacity information of the shared memory, the first to-be-transmitted data read to the user space into the shared memory located in a kernel space; wherein, after each copy, Sending a first data transmission message to the primary device; after acquiring the first data read message returned by the primary device, performing the next copy until the transmission is completed.
  • acquiring the second to-be-transmitted data stored by the primary-end device in the shared memory includes: reading a second to-be-transmitted data stored by the primary-end device in the shared memory; and reading the second Copying the data to be transmitted to the user space; storing the second data to be transmitted copied to the user space to the storage medium.
  • reading the second to-be-transmitted data stored by the primary-end device in the shared memory includes: reading, according to the second data transmission message sent by the primary-end device, that the primary-end device is stored in the sharing a second data to be transmitted of the memory; after the reading is completed, returning a second data read message to the primary device.
  • the method further includes: performing transmission event communication with the primary device before performing data transmission by the first data transmission module and the shared memory, and performing transmission event communication includes at least one of the following: Sending, to the primary device, first data information about the first to-be-transmitted data; and acquiring, by the primary device, second data information about the second to-be-transmitted data.
  • the present application provides a method for transmitting data in a virtual environment on a primary device side, wherein the method includes: creating a second data transmission module; acquiring a shared allocated by the client device Accessing the memory, so that the shared memory allows the primary device to perform a read/write operation; and the second data transmission module performs data transmission with the shared memory, wherein the performing data transmission includes at least one of the following Obtaining, by the client device, the first to-be-transmitted data stored in the shared memory, and storing the second to-be-transmitted data in the shared memory.
  • storing the second to-be-transmitted data in the shared memory includes: reading the second to-be-transmitted data into a user space; and copying the second to-be-transmitted data from the user space to a location in a kernel space The shared memory.
  • copying the second to-be-transmitted data from the user space to the shared memory located in a kernel space includes: reading the read to the user space based on related capacity information of the shared memory
  • the second to be transmitted data is copied to the shared memory located in the kernel space; wherein, after each copy, the second data transmission message is sent to the client device; when the second device returns the second device After the data is read, the next copy is made until the transfer is complete.
  • acquiring the first data to be transmitted that is stored by the client device in the shared memory includes: reading, by the client device, first data to be transmitted stored in the shared memory; Copy the data to be transferred to User space; storing the first to-be-transmitted data copied to the user space to a storage medium.
  • reading the first data to be transmitted stored by the client device in the shared memory includes: reading, according to the first data transmission message sent by the client device, the client device being stored in the sharing The first data to be transmitted of the memory; after the reading is completed, returning the first data read message to the client device.
  • the method further includes: performing transmission event communication with the client device before performing data transmission by the second data transmission module and the shared memory, and performing transmission event communication includes at least one of the following: Sending, to the client device, second data information about the second to-be-transmitted data; acquiring first data information about the first to-be-transmitted data sent by the client device.
  • the present application provides an apparatus for performing data transmission in a virtual environment, where the apparatus includes: a client creation apparatus for creating a first data transmission module; a client allocation apparatus, And configured to allocate a shared memory according to the first data transmission module, and the shared memory allows the primary device to perform a read/write operation; and the client data transmission device is configured to pass the first data transmission module and the shared memory Performing data transmission, wherein the client data transmission device includes at least one of the following: a client data storage unit, configured to store the first to-be-transmitted data in the shared memory, a client data acquisition unit, And configured to acquire second to-be-transmitted data stored by the primary device in the shared memory.
  • the client data storage unit includes: a subunit for reading the first data to be transmitted to the user space; and copying the first data to be transmitted from the user space to the kernel The subunit of the shared memory of space.
  • the subunit for copying the first to-be-transmitted data from the user space to the shared memory located in a kernel space includes: configured to use the related capacity information based on the shared memory And reading, by the sub-unit of the shared memory located in the kernel space, the sub-units of the shared memory that are read into the user space; and sending, by each copy, the first data transmission message to the primary end device a subunit; a subunit for performing the next copy until the transmission is completed after acquiring the first data read message returned by the primary device.
  • the client data obtaining unit includes: a subunit for reading the second data to be transmitted stored by the master device in the shared memory; and configured to copy the read second data to be transmitted a subunit to the user space; a second unit to be used for storing the copy to the user space to the subunit of the storage medium.
  • the subunit for reading the second data to be transmitted stored by the primary device in the shared memory includes: a second data transmission message reading station according to the primary device a subunit of the second data to be transmitted stored by the master device in the shared memory; a subunit for returning a second data read message to the master device after the reading is completed.
  • the device further includes: a client communication device, configured to perform transmission event communication with the primary device before performing data transmission with the shared memory by the first data transmission module, where
  • the client communication device includes at least one of the following: a client information sending unit, configured to send first data information about the first data to be transmitted to the primary device, and a client information acquiring unit, configured to acquire And second data information about the second data to be transmitted sent by the primary device.
  • the present application provides an apparatus for performing data transmission in a virtual environment, where the apparatus includes: a primary end creating device for creating a second data transmission module; a primary end allocation device, The access authority for obtaining the shared memory allocated by the client device, so that the shared memory allows the master device to perform read and write operations; and the primary data transmission device is configured to share with the second data transmission module
  • the data transmission is performed by the memory, wherein the primary data transmission device includes at least one of the following: a primary data acquisition unit, configured to acquire first data to be transmitted stored in the shared memory by the client device, and the primary end a data storage unit, configured to store the second to-be-transmitted data in the shared memory.
  • the primary data storage unit includes: a subunit for reading the second data to be transmitted to the user space; and copying the second data to be transmitted from the user space to the kernel The subunit of the shared memory of space.
  • the subunit for copying the second data to be transmitted from the user space to the shared memory located in a kernel space includes: configured to use the related capacity information based on the shared memory And reading, by the sub-unit of the shared memory located in the kernel space, for each second copy, sending a second data transmission message to the client device after each copy a subunit; a subunit for performing a next copy until the transfer is completed after acquiring the second data read message returned by the guest device.
  • the primary data obtaining unit includes: a subunit for reading the first data to be transmitted stored by the client device in the shared memory; and configured to copy the read first data to be transmitted a subunit to the user space; the first to be transmitted data for copying the copy to the user space to a subunit of the storage medium.
  • the subunit for reading the first data to be transmitted stored by the client device in the shared memory includes: a first data transmission message reading station according to the client device a subunit of the first data to be transmitted stored in the shared memory by the client device; and a subunit for returning the first data read message to the guest device after the reading is completed.
  • the device further includes: a primary communication device, configured to perform transmission event communication with the client device before performing data transmission with the shared memory by the second data transmission module, where
  • the primary communication device includes at least one of: a primary information transmitting unit, configured to send, to the client device, the The second data information of the second data to be transmitted; the primary information acquiring unit is configured to acquire first data information about the first data to be transmitted sent by the client device.
  • the client device creates a first data transmission module
  • the primary device creates a second data transmission module, the first data transmission module and the second data transmission module.
  • the client device allocates a shared memory located in the kernel space according to the first data transmission module, and allows the primary terminal
  • the device reads and writes the shared memory, and the primary device acquires access rights of the shared memory; the client device and the primary device respectively pass the first data transmission module and the second
  • the data transmission module performs data transmission with the shared memory.
  • the client device stores the first to-be-transmitted data in the shared memory, and the primary device obtains the storage of the client device.
  • the primary device stores the second to-be-transmitted data in the shared memory
  • the guest device acquires the primary Data stored in the second device to be transmitted to the shared memory.
  • the shared memory located in the kernel space is used as the transfer station to transmit data, which greatly improves the data transmission rate compared with the existing serial port transmission mode, and the operation is relatively simple compared with the existing hot-swappable disk method. System resources are used less.
  • FIG. 1 illustrates a client device for data transmission in a virtual environment, in accordance with an embodiment of an aspect of the present application
  • FIG. 2 illustrates a client data transmission device of a client device for performing data transmission in a virtual environment, in accordance with a preferred embodiment of an aspect of the present application
  • FIG. 3 illustrates a client device for data transmission in a virtual environment in accordance with a preferred embodiment of an aspect of the present application
  • FIG. 4 illustrates a primary device for performing data transmission in a virtual environment, in accordance with an embodiment of an aspect of the present application
  • FIG. 5 illustrates a primary end data transmission device of a primary end device for performing data transmission in a virtual environment according to a preferred embodiment of an aspect of the present application
  • FIG. 7 is a schematic diagram showing a cooperation between a client device and a master device for performing data transmission in a virtual environment according to an embodiment of an aspect of the present application.
  • FIG. 8 illustrates a flow chart of a method for transmitting data in a virtual environment on a client device side according to an embodiment of another aspect of the present application
  • FIG. 9 is a flowchart of a method for transmitting data in a virtual environment on a primary device side according to an embodiment of another aspect of the present application.
  • FIG. 10 illustrates a flow chart of a method for transmitting data in a virtual environment, in accordance with an embodiment of another aspect of the present application.
  • client device 1 shows a client device 1 for data transmission in a virtual environment, wherein the client device 1 includes a client creation device 11, a client distribution device 12, and a client, in accordance with an embodiment of an aspect of the present application.
  • Data transmission device 13 Data transmission device 13.
  • the client creating device 11 creates a first data transmission module; the client allocation device 12 allocates a shared memory according to the first data transmission module, and the shared memory allows the primary device to perform read and write operations.
  • the client data transmission device 13 performs data transmission with the shared memory through the first data transmission module.
  • the client device 1 includes an electronic device capable of automatically performing numerical calculation and information processing according to an instruction set or stored in advance, the hardware of which includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), Programmable gate array (FPGA), digital processor (DSP), embedded devices, etc.
  • the client device 1 can also be a collection of computer data and instructions organized in a series of sequences.
  • the client device may also be a combination of a collection of computer data and instructions organized in a specific order and electronic devices capable of automatically performing numerical calculations and information processing in accordance with pre-set or stored instructions.
  • a person skilled in the art should understand that the client device 1 is only an example, and other existing or future client devices 1 may be included in the application, and should be included in the scope of the present application. It is included here by reference.
  • the above devices are continuously working.
  • “continuous” refers to the above-mentioned respective devices respectively in real time or according to the set or real-time adjusted working mode requirements, for example, the client is created.
  • the device 11 creates a first data transmission module, and the first data transmission module created by the client creation device 11 is continuously used by the client distribution device 12 and the client data transmission device 13, the client distribution device 12 continuous roots According to the first data transmission module, a shared memory is allocated, and the shared memory allows the primary device to perform read and write operations, and the client data transmission device 13 continues to perform the first data transmission module and the shared memory. Data is transmitted until the guest device 1 stops working.
  • the guest device may be a guest virtual machine (guest), and the primary device may be a privileged virtual machine (host), and one or more non-privileged levels may be implemented by the privileged virtual machine. Management of customer virtual machines.
  • the client creation device 11 creates a first data transmission module.
  • the first data transmission module includes a guest virtual device and a client driver.
  • the creating of the first data transmission module by the client creation device 11 includes: creating a guest virtual device and loading a client driver of the guest virtual device.
  • the client creating device 11 adds a client virtual device by modifying a corresponding logic according to a type of a hypervisor of the host, where the guest virtual device is used between the kernel space and the user space, and the guest and the host. Communication between kernel spaces. Specifically, in the creation phase of the guest, the client creation device 11 can directly add the guest virtual device by using the created method. If the guest already exists, the client creation device 11 can use the hot plug method to increase the client. Virtual device.
  • the virtual memory of the operating system of the guest device (for example, the Linux operating system) is divided into kernel space and user space, and the core software running in the kernel space has all the rights to access the hardware device, and has a higher privilege level; Ordinary applications in user space can only see some of the system resources that they are allowed to use, and cannot use certain system features or direct access to kernel space and hardware devices.
  • the created first data transmission module provides a data transmission channel between the kernel space and the user space, which facilitates the smooth progress of subsequent data transmission.
  • the client allocation device 12 allocates a shared memory according to the first data transmission module, and the shared memory allows the primary device to perform read and write operations.
  • a shared memory is allocated, the shared memory is located in the kernel space, and the second data transmission module of the primary device is allowed.
  • the master driver in the access accesses the shared memory. Specifically, when the guest driver in the first data transmission module detects the guest virtual device, allocate a transmission page for data transmission, and allocate a control page for controlling data transmission, where the transmission page and the location are The control page is the shared memory page.
  • the shared memory located in the kernel space is used as a transfer station to transmit data, which greatly improves the data transfer rate compared with the existing serial port transmission mode, and is simpler in operation than the existing hot-swappable disk. Correct System resources are used less.
  • the client data transmission device 13 performs data transmission with the shared memory through the first data transmission module, and the client data transmission device 13 includes a client data storage unit 131 and client data acquisition. At least one of the units 132, wherein the client data storage unit 131 stores the first to-be-transmitted data in the shared memory, and the client data acquiring unit 132 acquires the primary device storage The second data to be transmitted in the shared memory.
  • the client data storage unit 131 is configured to send the first data to be transmitted to the primary device, where the client data acquiring unit 132 is configured to receive the second data to be transmitted sent by the primary device.
  • the client data transmission device 13 may only include the client data storage unit 131, that is, send the first data to be transmitted to the master device; the client data transmission device 13 may also include only the client.
  • the data acquiring unit 132 receives the second data to be transmitted sent by the primary device; the client data transmitting device 13 may further include the client data storage unit 131 and the client data acquiring unit 132. That is, sending the first to-be-transmitted data to the primary end device and receiving the second to-be-transmitted data sent by the primary-end device simultaneously.
  • the client data storage unit 131 may include: a subunit for reading the first data to be transmitted to the user space; and copying the first data to be transmitted from the user space to A subunit of the shared memory located in kernel space.
  • the client data storage unit 131 reads the first data to be transmitted from the storage medium of the client device 1 to the user space of the client device in the memory, and the shared memory is located in the kernel space of the memory, so The first to-be-transmitted data is copied from the user space to the shared memory.
  • the subunit for copying the first to-be-transmitted data from the user space to the shared memory located in a kernel space includes: for using the related capacity information of the shared memory, And reading, by the sub-unit of the shared memory located in the kernel space, the sub-units of the shared memory that are read into the user space; and sending, by each copy, the first data transmission message to the primary end device a subunit; a subunit for performing the next copy until the transmission is completed after acquiring the first data read message returned by the primary device.
  • the copying is performed in units of the transmission page.
  • the size of the first data to be transmitted is N
  • the size of the data transmitted by the client data transmission device 13 is ALREADY
  • the initial value is 0, and the number of free subpages of the transmission page SEND1 is FREE
  • the number of the subpage number A is The initial value is 0, and the process of copying the first to-be-transmitted data from the client data transmission device 13 to the shared memory is as follows:
  • the third step is to determine whether the size of the data to be copied INPUT is greater than or equal to the subpage size PAGESIZE, and if so, then go to the fourth step, and if not, go to the fifth step;
  • the page number A is incremented by 1, it is judged whether the maximum number of sub-pages TP of the transmission page SEND1 is reached. If A reaches TP, the value A is assigned to 0, and then third step;
  • the client data obtaining unit 132 includes: configured to read, that the master device is stored in the sharing a subunit of the second data to be transmitted in the memory; a subunit for copying the read second data to be transmitted to the user space; and storing the second data to be transmitted copied to the user space to the storage medium Subunit.
  • the client data obtaining unit 132 copies the second data to be transmitted sent by the master device from the shared memory to the user space, and then copies the data from the user space to the storage medium.
  • the storage medium refers to a non-volatile storage medium such as, but not limited to, a hard disk, an optical disk, a USB flash drive, an SD card, or the like.
  • the subunit for reading the second data to be transmitted stored by the primary device in the shared memory includes: a second data transmission message reading station according to the primary device a subunit of the second data to be transmitted stored by the master device in the shared memory; a subunit for returning a second data read message to the master device after the reading is completed.
  • the data size received by the client data transmission device 13 is GET, and the initial value is 0, and the second data to be transmitted is copied from the shared memory to the client.
  • the flow of the data transmission device 13 is as follows:
  • the second step waiting for the second data transmission message sent by the primary device, after receiving the second data transmission message sent by the primary device, according to the length LEN_SLICE of the transmission page RECEIVE1 in the control page, and transmitting
  • the page RECEIVE1 subpage number and the information of the address ADDR of the transmission page RECEIVE1 in the shared memory are sequentially processed and the data in the transmission page RECEIVE1 is copied to the user space, and the client data obtaining unit 132 copies the content to the user space.
  • the new value after the obtained data size is returned to the primary device to return a second data read message, and then the first step is taken.
  • the client device 1 includes a client creation device 11', a client distribution device, in accordance with a preferred embodiment of an aspect of the present application, 12', the client data transmission device 13' and the client communication device 14'.
  • the content of the client creation device 11', the client distribution device 12', the client data transmission device 13', and the client creation device 11, the client distribution device 12, and the client data transmission device 13 in FIG. The same or basically the same, for the sake of brevity, no longer repeat them.
  • the client communication device 14' performs transmission event communication with the primary device before performing data transmission with the shared memory by the first data transmission module.
  • the client communication device includes at least one of a client information transmitting unit (not shown) and a client information acquiring unit (not shown), wherein the client information is transmitted.
  • the unit sends the first data information about the first data to be transmitted to the primary device, where the client information obtaining unit acquires the second data about the second data to be transmitted sent by the primary device. information.
  • the first to-be-transmitted data is transmitted to the storage device in the form of a file
  • the first data information includes a storage path of the file, a name of the file, and a length of the file.
  • the second to-be-transmitted data is transmitted to the client device, it is stored in a storage medium in a file format, and the second data information includes a storage path of the file, a name of the file, and a length of the file.
  • the client device 1 communicates with the host device for event communication: the transfer command can be placed in a xenstore (a storage device in the Xen virtual environment, and the xenstore is completed based on the event channel).
  • the transfer command includes the first data information and notifies the host device that a new command exists.
  • the master device obtains a transmission command from the xenstore, extracts the first data information, and first checks whether the storage path of the file in the first data information already exists, and if yes, returns an error, and notifies the client device 1 of the corresponding error. The information then ends the transmission; if not, the file is created according to the storage path of the file in the first data information, and the client device 1 is notified that the transmission command has been accepted and the processing is normal.
  • FIG. 4 illustrates a primary device 2 for performing data transmission in a virtual environment, wherein the primary device 2 includes a primary device 25, a primary device 26, and a primary device, in accordance with an embodiment of an aspect of an aspect of the present application.
  • Data transmission device 27 is illustrated.
  • the primary end creating device 25 creates a second data transmission module; the primary end allocation device 26 acquires access rights of the shared memory allocated by the guest device, so that the shared memory allows the primary device to read and write.
  • the primary data transmission device 27 performs data transmission with the shared memory through the second data transmission module.
  • the master device 2 includes an automatic numerical meter capable of automatically setting or storing the instructions in advance.
  • Electronic devices for computing and information processing including but not limited to microprocessors, application specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, and the like.
  • the primary device 2 can also be a collection of computer data and instructions organized in a sequence of specific sequences.
  • the master device 2 may also be a combination of a collection of computer data and instructions organized in a specific sequence and electronic devices capable of automatically performing numerical calculations and information processing in accordance with pre-set or stored instructions.
  • the primary device 2 is merely an example, and other existing or future primary devices 2 may be applicable to the present application, and should also be included in the protection scope of the present application. It is included here by reference.
  • the above-mentioned devices are continuously working.
  • continuous refers to the above-mentioned respective devices respectively in real time or according to the set or real-time adjusted working mode requirements, for example, the primary end is created.
  • the device 25 creates a second data transmission module, the second data transmission module created by the primary terminal creation device 25 is continuously used by the primary distribution device 26 and the primary data transmission device 27, the primary distribution device 26 continuously obtaining access rights of the shared memory allocated by the client device, so that the shared memory allows the master device to perform read and write operations, and the master data transmission device 27 continues to pass the second data transmission module and the The shared memory performs data transfer until the primary device 2 stops working.
  • the guest device may be a guest virtual machine (guest), and the primary device may be a privileged virtual machine (host), and one or more non-privileged levels may be implemented by the privileged virtual machine. Management of customer virtual machines.
  • the primary end creating device 25 creates a second data transmission module.
  • the second data transmission module includes a primary virtual device and a primary drive.
  • the creating, by the primary end creating device 25, the second data transmission module includes: creating a primary virtual device and loading a primary driver of the primary virtual device.
  • the primary end creating device 25 increases the primary virtual device by modifying the corresponding logic according to the type of the hypervisor of the host, and the primary virtual device is used between the kernel space and the user space and the host and the guest. Communication between kernel spaces.
  • the virtual memory of the operating system of the primary device (for example, the Linux operating system) is divided into kernel space and user space, and the core software running in the kernel space has all the rights to access the hardware device, and has a higher privilege level; Ordinary applications in user space can only see some of the system resources that they are allowed to use, and cannot use certain system features or direct access to kernel space and hardware devices.
  • the created second data transmission module provides a data transmission channel between the kernel space and the user space, which facilitates the smooth progress of subsequent data transmission.
  • the primary distribution device 26 obtains access rights of the shared memory allocated by the client device, so that the shared memory allows the primary device to perform read and write operations.
  • the guest driver in the first data transmission module of the client device allocates a shared memory when detecting the guest virtual device, the shared memory is located in the kernel space, and allows the second data transmission module
  • the master driver in the access accesses the shared memory.
  • the guest driver in the first data transmission module detects the guest virtual device in the first data transmission module, allocate a transmission page for data transmission, and allocate a control page for controlling data transmission.
  • the transfer page and the control page are both the shared memory page.
  • the shared memory located in the kernel space is used as a transfer station to transmit data, which greatly improves the data transfer rate compared with the existing serial port transmission mode, and is simpler in operation than the existing hot-swappable disk. Less use of system resources.
  • the primary data transmission device 27 performs data transmission with the shared memory through the second data transmission module, and the primary data transmission device 27 includes a primary data storage unit 271 and a primary data acquisition. At least one of the unit 272, wherein the primary data storage unit 271 acquires the first data to be transmitted stored by the client device in the shared memory, and the primary data acquiring unit 272 The two to-be-transmitted data is stored in the shared memory.
  • the primary data storage unit 271 is configured to receive the first data to be transmitted sent by the client device, and the primary data acquiring unit 272 is configured to send the second data to be transmitted to the client device.
  • the primary data transmission device 27 may include only the primary data storage unit 271, that is, receive the first to-be-transmitted number sent by the client device; the primary data transmission device 27 may also include only the The primary data acquiring unit 272 sends the second data to be transmitted to the client device.
  • the primary data transmitting device 27 may further include the primary data storage unit 271 and the primary data acquiring unit 272. That is, receiving the first to-be-transmitted data sent by the client device and transmitting the second to-be-transmitted data to the client device simultaneously.
  • the primary data storage unit 271 may include: a subunit for reading the second data to be transmitted to the user space; and copying the second data to be transmitted from the user space to A subunit of the shared memory located in kernel space.
  • the primary data storage unit 271 reads the second data to be transmitted from the storage medium of the primary device 2 to the user space of the primary device in the memory, and the shared memory is located in the kernel space of the memory, so The second to-be-transmitted data is copied from the user space to the shared memory.
  • the subunit for copying the second to-be-transmitted data from the user space to the shared memory located in a kernel space includes: for using the related capacity information of the shared memory, Read to The second to-be-transmitted data of the user space is copied to the sub-unit of the shared memory located in the kernel space; for each copy, the sub-unit of the second data transmission message is sent to the client device; After obtaining the second data read message returned by the client device, the next copy is performed until the subunit is completed.
  • the copying is performed in units of the transmission page.
  • the data size transmitted by the primary data transmission device 27 is ALREADY
  • the initial value is 0
  • the number of free subpages of the transmission page SEND2 is FREE
  • the initial value of the subpage number A is The process of copying the second data to be transmitted from the primary data transmission device 27 to the shared memory:
  • the third step is to determine whether the size of the data to be copied INPUT is greater than or equal to the subpage size PAGESIZE, and if so, then go to the fourth step, and if not, go to the fifth step;
  • the page number A is incremented by 1, it is judged whether the maximum number of subpages TP of the transmission page SEND2 is reached. If A reaches TP, the value A is assigned to 0, and then third step;
  • the primary data storage unit 271 includes: a subunit for reading the first data to be transmitted stored by the guest device in the shared memory; and the first data to be transmitted to be read Copying to a subunit of the user space; storing the first data to be transmitted copied to the user space to a subunit of the storage medium.
  • the primary data storage unit 271 copies the first data to be transmitted sent by the client device from the shared memory to the user space, and then copies the data from the user space to the storage medium.
  • the storage medium refers to a non-volatile storage medium such as, but not limited to, a hard disk, an optical disk, a USB flash drive, an SD card, or the like.
  • the subunit for reading the first data to be transmitted stored by the client device in the shared memory includes: a first data transmission message reading station according to the client device a subunit of the first data to be transmitted stored in the shared memory by the client device; a subunit for returning the first data read message to the guest device after the reading is completed.
  • the data size received by the primary data transmission device 27 is GET, and the initial value is 0, and the first data to be transmitted is copied from the shared memory to the primary end.
  • the flow of the data transfer device 27 is as follows:
  • the second step waiting for the first data transmission message sent by the client device, after receiving the first data transmission message sent by the client device, according to the length of the transmission page RECEIVE2 in the control page, LEN_SLICE, transmission
  • the page RECEIVE2 subpage number and the information such as the address ADDR of the transmission page RECEIVE2 in the shared memory are sequentially processed and the data in the transmission page RECEIVE2 is copied to the user space, and the first data to be transmitted copied to the user space is stored to the storage.
  • the master device 2 includes a master device 25', a master device, according to a preferred embodiment of an aspect of the present application. 26', the primary data transmission device 27' and the primary communication device 28'.
  • the content of the primary end creating device 25', the primary distributing device 26', the primary data transmitting device 27', and the primary end creating device 25, the primary distributing device 26, and the primary data transmitting device 27 in FIG. The same or basically the same, for the sake of brevity, no longer repeat them.
  • the primary communication device 28' performs transmission event communication with the guest device prior to data transmission by the second data transmission module and the shared memory.
  • the primary communication device includes at least one of a primary information transmitting unit (not shown) and a primary information acquiring unit (not shown), wherein the primary information is sent.
  • the unit sends the second data information about the second data to be transmitted to the client device, where the master information acquiring unit acquires the first data about the first data to be transmitted sent by the client device. information.
  • the second to-be-transmitted data is transmitted to the client device, it is stored in a storage medium in a file format, and the second data information includes a storage path of the file, a name of the file, and a length of the file.
  • the file is stored in a storage medium in a file format, and the first data information includes a storage path of the file, a name of the file, and a length of the file.
  • the transfer command can be placed in a xenstore (a storage device in the Xen virtual environment, and the xenstore is completed based on the event channel).
  • the transmission command includes the second data information and notifies the client device that there is a new command.
  • the client device obtains a transmission command from the xenstore, extracts the second data information, and first checks whether the storage path of the file in the second data information already exists, and if yes, returns an error, and notifies the primary device 2 of the corresponding error. Information, then ending the transmission; if not, creating a file according to the storage path of the file in the second data information, And notify the master device 2 that the transfer command has been accepted and the processing is normal.
  • FIG. 7 illustrates a schematic diagram of a client device 1 cooperating with a master device 2 for data transmission in a virtual environment, in accordance with an embodiment of an aspect of the present application.
  • the client device 1 includes a client creating device 11", a client device 12" and a client data transmitting device 13", the master device 2 including a master creating device 25", a master distributing device 26" and Primary data transmission device 27".
  • the client creating device 11" of the client device 1 creates a first data transmission module; the master device creating device 25" of the master device 2 creates a second data transmission module; the client device 12" of the client device 1 according to the The first data transmission module allocates a shared memory, and the shared memory allows the primary device 2 to perform read and write operations; the primary distribution device 26" of the primary device 2 acquires access rights of the shared memory allocated by the client device 1, So that the shared memory allows the primary device 2 to perform read and write operations; the client data transmission device 13" of the client device 1 performs data transmission with the shared memory through the first data transmission module, the client data
  • the transmission device 13" includes at least one of a client data storage unit and a client data acquisition unit, wherein the client data storage unit stores the first to-be-transmitted data in the shared memory, The client data acquiring unit acquires the second data to be transmitted stored by the master device 2 in the shared memory; the master data transmitting device 27" of the master device 2 passes the second data transmitting module and the Shared memory for data
  • the contents of the client data transmission device 13 are the same or substantially the same
  • the content of the end creating device 25, the primary end distributing device 26, and the primary data transmitting device 27 are the same or substantially the same, and are not described here for brevity and are hereby incorporated by reference.
  • FIG. 8 illustrates a flow chart of a method for transmitting data in a virtual environment on a client device side, according to an embodiment of another aspect of the present application.
  • the method includes step S81, step S82, and step S83. Specifically, in step S81, the client device 1 creates a first data transmission module; in step S82, the client device 1 allocates a shared memory according to the first data transmission module, and the shared memory allows the primary device Performing a read/write operation; in step S83, the client device 1 performs data transmission with the shared memory through the first data transmission module.
  • the client device 1 includes an automatic numerical meter capable of automatically following an instruction set or stored in advance.
  • Electronic devices for computing and information processing including but not limited to microprocessors, application specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, and the like.
  • the client device 1 can also be a collection of computer data and instructions organized in a series of sequences.
  • the client device may also be a combination of a collection of computer data and instructions organized in a specific order and electronic devices capable of automatically performing numerical calculations and information processing in accordance with pre-set or stored instructions.
  • a person skilled in the art should understand that the client device 1 is only an example, and other existing or future client devices 1 may be included in the application, and should be included in the scope of the present application. It is included here by reference.
  • step S81 the client device 1 creates a first data transmission module, and the first data transmission module created by the client device 1 in the step S81 is continuously used by the step S82 and the step S83.
  • step S82 the client device 1 continues to allocate a shared memory according to the first data transmission module, and the shared memory allows the primary device to perform read and write operations.
  • step S83 the client device 1 continues to pass the first A data transmission module performs data transmission with the shared memory until the guest device 1 stops working.
  • the guest device may be a guest virtual machine (guest), and the primary device may be a privileged virtual machine (host), and one or more non-privileged levels may be implemented by the privileged virtual machine. Management of customer virtual machines.
  • step S81 the client device 1 creates a first data transmission module.
  • the first data transmission module includes a guest virtual device and a client driver.
  • the creation of the first data transmission module by the client device 1 includes: creating a guest virtual device and loading a guest driver of the guest virtual device.
  • the client device 1 adds the client virtual device by modifying the corresponding logic according to the type of the host hypervisor, and the guest virtual device is used between the kernel space and the user space and the kernel space of the guest and the host. Communication between. Specifically, in the creation phase of the guest, the client device 1 can directly add the guest virtual device by using the created method. If the guest already exists, the client device 1 can use the hot plug method to add the guest virtual device.
  • the virtual memory of the operating system of the guest device (for example, the Linux operating system) is divided into kernel space and user space, and the core software running in the kernel space has all the rights to access the hardware device, and has a higher privilege level; Ordinary applications in user space can only see some of the system resources that they are allowed to use, and cannot use certain system features or direct access to kernel space and hardware devices.
  • the created first data transmission module provides a data transmission channel between the kernel space and the user space, which facilitates the smooth progress of subsequent data transmission.
  • step S82 the client device 1 allocates a shared memory according to the first data transmission module, and the shared memory allows the primary device to perform read and write operations.
  • a shared memory is allocated, the shared memory is located in the kernel space, and the second data transmission module of the primary device is allowed.
  • the master driver in the access accesses the shared memory. Specifically, when the guest driver in the first data transmission module detects the guest virtual device, allocate a transmission page for data transmission, and allocate a control page for controlling data transmission, where the transmission page and the location are The control page is the shared memory page.
  • the shared memory located in the kernel space is used as a transfer station to transmit data, which greatly improves the data transfer rate compared with the existing serial port transmission mode, and is simpler in operation than the existing hot-swappable disk. Less use of system resources.
  • step S83 the client device 1 performs data transmission with the shared memory through the first data transmission module.
  • the step S83 includes at least one of step S831 (not shown) and step S832 (not shown), wherein in step S831, the client device 1 stores the first data to be transmitted in In the shared memory, in step S832, the client device 1 acquires the second data to be transmitted stored by the master device in the shared memory.
  • step S831 the client device 1 is configured to send the first data to be transmitted to the master device, and the client device 1 is configured to receive the second data to be transmitted sent by the master device in step S832.
  • the step S83 may include only the step S831, that is, sending the first data to be transmitted to the primary device; the step S83 may also include only the step S832, that is, receiving the first message sent by the primary device.
  • the step S83 may further include the step S831 and the step S832, that is, sending the first data to be transmitted to the primary device and receiving the second data to be transmitted sent by the primary device. At the same time.
  • step S831 the client device 1 reads the first to-be-transmitted data into the user space, and copies the first to-be-transmitted data from the user space to the shared memory located in the kernel space.
  • the client device 1 reads the first data to be transmitted from the storage medium of the client device 1 to the user space of the client device in the memory, and the shared memory is located in the kernel space of the memory, so the first device The data to be transmitted is copied from the user space to the shared memory.
  • step S831 the client device 1 copies the first to-be-transmitted data read to the user space into the shared memory located in the kernel space, based on the related capacity information of the shared memory. After each copy, the first data transmission message is sent to the primary device; after the first data read message returned by the primary device is obtained, the next copy is performed until the transmission is completed.
  • the related capacity information of the shared memory may include, but is not limited to, the transmission page for data transmission.
  • the size of the face, the size of the transfer page SIZET the number of sub-pages TP ⁇ sub-page size PAGESIZE.
  • the copying is performed in units of the transmission page.
  • the size of the first data to be transmitted is N
  • the size of the data transmitted by the client device 1 is ALREADY
  • the initial value is 0
  • the number of free subpages of the transmission page SEND1 is FREE
  • the initial value of the subpage number A is 0.
  • the third step is to determine whether the size of the data to be copied INPUT is greater than or equal to the subpage size PAGESIZE, and if so, then go to the fourth step, and if not, go to the fifth step;
  • the page number A is incremented by 1, it is judged whether the maximum number of sub-pages TP of the transmission page SEND1 is reached. If A reaches TP, the value A is assigned to 0, and then third step;
  • first to-be-transmitted data is copied from the user space to the shared memory.
  • the method is only an example, and other existing or future possible methods for copying the first data to be transmitted from the user space to the shared memory, as applicable to the present application, are also included in the scope of protection of the present application. It is included here by reference.
  • step S832 the client device 1 reads the second data to be transmitted stored by the master device in the shared memory, and copies the read second data to be transmitted to the user space,
  • the second to-be-transmitted data copied to the user space is stored to the storage medium.
  • the client device 1 copies the second data to be transmitted sent by the master device from the shared memory to the user space, and then copies the space from the user space to the storage medium.
  • the storage medium refers to a non-volatile storage medium such as, but not limited to, a hard disk, an optical disk, a USB flash drive, an SD card, or the like.
  • step S832 the client device 1 reads the second data to be transmitted stored by the master device in the shared memory according to the second data transmission message sent by the master device, and the reading is completed. Thereafter, a second data read message is returned to the primary device.
  • the size of the second data to be transmitted is N
  • the data size received by the client device 1 is GET
  • the initial value is 0, and the second data to be transmitted is copied from the shared memory to the client device 1
  • the second step waiting for the second data transmission message sent by the primary device, after receiving the second data transmission message sent by the primary device, according to the length LEN_SLICE of the transmission page RECEIVE1 in the control page, and transmitting
  • the page RECEIVE1 subpage number and the information such as the address ADDR of the transmission page RECEIVE1 in the shared memory are sequentially processed and the data in the transmission page RECEIVE1 is copied to the user space, and the client device 1 copies the copy to the second to be transmitted in the user space.
  • the new value the client device 1 returns a second data read message to the master device, and then proceeds to the first step.
  • the method may further include: the client device 1 is passing the first Before the data transmission module performs data transmission with the shared memory, performing transmission event communication with the primary end device, wherein the performing transmission event communication includes at least one of the following:
  • the client device 1 sends first data information about the first data to be transmitted to the primary device;
  • the client device 1 acquires second data information about the second to-be-transmitted data sent by the primary device.
  • the first to-be-transmitted data is transmitted to the storage device in the form of a file
  • the first data information includes a storage path of the file, a name of the file, and a length of the file.
  • the second to-be-transmitted data is transmitted to the client device, it is stored in a storage medium in a file format, and the second data information includes a storage path of the file, a name of the file, and a length of the file.
  • the client device 1 communicates with the host device for event communication: the transfer command can be placed in a xenstore (a storage device in the Xen virtual environment, and the xenstore is completed based on the event channel).
  • the transfer command includes the first data information and notifies the host device that a new command exists.
  • the master device obtains a transmission command from the xenstore, extracts the first data information, and first checks whether the storage path of the file in the first data information already exists, and if yes, returns an error, and notifies the client device 1 of the corresponding error. The information then ends the transmission; if not, the file is created according to the storage path of the file in the first data information, and the client device 1 is notified that the transmission command has been accepted and the processing is normal.
  • FIG. 9 illustrates a flow chart of a method for transmitting data in a virtual environment on a primary end device side, in accordance with an embodiment of another aspect of the present application.
  • the method includes step S95, step S96, and step S97.
  • step S95 the primary device 2 creates a second data transmission module;
  • step S96 the primary device 2 acquires access rights of the shared memory allocated by the client device, so that the shared memory allows the primary terminal.
  • the device performs a read/write operation;
  • step S97 the primary device 2 performs data transmission with the shared memory through the second data transmission module.
  • the master device 2 includes an electronic device capable of automatically performing numerical calculation and information processing according to an instruction set or stored in advance, and the hardware thereof includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), Programmable gate array (FPGA), digital processor (DSP), embedded devices, etc.
  • the primary device 2 can also be a collection of computer data and instructions organized in a sequence of specific sequences.
  • the master device 2 may also be a combination of a collection of computer data and instructions organized in a specific sequence and electronic devices capable of automatically performing numerical calculations and information processing in accordance with pre-set or stored instructions.
  • the primary device 2 is merely an example, and other existing or future possible primary devices 2 may be applied to the present application as well. It is intended to be included within the scope of this application and is hereby incorporated by reference.
  • step S95 the primary device 2 creates a second data transmission module, and the second data transmission module created by the primary device 2 in the step S95 continues to be used in the step S96 and the step S97.
  • step S96 the master device 2 continuously obtains the access rights of the shared memory allocated by the client device, so that the shared memory allows the master device to perform read and write operations.
  • step S97 the master device 2 continues to pass the The second data transmission module performs data transmission with the shared memory until the primary device 2 stops working.
  • the guest device may be a guest virtual machine (guest), and the primary device may be a privileged virtual machine (host), and one or more non-privileged levels may be implemented by the privileged virtual machine. Management of customer virtual machines.
  • step S95 the primary device 2 creates a second data transmission module.
  • the second data transmission module includes a primary virtual device and a primary drive.
  • the creation of the second data transmission module by the primary device 2 includes: creating a primary virtual device and loading a primary driver of the primary virtual device.
  • the master device 2 increases the master virtual device by modifying the corresponding logic according to the type of the host hypervisor, and the master virtual device is used for the kernel space between the kernel space and the user space and between the host and the guest. Communication between.
  • the virtual memory of the operating system of the primary device (for example, the Linux operating system) is divided into kernel space and user space, and the core software running in the kernel space has all the rights to access the hardware device, and has a higher privilege level; Ordinary applications in user space can only see some of the system resources that they are allowed to use, and cannot use certain system features or direct access to kernel space and hardware devices.
  • the created second data transmission module provides a data transmission channel between the kernel space and the user space, which facilitates the smooth progress of subsequent data transmission.
  • step S96 the master device 2 acquires the access rights of the shared memory allocated by the client device, so that the shared memory allows the master device to perform read and write operations.
  • the guest driver in the first data transmission module of the client device allocates a shared memory when detecting the guest virtual device, the shared memory is located in the kernel space, and allows the second data transmission module
  • the master driver in the access accesses the shared memory.
  • the guest driver in the first data transmission module detects the guest virtual device in the first data transmission module, allocate a transmission page for data transmission, and allocate a control page for controlling data transmission.
  • the transfer page and the control page are both the shared memory page.
  • the shared memory located in the kernel space is used as a transfer station to transmit data, and the existing serial port transmission method In comparison, the data transmission rate is greatly improved, and the operation is simpler and less occupied by system resources than the existing hot-swappable disk.
  • step S97 the primary device 2 performs data transmission with the shared memory through the second data transmission module.
  • the step S97 includes at least one of step S975 (not shown) and step S976 (not shown), wherein in step S975, the master device 2 acquires that the client device is stored in The first to-be-transmitted data of the shared memory, in step S976, the primary-end device 2 stores the second to-be-transmitted data in the shared memory.
  • step S975 the primary device 2 is configured to receive the first data to be transmitted sent by the client device, and the primary device 2 is configured to send the second data to be transmitted to the client device in step S976.
  • the step S97 may include only the step S975, that is, receiving the first to-be-transmitted number sent by the client device; the step S97 may also include only the step S976, that is, sending the first to the client device.
  • the step S97 may further include the step S975 and the step S976, that is, receiving the first data to be transmitted sent by the client device and sending the second data to be transmitted to the client device. At the same time.
  • step S976 the primary device 2 reads the second to-be-transmitted data into the user space, and copies the second to-be-transmitted data from the user space to the shared memory located in the kernel space.
  • the master device 2 reads the second data to be transmitted from the storage medium of the master device 2 to the user space of the master device in the memory, and the shared memory is located in the kernel space of the memory, so the second device The data to be transmitted is copied from the user space to the shared memory.
  • step S976 the master device 2 copies the second to-be-transmitted data read to the user space into the shared memory located in the kernel space, based on the related capacity information of the shared memory. After each copy, the second data transmission message is sent to the client device; after the second data read message returned by the client device is obtained, the next copy is performed until the transmission is completed.
  • the copying is performed in units of the transmission page.
  • the size of the second data to be transmitted is N
  • the size of the data transmitted by the master device 2 is ALREADY
  • the initial value is 0
  • the number of free subpages of the transmission page SEND2 is FREE
  • the initial value of the subpage number A is 0.
  • LEFT N–ALREADY, Whether the LEFT is 0 or not, if yes, the transmission of the second data to be transmitted on the primary device end has ended; if not, determining whether data can be copied to the shared memory through subsequent steps;
  • the third step is to determine whether the size of the data to be copied INPUT is greater than or equal to the subpage size PAGESIZE, and if so, then go to the fourth step, and if not, go to the fifth step;
  • the page number A is incremented by 1, it is judged whether the maximum number of subpages TP of the transmission page SEND2 is reached. If A reaches TP, the value A is assigned to 0, and then third step;
  • step S975 the master device 2 reads the first data to be transmitted stored in the shared memory by the client device, and copies the read first data to be transmitted to the user space, and the The first to-be-transmitted data copied to the user space is stored to the storage medium.
  • the master device 2 copies the first to-be-transmitted data sent by the client device from the shared memory to User space, then copy from user space to storage media.
  • the storage medium refers to a non-volatile storage medium such as, but not limited to, a hard disk, an optical disk, a USB flash drive, an SD card, or the like.
  • step S975 the primary device 2 reads the first data to be transmitted stored in the shared memory by the client device according to the first data transmission message sent by the client device, and the reading is completed. Thereafter, the first data read message is returned to the guest device.
  • the size of the first data to be transmitted is N
  • the size of the data that the primary device 2 has received is GET
  • the initial value is 0, and the first data to be transmitted is copied from the shared memory to the primary device 2
  • the second step waiting for the first data transmission message sent by the client device, after receiving the first data transmission message sent by the client device, according to the length of the transmission page RECEIVE2 in the control page, LEN_SLICE, transmission
  • the page RECEIVE2 subpage number and the information such as the address ADDR of the transmission page RECEIVE2 in the shared memory are sequentially processed and the data in the transmission page RECEIVE2 is copied to the user space, and the primary device 2 copies the first to be transmitted to the user space.
  • the master device 2 returns a first data read message to the client device, and then proceeds to the first step.
  • the method may further include: the primary device 2 performs transmission event communication with the client device before performing data transmission with the shared memory by the second data transmission module,
  • the transmitting event communication includes at least one of the following:
  • the primary device 2 sends second data information about the second data to be transmitted to the client device;
  • the master device 2 acquires first data information about the first to-be-transmitted data sent by the client device.
  • the second to-be-transmitted data is transmitted to the client device, it is stored in a storage medium in a file format, and the second data information includes a storage path of the file, a name of the file, and a length of the file.
  • the first to-be-transmitted data is transmitted to the primary device end, the data is stored in a storage medium, and the first data information includes The storage path of the file, the name of the file, and the length of the file.
  • the transfer command can be placed in a xenstore (a storage device in the Xen virtual environment, and the xenstore is completed based on the event channel).
  • the transmission command includes the second data information and notifies the client device that there is a new command.
  • the client device obtains a transmission command from the xenstore, extracts the second data information, and first checks whether the storage path of the file in the second data information already exists, and if yes, returns an error, and notifies the primary device 2 of the corresponding error.
  • the information then ends the transmission; if not, the file is created according to the storage path of the file in the second data information, and the host device 2 is notified that the transmission command has been accepted and the processing is normal.
  • FIG. 10 illustrates a flow chart of a method for transmitting data in a virtual environment, in accordance with an embodiment of another aspect of the present application.
  • the method includes steps S81' to S83' and steps S95' to S97'.
  • step S81' the client device 1 creates a first data transmission module
  • step S95' the master device 2 creates a second data transmission module
  • step S82' the client device 1 according to the The first data transmission module allocates a shared memory, and the shared memory allows the primary device 2 to perform a read/write operation
  • step S96' the primary device 2 obtains the access permission of the shared memory allocated by the client device 1 to The shared memory is allowed to perform the read and write operations of the primary device 2
  • step S83' the client device 1 performs data transmission with the shared memory through the first data transmission module
  • step S83' includes the following at least Any one of: storing the first data to be transmitted in the shared memory, and acquiring second data to be transmitted stored by the primary device 2 in the
  • steps S81' to S83' are the same as or substantially the same as the contents of steps S81 to S83 in FIG. 8, and steps S95' to S97' are the same as or substantially the same as the contents of steps S95 to S97 in FIG. 9, for the sake of brevity. Therefore, it will not be repeated here, and is included herein by reference.
  • the client device creates a first data transmission module
  • the primary device creates a second data transmission module, the first data transmission module and the second data transmission module.
  • the shared memory located in the kernel space is used as the transfer station to transmit data, which greatly improves the data transmission rate compared with the existing serial port transmission mode, and the operation is relatively simple compared with the existing hot-swappable disk method. System resources are used less.
  • the terminal, the device of the service network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, 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 disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage,
  • computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
  • the present application can be implemented in software and/or a combination of software and hardware, for example, using an application specific integrated circuit (ASIC), a general purpose computer, or any other similar hardware device.
  • the software program of the present application can be executed by a processor to implement the steps or functions described above.
  • the software programs (including related data structures) of the present application can be stored in a computer readable recording medium such as a RAM memory, a magnetic or optical drive or a floppy disk and the like.
  • some of the steps or functions of the present application may be implemented in hardware, for example, as a circuit that cooperates with a processor to perform various steps or functions.
  • a portion of the present application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide a method and/or technical solution in accordance with the present application.
  • the program instructions for invoking the method of the present application may be stored in a fixed or removable recording medium, and/or transmitted by a data stream in a broadcast or other signal bearing medium, and/or stored in a The working memory of the computer device in which the program instructions are run.
  • an embodiment in accordance with the present application includes a device including a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, triggering
  • the apparatus operates based on the aforementioned methods and/or technical solutions in accordance with various embodiments of the present application.

Abstract

L'invention concerne un procédé et un dispositif permettant de transmettre des données dans un environnement virtuel. Le procédé comprend de façon précise les étapes suivantes : un dispositif client crée un premier module de transmission de données et un dispositif de terminal principal crée un second module de transmission de données ; le dispositif client distribue une mémoire partagée située dans un espace central selon le premier module de transmission de données et permettant au dispositif de terminal principal d'effectuer une opération de lecture-d'écriture sur la mémoire partagée ; le dispositif de terminal principal acquiert un droit d'accès de la mémoire partagée ; et le dispositif client ainsi que le dispositif de terminal principal effectuent une transmission de données avec la mémoire partagée par le biais du premier module de transmission de données et du second module de transmission de données respectivement. En prenant une mémoire partagée située dans un espace central en tant que station de transfert pour transmettre des données, un débit de transmission de données est élevé, le fonctionnement est simple et peu de ressources système sont occupées.
PCT/CN2016/089077 2015-07-16 2016-07-07 Procédé et dispositif permettant de transmettre des données dans un environnement virtuel WO2017008675A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510418471.9 2015-07-16
CN201510418471.9A CN106354670A (zh) 2015-07-16 2015-07-16 一种用于虚拟化环境下传输数据的方法与设备

Publications (1)

Publication Number Publication Date
WO2017008675A1 true WO2017008675A1 (fr) 2017-01-19

Family

ID=57756871

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/089077 WO2017008675A1 (fr) 2015-07-16 2016-07-07 Procédé et dispositif permettant de transmettre des données dans un environnement virtuel

Country Status (2)

Country Link
CN (1) CN106354670A (fr)
WO (1) WO2017008675A1 (fr)

Cited By (47)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10423344B2 (en) 2017-09-19 2019-09-24 Robin Systems, Inc. Storage scheme for a distributed storage system
US10430110B2 (en) 2017-12-19 2019-10-01 Robin Systems, Inc. Implementing a hybrid storage node in a distributed storage system
US10430105B2 (en) 2017-09-13 2019-10-01 Robin Systems, Inc. Storage scheme for a distributed storage system
US10430292B2 (en) 2017-12-19 2019-10-01 Robin Systems, Inc. Snapshot deletion in a distributed storage system
US10452308B2 (en) 2017-12-19 2019-10-22 Robin Systems, Inc. Encoding tags for metadata entries in a storage system
US10452267B2 (en) 2017-09-13 2019-10-22 Robin Systems, Inc. Storage scheme for a distributed storage system
US10534549B2 (en) 2017-09-19 2020-01-14 Robin Systems, Inc. Maintaining consistency among copies of a logical storage volume in a distributed storage system
US10579364B2 (en) 2018-01-12 2020-03-03 Robin Systems, Inc. Upgrading bundled applications in a distributed computing system
US10579276B2 (en) 2017-09-13 2020-03-03 Robin Systems, Inc. Storage scheme for a distributed storage system
US10599622B2 (en) 2018-07-31 2020-03-24 Robin Systems, Inc. Implementing storage volumes over multiple tiers
US10620871B1 (en) 2018-11-15 2020-04-14 Robin Systems, Inc. Storage scheme for a distributed storage system
US10628235B2 (en) 2018-01-11 2020-04-21 Robin Systems, Inc. Accessing log files of a distributed computing system using a simulated file system
US10642697B2 (en) 2018-01-11 2020-05-05 Robin Systems, Inc. Implementing containers for a stateful application in a distributed computing system
US10642694B2 (en) 2018-01-12 2020-05-05 Robin Systems, Inc. Monitoring containers in a distributed computing system
US10782887B2 (en) 2017-11-08 2020-09-22 Robin Systems, Inc. Window-based prority tagging of IOPs in a distributed storage system
US10817380B2 (en) 2018-07-31 2020-10-27 Robin Systems, Inc. Implementing affinity and anti-affinity constraints in a bundled application
US10831387B1 (en) 2019-05-02 2020-11-10 Robin Systems, Inc. Snapshot reservations in a distributed storage system
US10845997B2 (en) 2018-01-12 2020-11-24 Robin Systems, Inc. Job manager for deploying a bundled application
US10846137B2 (en) 2018-01-12 2020-11-24 Robin Systems, Inc. Dynamic adjustment of application resources in a distributed computing system
US10846001B2 (en) 2017-11-08 2020-11-24 Robin Systems, Inc. Allocating storage requirements in a distributed storage system
US10877684B2 (en) 2019-05-15 2020-12-29 Robin Systems, Inc. Changing a distributed storage volume from non-replicated to replicated
US10896102B2 (en) 2018-01-11 2021-01-19 Robin Systems, Inc. Implementing secure communication in a distributed computing system
US10908848B2 (en) 2018-10-22 2021-02-02 Robin Systems, Inc. Automated management of bundled applications
US10976938B2 (en) 2018-07-30 2021-04-13 Robin Systems, Inc. Block map cache
US11023328B2 (en) 2018-07-30 2021-06-01 Robin Systems, Inc. Redo log for append only storage scheme
US11036439B2 (en) 2018-10-22 2021-06-15 Robin Systems, Inc. Automated management of bundled applications
US11086725B2 (en) 2019-03-25 2021-08-10 Robin Systems, Inc. Orchestration of heterogeneous multi-role applications
US11099937B2 (en) 2018-01-11 2021-08-24 Robin Systems, Inc. Implementing clone snapshots in a distributed storage system
US11108638B1 (en) 2020-06-08 2021-08-31 Robin Systems, Inc. Health monitoring of automatically deployed and managed network pipelines
US11113158B2 (en) 2019-10-04 2021-09-07 Robin Systems, Inc. Rolling back kubernetes applications
US11226847B2 (en) 2019-08-29 2022-01-18 Robin Systems, Inc. Implementing an application manifest in a node-specific manner using an intent-based orchestrator
US11249851B2 (en) 2019-09-05 2022-02-15 Robin Systems, Inc. Creating snapshots of a storage volume in a distributed storage system
US11256434B2 (en) 2019-04-17 2022-02-22 Robin Systems, Inc. Data de-duplication
US11271895B1 (en) 2020-10-07 2022-03-08 Robin Systems, Inc. Implementing advanced networking capabilities using helm charts
US11347684B2 (en) 2019-10-04 2022-05-31 Robin Systems, Inc. Rolling back KUBERNETES applications including custom resources
US11392363B2 (en) 2018-01-11 2022-07-19 Robin Systems, Inc. Implementing application entrypoints with containers of a bundled application
US11403188B2 (en) 2019-12-04 2022-08-02 Robin Systems, Inc. Operation-level consistency points and rollback
US11456914B2 (en) 2020-10-07 2022-09-27 Robin Systems, Inc. Implementing affinity and anti-affinity with KUBERNETES
US11520650B2 (en) 2019-09-05 2022-12-06 Robin Systems, Inc. Performing root cause analysis in a multi-role application
US11528186B2 (en) 2020-06-16 2022-12-13 Robin Systems, Inc. Automated initialization of bare metal servers
US11556361B2 (en) 2020-12-09 2023-01-17 Robin Systems, Inc. Monitoring and managing of complex multi-role applications
US11582168B2 (en) 2018-01-11 2023-02-14 Robin Systems, Inc. Fenced clone applications
US11740980B2 (en) 2020-09-22 2023-08-29 Robin Systems, Inc. Managing snapshot metadata following backup
US11743188B2 (en) 2020-10-01 2023-08-29 Robin Systems, Inc. Check-in monitoring for workflows
US11750451B2 (en) 2020-11-04 2023-09-05 Robin Systems, Inc. Batch manager for complex workflows
US11748203B2 (en) 2018-01-11 2023-09-05 Robin Systems, Inc. Multi-role application orchestration in a distributed storage system
US11947489B2 (en) 2017-09-05 2024-04-02 Robin Systems, Inc. Creating snapshots of a storage volume in a distributed storage system

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107346260A (zh) * 2017-06-29 2017-11-14 郑州云海信息技术有限公司 一种数据传输方法、装置及系统
CN107402802A (zh) * 2017-07-27 2017-11-28 郑州云海信息技术有限公司 一种基于虚拟机的视频监控存储系统
CN108304461A (zh) * 2017-12-26 2018-07-20 山东浪潮通软信息科技有限公司 一种数据共享的方法及装置
CN111638968B (zh) * 2019-03-01 2024-03-15 维塔科技(北京)有限公司 共享内存访问权限设置方法和装置,电子设备和存储介质
CN113010407A (zh) * 2019-12-20 2021-06-22 上海汽车集团股份有限公司 一种系统信息获取方法、装置及系统
CN112416849A (zh) * 2020-11-25 2021-02-26 杭州和利时自动化有限公司 一种双cpu数据交互方法、装置及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667144A (zh) * 2009-09-29 2010-03-10 北京航空航天大学 一种基于共享内存的虚拟机通信方法
CN101819564A (zh) * 2009-02-26 2010-09-01 国际商业机器公司 协助在虚拟机之间进行通信的方法和装置
CN103593246A (zh) * 2012-08-15 2014-02-19 中国电信股份有限公司 虚拟机和宿主机之间的通信方法、宿主机和虚拟机系统
CN103793330A (zh) * 2012-10-31 2014-05-14 国际商业机器公司 在虚拟机环境中进行数据交换的方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244682B (zh) * 2011-07-19 2014-04-09 中国科学院软件研究所 一种云计算环境下的隐蔽通信方法
CA2862191C (fr) * 2011-12-30 2019-03-12 Cytec Technology Corp. Couche de pelage, procede de preparation de surface et structures composites de liaison l'utilisant

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101819564A (zh) * 2009-02-26 2010-09-01 国际商业机器公司 协助在虚拟机之间进行通信的方法和装置
CN101667144A (zh) * 2009-09-29 2010-03-10 北京航空航天大学 一种基于共享内存的虚拟机通信方法
CN103593246A (zh) * 2012-08-15 2014-02-19 中国电信股份有限公司 虚拟机和宿主机之间的通信方法、宿主机和虚拟机系统
CN103793330A (zh) * 2012-10-31 2014-05-14 国际商业机器公司 在虚拟机环境中进行数据交换的方法和装置

Cited By (47)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11947489B2 (en) 2017-09-05 2024-04-02 Robin Systems, Inc. Creating snapshots of a storage volume in a distributed storage system
US10430105B2 (en) 2017-09-13 2019-10-01 Robin Systems, Inc. Storage scheme for a distributed storage system
US10452267B2 (en) 2017-09-13 2019-10-22 Robin Systems, Inc. Storage scheme for a distributed storage system
US10579276B2 (en) 2017-09-13 2020-03-03 Robin Systems, Inc. Storage scheme for a distributed storage system
US10534549B2 (en) 2017-09-19 2020-01-14 Robin Systems, Inc. Maintaining consistency among copies of a logical storage volume in a distributed storage system
US10423344B2 (en) 2017-09-19 2019-09-24 Robin Systems, Inc. Storage scheme for a distributed storage system
US10782887B2 (en) 2017-11-08 2020-09-22 Robin Systems, Inc. Window-based prority tagging of IOPs in a distributed storage system
US10846001B2 (en) 2017-11-08 2020-11-24 Robin Systems, Inc. Allocating storage requirements in a distributed storage system
US10430110B2 (en) 2017-12-19 2019-10-01 Robin Systems, Inc. Implementing a hybrid storage node in a distributed storage system
US10430292B2 (en) 2017-12-19 2019-10-01 Robin Systems, Inc. Snapshot deletion in a distributed storage system
US10452308B2 (en) 2017-12-19 2019-10-22 Robin Systems, Inc. Encoding tags for metadata entries in a storage system
US10642697B2 (en) 2018-01-11 2020-05-05 Robin Systems, Inc. Implementing containers for a stateful application in a distributed computing system
US11099937B2 (en) 2018-01-11 2021-08-24 Robin Systems, Inc. Implementing clone snapshots in a distributed storage system
US11392363B2 (en) 2018-01-11 2022-07-19 Robin Systems, Inc. Implementing application entrypoints with containers of a bundled application
US10628235B2 (en) 2018-01-11 2020-04-21 Robin Systems, Inc. Accessing log files of a distributed computing system using a simulated file system
US10896102B2 (en) 2018-01-11 2021-01-19 Robin Systems, Inc. Implementing secure communication in a distributed computing system
US11748203B2 (en) 2018-01-11 2023-09-05 Robin Systems, Inc. Multi-role application orchestration in a distributed storage system
US11582168B2 (en) 2018-01-11 2023-02-14 Robin Systems, Inc. Fenced clone applications
US10846137B2 (en) 2018-01-12 2020-11-24 Robin Systems, Inc. Dynamic adjustment of application resources in a distributed computing system
US10845997B2 (en) 2018-01-12 2020-11-24 Robin Systems, Inc. Job manager for deploying a bundled application
US10579364B2 (en) 2018-01-12 2020-03-03 Robin Systems, Inc. Upgrading bundled applications in a distributed computing system
US10642694B2 (en) 2018-01-12 2020-05-05 Robin Systems, Inc. Monitoring containers in a distributed computing system
US10976938B2 (en) 2018-07-30 2021-04-13 Robin Systems, Inc. Block map cache
US11023328B2 (en) 2018-07-30 2021-06-01 Robin Systems, Inc. Redo log for append only storage scheme
US10599622B2 (en) 2018-07-31 2020-03-24 Robin Systems, Inc. Implementing storage volumes over multiple tiers
US10817380B2 (en) 2018-07-31 2020-10-27 Robin Systems, Inc. Implementing affinity and anti-affinity constraints in a bundled application
US10908848B2 (en) 2018-10-22 2021-02-02 Robin Systems, Inc. Automated management of bundled applications
US11036439B2 (en) 2018-10-22 2021-06-15 Robin Systems, Inc. Automated management of bundled applications
US10620871B1 (en) 2018-11-15 2020-04-14 Robin Systems, Inc. Storage scheme for a distributed storage system
US11086725B2 (en) 2019-03-25 2021-08-10 Robin Systems, Inc. Orchestration of heterogeneous multi-role applications
US11256434B2 (en) 2019-04-17 2022-02-22 Robin Systems, Inc. Data de-duplication
US10831387B1 (en) 2019-05-02 2020-11-10 Robin Systems, Inc. Snapshot reservations in a distributed storage system
US10877684B2 (en) 2019-05-15 2020-12-29 Robin Systems, Inc. Changing a distributed storage volume from non-replicated to replicated
US11226847B2 (en) 2019-08-29 2022-01-18 Robin Systems, Inc. Implementing an application manifest in a node-specific manner using an intent-based orchestrator
US11249851B2 (en) 2019-09-05 2022-02-15 Robin Systems, Inc. Creating snapshots of a storage volume in a distributed storage system
US11520650B2 (en) 2019-09-05 2022-12-06 Robin Systems, Inc. Performing root cause analysis in a multi-role application
US11347684B2 (en) 2019-10-04 2022-05-31 Robin Systems, Inc. Rolling back KUBERNETES applications including custom resources
US11113158B2 (en) 2019-10-04 2021-09-07 Robin Systems, Inc. Rolling back kubernetes applications
US11403188B2 (en) 2019-12-04 2022-08-02 Robin Systems, Inc. Operation-level consistency points and rollback
US11108638B1 (en) 2020-06-08 2021-08-31 Robin Systems, Inc. Health monitoring of automatically deployed and managed network pipelines
US11528186B2 (en) 2020-06-16 2022-12-13 Robin Systems, Inc. Automated initialization of bare metal servers
US11740980B2 (en) 2020-09-22 2023-08-29 Robin Systems, Inc. Managing snapshot metadata following backup
US11743188B2 (en) 2020-10-01 2023-08-29 Robin Systems, Inc. Check-in monitoring for workflows
US11456914B2 (en) 2020-10-07 2022-09-27 Robin Systems, Inc. Implementing affinity and anti-affinity with KUBERNETES
US11271895B1 (en) 2020-10-07 2022-03-08 Robin Systems, Inc. Implementing advanced networking capabilities using helm charts
US11750451B2 (en) 2020-11-04 2023-09-05 Robin Systems, Inc. Batch manager for complex workflows
US11556361B2 (en) 2020-12-09 2023-01-17 Robin Systems, Inc. Monitoring and managing of complex multi-role applications

Also Published As

Publication number Publication date
CN106354670A (zh) 2017-01-25

Similar Documents

Publication Publication Date Title
WO2017008675A1 (fr) Procédé et dispositif permettant de transmettre des données dans un environnement virtuel
EP3608792B1 (fr) Commutation gérée entre un ou plusieurs hôtes et commandes à l'état solide (ssds) basées sur le protocole nvme pour fournir des services de stockage d'hôtes
US9098302B2 (en) System and apparatus to improve boot speed in serial peripheral interface system using a baseboard management controller
WO2015149673A1 (fr) Procédé, serveur et système de partage du contenu
US20190243757A1 (en) Systems and methods for input/output computing resource control
US11797490B2 (en) Multi-cloud bi-directional storage replication system and techniques
US9916205B2 (en) Secure live virtual machine guest based snapshot recovery
US9244877B2 (en) Link layer virtualization in SATA controller
CN114281484B (zh) 数据传输方法、装置、设备及存储介质
WO2022021896A1 (fr) Procédé et appareil de communication interprocessus
US9542112B2 (en) Secure cross-process memory sharing
US10977049B2 (en) Installing of operating system
CN115185880B (zh) 一种数据存储方法及装置
CN115840620B (zh) 一种数据通路构建方法、设备及介质
CN112256460A (zh) 进程间通信方法、装置、电子设备及计算机可读存储介质
US8984179B1 (en) Determining a direct memory access data transfer mode
US20190163657A1 (en) Technologies for stable secure channel identifier mapping for static and dynamic devices
TWI611344B (zh) 記憶體系統協定中提供檔案資訊之系統及方法
US20130247065A1 (en) Apparatus and method for executing multi-operating systems
KR20180023543A (ko) 시리얼 통신으로 메모리를 제공하기 위한 장치 및 방법
CN117349870B (zh) 基于异构计算的透明加解密计算系统、方法、设备和介质
US11914879B2 (en) Storage controller and storage system comprising the same
US11442668B2 (en) Prioritizing volume accesses in multi-volume storage device based on execution path of a service
WO2024060193A1 (fr) Procédé et appareil de fonctionnement appliqués à un dispositif informatique, et dispositif informatique
WO2022121385A1 (fr) Procédé d'accès à un fichier, nœud de stockage et carte réseau

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16823822

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16823822

Country of ref document: EP

Kind code of ref document: A1