CN115580644B - Method, apparatus, device and storage medium for communication between client systems in host - Google Patents

Method, apparatus, device and storage medium for communication between client systems in host Download PDF

Info

Publication number
CN115580644B
CN115580644B CN202211563268.7A CN202211563268A CN115580644B CN 115580644 B CN115580644 B CN 115580644B CN 202211563268 A CN202211563268 A CN 202211563268A CN 115580644 B CN115580644 B CN 115580644B
Authority
CN
China
Prior art keywords
client system
data
shared memory
communication
target shared
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211563268.7A
Other languages
Chinese (zh)
Other versions
CN115580644A (en
Inventor
曾学忠
杨冬东
董红光
董俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202211563268.7A priority Critical patent/CN115580644B/en
Publication of CN115580644A publication Critical patent/CN115580644A/en
Application granted granted Critical
Publication of CN115580644B publication Critical patent/CN115580644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present disclosure relates to a method, an apparatus, a device and a storage medium for communication between client systems in a host, and relates to the technical field of computers. The method comprises the following steps: receiving a communication request sent by a first client system, wherein the communication request comprises data to be transmitted and a second client system identifier for receiving the data to be transmitted; determining a target shared memory associated with the first client system identifier and the second client system identifier; and writing the data to be transmitted into the target shared memory so that the second client system acquires the data to be transmitted from the target shared memory. Therefore, the memory sharing among the client systems in the host machine can be realized, the zero copy is realized, the real-time performance is very good, the communication efficiency among the client systems is improved, the communication time is shortened, and the user experience is improved.

Description

Method, apparatus, device and storage medium for communication between client systems in host
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for communication between client systems in a host.
Background
In the related technology, the Open vSwitch can realize high-quality forwarding of intersystem packets, including forwarding in a host machine among multiple client systems in the host machine, and can meet most application scenarios. However, the technology based on the network protocol stack has a complex and time-consuming process for the client system to communicate.
Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
An embodiment of the first aspect of the present disclosure provides a method for communication between client systems in a host, including:
receiving a communication request sent by a first client system, wherein the communication request comprises data to be transmitted and a second client system identifier for receiving the data to be transmitted;
determining a target shared memory associated with the first client system identifier and the second client system identifier;
and writing the data to be transmitted into the target shared memory so that the second client system acquires the data to be transmitted from the target shared memory.
An embodiment of a second aspect of the present disclosure provides a communication device between client systems in a host, including:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a communication request sent by a first client system, and the communication request comprises data to be transmitted and a second client system identifier for receiving the data to be transmitted;
a determining module, configured to determine a target shared memory associated with the first client system identifier and the second client system identifier;
and the obtaining module is used for writing the data to be transmitted into the target shared memory so as to enable the second client system to obtain the data to be transmitted from the target shared memory.
A third embodiment of the present disclosure provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the communication method between client systems in a host as set forth in the first embodiment.
A fourth aspect of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to the first aspect.
A fifth aspect of the present disclosure provides a computer program product, which includes a computer program that, when being executed by a processor, implements the steps of the method according to the first aspect.
In the embodiment of the disclosure, a host computer first receives a communication request sent by a first client system, where the communication request includes data to be transmitted and a second client system identifier for receiving the data to be transmitted, then determines a target shared memory associated with the first client system identifier and the second client system identifier, and then writes the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory. Therefore, the memory sharing among the client systems in the host machine can be realized, the zero copy is realized, the real-time performance is very good, the communication efficiency among the client systems is improved, the communication time is shortened, and the user experience is improved.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
FIG. 1 is a flow diagram illustrating a method for communication between client systems in a host according to one embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram illustrating a method for communication between client systems in a host according to yet another embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a method for communication between client systems in a host according to another embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a communication device between client systems in a host according to an embodiment of the present disclosure;
FIG. 5 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are illustrative and intended to explain the present disclosure, and should not be construed as limiting the present disclosure.
It should be noted that the Host (Host) is a dedicated physical server deploying a virtualized environment, and may use the entire physical server, physically isolated from the servers of other clients. In the embodiment of the present disclosure, a host kernel may be used as an execution subject for executing a communication method between client systems in a host. Multiple "Virtual machines" (VMs) may be running on a host, also known as guests. The current Open vSwitch technology realizes communication between client systems through a network protocol, has poor real-time performance, and brings great consumption to hardware performance. The communication method between the client systems in the host machine provided by the embodiment of the disclosure is used for solving the problem of how to perform efficient communication between different client systems in the host machine and reducing the influence on the host machine system.
A method, an apparatus, a device, and a storage medium for communication between client systems in a host according to an embodiment of the present disclosure are described below with reference to the drawings.
Fig. 1 is a flow chart illustrating a method for communication between client systems in a host according to an embodiment of the disclosure. As shown in fig. 1, the method includes:
step 101, a communication request sent by a first client system is received, wherein the communication request comprises data to be transmitted and a second client system identifier for receiving the data to be transmitted.
The first client system may be any client system currently installed in the device, and in the present disclosure, the first client system may be a client system that initiates data transmission.
Wherein the second client system may be the peer client system to which the first client system is currently initiating communication.
The second client system identifier may be an identification number (ID) of the second client system, or any other information used to characterize the first client system, such as a specific character, a specific field, and a specific letter, which is not limited herein.
When the first client system needs to communicate with the second client system, that is, data transmission is performed, a communication request may be sent to the host kernel, so that the host kernel may receive the communication request sent by the first client system.
The data to be transmitted may be voice data, image data, text data, and the like, which are not limited herein. Optionally, the communication request may further include a data amount and a data type of the data to be transmitted, which is not limited herein.
Step 102, determining a target shared memory associated with the first client system identifier and the second client system identifier.
The first client system identifier may be an identification number (ID) of the first client system, or any other information used to characterize the first client system, such as a specific character, a specific field, and a specific letter, which is not limited herein.
A shared memory (shared memory) may be a specific memory area that allows a plurality of different processes to access. Different processes can realize data sharing and interaction by accessing the same internal memory area, thereby realizing interprocess communication (IPC).
In the embodiment of the present disclosure, the shared memory may be a specific memory region pre-allocated in the host kernel. Optionally, a segment of Guest Physical Address (GPA) may be expanded in advance in the Guest system to serve as an interval for receiving the shared memory.
The target shared memory may be a shared memory associated with the current first client system identifier and the current second client system identifier.
The Host kernel may determine, according to the first guest system identifier and the second guest system identifier, a target shared memory currently in the Host, that is, an actual physical address (HPA) allocated in advance in the Host kernel.
Specifically, a mapping relationship table may be stored in advance, and is used to record a plurality of first client system identifiers and target shared memories corresponding to the second client system identifiers.
For example, if the current host has 3 client systems, which are client system a, client system B, and client system C. The identifiers corresponding to the guest system a, the guest system B, and the guest system C are OS1, OS2, and OS3, respectively, so that the shared memories A1 and A2 corresponding to the OS1 and the OS2, the shared memory A2 corresponding to the OS2 and the OS3, and the shared memory A3 corresponding to the OS1 and the OS3 may be pre-allocated in the host kernel, which is not limited herein.
For example, if the current first guest system is identified as OS1 and the second guest system is identified as OS3, the shared memory A3 corresponding to OS1 and OS3 may be used as the target shared memory, which is not limited herein.
Step 103, writing the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory.
Specifically, the host kernel may write the data to be transmitted into the target shared memory from the client memory GPA in the first client system, that is, the actual physical address in the host kernel, so that the second client system obtains the data to be transmitted from the target shared memory.
Optionally, when there is an executing process in the host, the data to be transmitted and the target shared memory identifier may be added to the scheduling queue associated with the first virtual processor.
In the embodiment of the present disclosure, the scheduling queue may be an RT scheduled Class real-time scheduling queue. Because there is an executing process in the host, that is, there is a real-time scheduling queue in the host processor, the host kernel may bind the thread associated with the first virtual processor to the scheduling queue. Specifically, the data to be transmitted and the target shared memory identifier may be added to the scheduling queue, so that the thread associated with the first virtual processor may be bound to the scheduling queue, and the thread corresponding to the first virtual processor may be responded to more quickly, thereby improving the current communication speed and enabling data transmission to be more efficient.
In the embodiment of the disclosure, a host computer first receives a communication request sent by a first client system, where the communication request includes data to be transmitted and a second client system identifier for receiving the data to be transmitted, then determines a target shared memory associated with the first client system identifier and the second client system identifier, and then writes the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory. Therefore, memory sharing among the client systems in the host can be realized, zero copy is realized, the real-time performance is very good, the communication efficiency among the client systems is improved, the communication time is shortened, and the user experience is improved.
Fig. 2 is a flow chart illustrating a method of communication between client systems in a host according to an embodiment of the disclosure. As shown in fig. 2, the method includes:
step 201, receiving a registration request sent by the first client system, where the registration request includes a first client system identifier.
The registration request may provide a request of the virtual hardware for a request sent by the first guest system to the host kernel, where the registration request includes an identifier of the first guest system.
In the embodiment of the present disclosure, the virtual hardware may be a virtual processor, or may also be a virtual memory. The first client system may send a registration request to the host Kernel in advance, so that the host Kernel, after receiving the request, extends a corresponding client memory (GPA) for the first client system by using a corresponding device node, such as a KVM (Kernel-based Virtual Machine).
Optionally, the registration request may further include a service identifier, where the service identifier is used to characterize any service that the first client system may provide. Therefore, after the host receives the first client system identifier and the service identifier included in the registration request sent by the first client system, the corresponding virtual processor corresponding to the service can be provided according to the service corresponding to the service identifier and the first client system.
At step 202, a first virtual processor is allocated for a first guest system.
The first virtual processor is a virtual hardware vCPU corresponding to the first guest system. The vCPU may be equivalent to a thread of the host processor, which may participate in the scheduling of the host processor, using the computational resources of the host processor.
Thus, in the present disclosure, the corresponding first virtual processor may be allocated to the first guest system, so that the first guest system may participate in the scheduling of the host processor based on the first virtual processor, and further may use the computing resource of the host processor.
Optionally, the host Kernel may allocate a corresponding first Virtual processor to the first guest system through a KVM (Kernel-based Virtual Machine).
Step 203, the first virtual processor identification is sent to the first guest system.
Specifically, after the first virtual processor is allocated to the first guest system, identification information corresponding to the first virtual processor may be sent to the first guest system.
Step 204, a communication request sent by the first guest system based on the first virtual processor is received.
It should be noted that, because the first virtual processor is a virtual processor allocated to the first client system, the first client system may send a communication request based on the first virtual processor, so that the first client system may communicate with a peer client to which data is to be transmitted, that is, the second client system.
Step 205, determine the target shared memory associated with the first client system id and the second client system id.
Step 206, writing the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory.
It should be noted that, for specific implementation manners of steps 205 and 206, reference may be made to the foregoing embodiments, which are not described herein again.
Step 207, triggering execution of an interrupt event associated with the target shared memory, where the interrupt event is an event that the second guest system reads data from the target shared memory.
The interrupt event may be an event that the second guest system reads data from the target shared memory.
Specifically, the host kernel may trigger an interrupt event associated with the target shared memory after writing the data to be transmitted into the target shared memory, so that the second client system reads the data from the target shared memory.
Optionally, the host kernel may trigger an interrupt event associated with the target shared memory according to a preset mapping relationship, so that the second client system may use a hardware resource of the host kernel based on the interrupt, and use a virtual processor customized in advance for the second client system by the host kernel, thereby achieving mutual communication.
In the embodiment of the disclosure, a host kernel first receives a registration request sent by a first client system, where the registration request includes a first client system identifier, then allocates a first virtual processor to the first client system, then sends the first virtual processor identifier to the first client system, then receives a communication request sent by the first client system based on the first virtual processor, then determines a target shared memory associated with the first client system identifier and a second client system identifier, then writes data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory, and finally triggers an interrupt event associated with the target shared memory to be executed, where the interrupt event is an event in which the second client system reads data from the target shared memory. Therefore, the second client can read data from the target shared memory by cooperation of the client system and the host machine, customization of the virtual processor and triggering of a specific interrupt event, the response speed is very high, large data is transmitted in a shared memory mode, the real-time performance is good, and the complexity is very low.
FIG. 3 is a flowchart illustrating a method for communication between client systems in a host according to an embodiment of the present disclosure. As shown in fig. 3, the method includes:
step 301, receiving a communication registration request sent by a first client system, where the communication registration request includes a data volume to be communicated and a second client system identifier.
It should be noted that, before the communication between the client systems, the communication registration may be performed in advance, that is, the data volume to be communicated and the communication object may be recorded, so that the host may communicate in the pre-registered communication mode directly during the operation.
For example, the communication registration request may include the type of data to be communicated as: the data S is displayed, the amount of data to be transmitted is 1M, and the first client system identifier a and the second client system identifier B are not limited herein.
Optionally, the host kernel may further determine a scheduling queue associated with the first virtual processor according to the type of the data to be communicated, where response priorities of different scheduling queues are different.
Specifically, the types of data to be communicated processed in different scheduling queues may be different, and thus the scheduling queue associated with the first virtual processor may be determined according to the type of data to be communicated.
Thereby, the data types to be communicated can be matched to the corresponding scheduling queue. For example, if the data type to be communicated is a predetermined important data type, it may be allocated to a scheduling queue with a higher response priority.
Step 302, according to the data amount to be communicated, a target shared memory is obtained from the system memory.
The system memory may be a memory of the current host system, that is, an actual physical address.
It should be noted that, after receiving the registration request, the host kernel obtains the corresponding target shared memory from the system memory according to the data amount to be communicated included in the registration request.
The target shared memory may correspond to a data volume to be communicated, and if the data volume to be communicated is large, the obtained target shared memory may be large.
Step 303, sending the identifier of the target shared memory to the first client system and the second client system, respectively.
After the target shared memory between the second client system and the first client system is allocated, the identifier of the target shared memory may be sent to the first client system and the second client system, respectively.
The identifier of the target shared memory may include an address and a size of the target shared memory in the system memory.
Step 304, receiving a communication request sent by the first client system, wherein the communication request includes data to be transmitted and a second client system identifier for receiving the data to be transmitted.
Step 305 determines a target shared memory associated with the first client system identifier and the second client system identifier.
Step 306, writing the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory.
It should be noted that, for specific implementation manners of steps 304, 305, and 306, reference may be made to the foregoing embodiments, which are not described herein again.
In the embodiment of the disclosure, a host kernel first receives a communication registration request sent by a first client system, where the communication registration request includes a data volume to be communicated and a second client system identifier, then obtains a target shared memory from a system memory according to the data volume to be communicated, then sends the identifier of the target shared memory to the first client system and the second client system respectively, and then receives a communication request sent by the first client system, where the communication request includes data to be transmitted and the second client system identifier for receiving the data to be transmitted, then determines the target shared memory associated with the first client system identifier and the second client system identifier, and then writes the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory. Therefore, the corresponding target shared memory can be customized by registering in advance according to the data volume and the communication object of the data to be communicated, so that the host kernel can directly distribute the corresponding target shared memory for the first client system and the second client system to communicate according to the communication mode registered in advance, the real-time performance of data transmission is better, and the complexity is low.
Fig. 4 is a schematic diagram of a communication device between client systems in a host according to an embodiment of the disclosure.
As shown in fig. 4, the communication apparatus 400 between client systems in the host includes: the device comprises a receiving module 410, a determining module 420 and an obtaining module 430.
A receiving module 410, configured to receive a communication request sent by a first client system, where the communication request includes data to be transmitted and a second client system identifier for receiving the data to be transmitted;
a determining module 420, configured to determine a target shared memory associated with the first client system identifier and the second client system identifier;
an obtaining module 430, configured to write the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory.
Optionally, the receiving module includes:
and the receiving unit is used for receiving a communication request sent by the first client system based on the first virtual processor.
Optionally, the receiving unit is further configured to:
receiving a registration request sent by the first client system, wherein the registration request comprises a first client system identifier;
allocating a first virtual processor to said first guest system;
sending the first virtual processor identification to the first guest system.
Optionally, the obtaining module is specifically configured to:
and under the condition that the host machine has a process which is executed, adding the data to be transmitted and the target shared memory identification into a scheduling queue associated with the first virtual processor.
Optionally, the obtaining module is further configured to:
and triggering and executing an interrupt event associated with the target shared memory, wherein the interrupt event is an event that the second client system reads data from the target shared memory.
Optionally, the receiving unit further includes:
a receiving subunit, configured to receive a communication registration request sent by the first client system, where the communication registration request includes a data volume to be communicated and the second client system identifier;
the acquiring subunit is configured to acquire the target shared memory from a system memory according to the data amount to be communicated;
and the sending subunit is configured to send the identifier of the target shared memory to the first client system and the second client system, respectively.
Optionally, the receiving subunit is further configured to:
and determining a scheduling queue associated with the first virtual processor according to the type of the data to be communicated, wherein the response priorities of different scheduling queues are different.
In the embodiment of the disclosure, a host computer first receives a communication request sent by a first client system, where the communication request includes data to be transmitted and a second client system identifier for receiving the data to be transmitted, then determines a target shared memory associated with the first client system identifier and the second client system identifier, and then writes the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory. Therefore, memory sharing among the client systems in the host can be realized, zero copy is realized, the real-time performance is very good, the communication efficiency among the client systems is improved, the communication time is shortened, and the user experience is improved.
The functions and specific implementation principles of the modules in the embodiments of the present disclosure may refer to the embodiments of the methods, and are not described herein again.
In order to implement the above embodiment, the present disclosure further provides an electronic device, including: the present invention relates to a host computer, and more particularly to a host computer, and a communication method between client systems in the host computer.
In order to implement the foregoing embodiments, the present disclosure further provides a non-transitory computer-readable storage medium storing a computer program, where the computer program is executed by a processor to implement the communication method between client systems in hosts as set forth in the foregoing embodiments of the present disclosure.
In order to implement the foregoing embodiments, the present disclosure further provides a computer program product, which when executed by an instruction processor in the computer program product, performs the communication method between client systems in a host as set forth in the foregoing embodiments of the present disclosure.
FIG. 5 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitations to the functionality and scope of use of the disclosed embodiments.
As shown in FIG. 5, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro Channel Architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the disclosure.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet via the Network adapter 20. As shown, the network adapter 20 communicates with the other modules of the electronic device 12 over the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Further, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are well known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. While embodiments of the present disclosure have been shown and described above, it will be understood that the above embodiments are exemplary and not to be construed as limiting the present disclosure, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.

Claims (8)

1. A method for communication between client systems in a host, comprising:
receiving a communication request sent by a first client system, wherein the communication request comprises data to be transmitted and a second client system identifier for receiving the data to be transmitted;
determining a target shared memory associated with a first client system identifier and the second client system identifier;
writing the data to be transmitted into the target shared memory so that the second client system can acquire the data to be transmitted from the target shared memory;
before the receiving the communication request sent by the first client system, the method further comprises:
receiving a communication registration request sent by the first client system, wherein the communication registration request comprises a data volume to be communicated and the second client system identification;
acquiring the target shared memory from a system memory according to the data volume to be communicated, wherein the system memory is the memory of the current host system;
respectively sending the identifier of the target shared memory to the first client system and the second client system;
the communication registration request further includes a data type to be communicated, and after receiving the communication registration request sent by the first client system, the method further includes:
and determining a scheduling queue associated with the first virtual processor distributed to the first client system according to the data type to be communicated, wherein the response priority of different scheduling queues is different.
2. The method of claim 1, wherein receiving a communication request sent by a first client system comprises:
and receiving a communication request sent by the first client system based on the first virtual processor.
3. The method of claim 2, prior to said receiving a communication request sent by a first client system, further comprising:
receiving a registration request sent by the first client system, wherein the registration request comprises a first client system identifier;
allocating a first virtual processor to said first guest system;
sending the first virtual processor identification to the first guest system.
4. The method of claim 1, wherein writing the data to be transmitted to the target shared memory comprises:
and under the condition that the host machine has the process which is executed, adding the data to be transmitted and the target shared memory identification into a scheduling queue associated with the first virtual processor.
5. The method of claim 1, wherein after the writing the data to be transmitted into the target shared memory, further comprising:
and triggering and executing an interrupt event associated with the target shared memory, wherein the interrupt event is an event that the second client system reads data from the target shared memory.
6. A device for communicating between client systems in a host, comprising:
the receiving module is used for receiving a communication request sent by a first client system, wherein the communication request comprises data to be transmitted and a second client system identifier for receiving the data to be transmitted;
a determining module, configured to determine a target shared memory associated with the first client system identifier and the second client system identifier;
an obtaining module, configured to write the data to be transmitted into the target shared memory, so that the second client system obtains the data to be transmitted from the target shared memory;
wherein, the receiving module specifically includes:
a receiving subunit, configured to receive a communication registration request sent by the first client system, where the communication registration request includes a data amount to be communicated, the identifier of the second client system, and a data type to be communicated;
an obtaining subunit, configured to obtain the target shared memory from a system memory according to the data amount to be communicated, where the system memory is a memory of a current host system;
a sending subunit, configured to send the identifier of the target shared memory to the first client system and the second client system, respectively;
the receiving subunit is further configured to: and determining a scheduling queue associated with the first virtual processor allocated to the first client system according to the type of the data to be communicated, wherein the response priority of different scheduling queues is different.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a method of communication between client systems in a host as claimed in any one of claims 1 to 5 when executing the program.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a method of communication between client systems in a host according to any one of claims 1 to 5.
CN202211563268.7A 2022-12-07 2022-12-07 Method, apparatus, device and storage medium for communication between client systems in host Active CN115580644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211563268.7A CN115580644B (en) 2022-12-07 2022-12-07 Method, apparatus, device and storage medium for communication between client systems in host

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211563268.7A CN115580644B (en) 2022-12-07 2022-12-07 Method, apparatus, device and storage medium for communication between client systems in host

Publications (2)

Publication Number Publication Date
CN115580644A CN115580644A (en) 2023-01-06
CN115580644B true CN115580644B (en) 2023-04-07

Family

ID=84590589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211563268.7A Active CN115580644B (en) 2022-12-07 2022-12-07 Method, apparatus, device and storage medium for communication between client systems in host

Country Status (1)

Country Link
CN (1) CN115580644B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118113496A (en) * 2024-04-29 2024-05-31 北京芯驰半导体科技股份有限公司 Inter-process communication method, system and chip based on multi-core heterogeneous SOC

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9606827B2 (en) * 2015-03-24 2017-03-28 International Business Machines Corporation Sharing memory between guests by adapting a base address register to translate pointers to share a memory region upon requesting for functions of another guest
CN106612306A (en) * 2015-10-22 2017-05-03 中兴通讯股份有限公司 Data sharing method and device of virtual machine
WO2019127191A1 (en) * 2017-12-28 2019-07-04 深圳前海达闼云端智能科技有限公司 File system sharing method and apparatus for multi-operating system, and electronic device
CN113590254A (en) * 2020-04-30 2021-11-02 深信服科技股份有限公司 Virtual machine communication method, device, system and medium

Also Published As

Publication number Publication date
CN115580644A (en) 2023-01-06

Similar Documents

Publication Publication Date Title
US10936535B2 (en) Providing remote, reliant and high performance PCI express device in cloud computing environments
CN112099941B (en) Method, equipment and system for realizing hardware acceleration processing
CN107077377B (en) Equipment virtualization method, device and system, electronic equipment and computer program product
EP2622470B1 (en) Techniques for load balancing gpu enabled virtual machines
WO2018120986A1 (en) Method for forwarding packet and physical host
US9086907B2 (en) Apparatus and method for managing virtual machine addresses
US8447891B2 (en) Dynamically assigning virtual functions to client applications
JP2012530295A (en) Method, apparatus, and program for monitoring computer activity of a plurality of virtual computing devices
US9104452B2 (en) Hybrid remote sessions
CN112650558B (en) Data processing method and device, readable medium and electronic equipment
CN107689987B (en) Virtual network service exposure method and device
CN115580644B (en) Method, apparatus, device and storage medium for communication between client systems in host
WO2023179388A1 (en) Hot migration method for virtual machine instance
CN116774933A (en) Virtualization processing method of storage device, bridging device, system and medium
CN113824622A (en) Method and device for controlling communication between containers, computer equipment and storage medium
CN115080479B (en) Transmission method, server, device, bare metal instance and baseboard management controller
US11061746B2 (en) Enqueue-related processing based on timing out of an attempted enqueue
CN114281252A (en) Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus
CN115576654A (en) Request processing method, device, equipment and storage medium
CN106598696B (en) Method and device for data interaction between virtual machines
CN117834561A (en) Network I/O processing method and device based on SPDK
US10642639B2 (en) Static IP retention for multi-homed VMs on migration
CN111158911A (en) Processor configuration method and device, processor and network equipment
US10747567B2 (en) Cluster check services for computing clusters
CN113535370A (en) Method and equipment for realizing multiple RDMA network card virtualization of load balancing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant