Information communication method, device and computer readable storage medium
By intercepting the delivery event of the virtual address in the cloud computing platform and calculating the real address, the problem of low communication efficiency between processors in the cloud computing platform is solved and more efficient information communication is achieved.
Patent Information
- Application Number
- CN201910743411.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-13
- Publication Date
- 2024-08-20
- Estimated Expiration
- 2040-05-13
AI Technical Summary
In cloud computing platforms, point-to-point communication between processors requires real-time address translation of virtual physical addresses through the peripheral memory management unit, resulting in increased communication time and poor efficiency.
When receiving a communication instruction, determine the status information of the access control service. When detecting the preset status information, intercept the virtual address of the target processor and write the transfer event of the source processor, calculate the real address based on the preset relationship, and Write it to the source processor to communicate information between processors.
By avoiding the time it takes for virtual addresses to be translated through upstream devices, the efficiency of information communication is significantly improved and information communication failures caused by using virtual addresses for communication are avoided.
Smart Images

Figure CN111190837B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer communication technology, and in particular to an information communication method, device and computer-readable storage medium. Background Art
[0002] With the development of computer and Internet technology, virtualization technology has developed rapidly. Platforms that use virtualization technology hide the actual physical characteristics of a specific computing platform. Multiple operating systems can run on one platform, and each operating system can access the resources it needs when needed, thereby providing users with an abstract, simulated computing environment (i.e., virtual machines). These virtual machines run in independent spaces without affecting each other, significantly improving the work efficiency of computers or servers.
[0003] In the prior art, a specific application of virtual machines is the cloud computing platform. The cloud computing platform uses virtualization technology to virtualize multiple similar independent cloud hosts from a large number of distributed computer clusters, which can provide enterprises or individuals with a dynamic and easy-to-expand Internet service model with virtualized resources, so that enterprises or individuals can access cloud hosts and storage systems according to their needs, and thus quickly enjoy powerful information technology resources through cloud hosts and cloud computing services, avoid complex system management, and reduce costs.
[0004] In the process of research and practice of the prior art, the inventor of the present application discovered that in the prior art, when the processors inside the cloud host communicate with each other in peer-to-peer (P2P), it is necessary to perform real-time address translation of the virtual physical address of the processor through an external memory management unit, which leads to increased communication time and poor communication efficiency. Summary of the invention
[0005] The embodiments of the present application provide an information communication method, device, and computer-readable storage medium, aiming to improve the efficiency of information communication.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] An information communication method, comprising:
[0008] upon receiving the communication instruction, determining status information of the access control service;
[0009] When it is detected that the state information is preset state information, intercepting a transfer event of writing the virtual address of the target processor to the source processor;
[0010] Calculate the real address according to the preset relationship and the virtual address;
[0011] The real address is written into the source processor, and the source processor responds to the communication instruction, so that the source processor realizes information communication with the target processor according to the real address.
[0012] An information communication device, comprising:
[0013] a determination unit, configured to determine status information of the access control service upon receiving the communication instruction;
[0014] An interception unit, configured to intercept a transfer event of writing a virtual address of a target processor to a source processor when detecting that the state information is preset state information;
[0015] A calculation unit, used for calculating a real address according to a preset relationship and the virtual address;
[0016] The communication unit is used to write the real address into the source processor and respond to the communication instruction so that the source processor can realize information communication with the target processor according to the real address.
[0017] In some embodiments, the communication unit is specifically configured to:
[0018] Replacing the virtual address in the transfer event with the real address;
[0019] Initiate the transfer event and write the replaced real address into the corresponding target register of the source processor;
[0020] In response to the communication instruction, the source processor realizes information communication with the target processor according to the real address.
[0021] In some embodiments, the computing unit is specifically configured to:
[0022] Get the virtual address and the corresponding target address offset;
[0023] The virtual address is offset according to the target address offset to obtain a corresponding real address.
[0024] In some embodiments, the information communication device further includes:
[0025] an acquisition unit, configured to acquire a target address offset and a corresponding real address of the target processor when it is detected that a memory-mapped input / output address is allocated to the target processor;
[0026] The de-offset unit is used to perform de-offset processing on the real address according to the target address offset to obtain a corresponding virtual address.
[0027] In some embodiments, the information communication device further includes:
[0028] The control unit is used to control the access control service of the downlink in the high-speed serial computer expansion bus link to close the point-to-point redirection request, so as to close the operation of translating the virtual address into the real address through the peripheral memory management unit.
[0029] An embodiment of the present invention further provides a computer-readable storage medium, which stores processor-executable instructions, and the instructions are loaded by one or more processors to execute the above-mentioned information communication method.
[0030] When receiving a communication instruction, the embodiment of the present application determines the status information of the access control service; when the status information is detected to be the preset status information, the transfer event of the virtual address of the target processor being written to the source processor is intercepted; the real address is calculated according to the preset relationship and the virtual address; the real address is written into the source processor, and the communication instruction is responded to, so that the source processor realizes information communication with the target processor according to the real address. In this way, when performing information communication, the transfer event of writing the virtual address of the target processor into the source processor is intercepted, the real address is calculated according to the preset relationship and the virtual address, and the real address is written into the source processor. On the premise of saving the time for translating the virtual address through the upstream device, it also avoids the failure of information communication caused by the source processor using the virtual address for communication, which greatly improves the efficiency of information communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 is a scenario schematic diagram of an information communication system provided by an embodiment of the present application;
[0033] Figure 2 It is a flowchart of the information communication method provided by the embodiment of the present application;
[0034] Figure 3 is another flow chart of the information communication method provided by an embodiment of the present application;
[0035] Figure 4a A schematic diagram of the structure of a high-speed serial computer expansion bus provided in an embodiment of the present application;
[0036] Figure 4b A schematic diagram of the structure of a high-speed serial computer expansion bus link provided in an embodiment of the present application;
[0037] Figure 5ais a schematic diagram of the structure of an information communication device provided in an embodiment of the present application;
[0038] Figure 5b is another structural schematic diagram of the information communication device provided in an embodiment of the present application;
[0039] Figure 5c is another structural schematic diagram of the information communication device provided in an embodiment of the present application;
[0040] Figure 6 It is a schematic diagram of the structure of the server provided in the embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0042] Embodiments of the present application provide an information communication method, device, and computer-readable storage medium.
[0043] See also Figure 1 , Figure 1The scene diagram of the information communication system provided for the embodiment of the present application includes: a basic server and a virtualized cloud host (the basic server and the virtualized cloud host can also include more, the specific number is not limited here), the basic server is a physical machine, also known as an entity server, which is the name of a physical computer relative to a virtual machine (VirtualMachine), and the hardware environment provided by the physical machine to the virtual machine is also called a "host" or "host". By virtualizing the basic server, each basic server can virtualize multiple cloud hosts, which are virtual machines, also known as virtual private servers (Virtual Private Servers, VPS), which is a technology that partitions a server into multiple virtual independent dedicated servers. Each virtual independent server using VPS technology has its own independent public Internet Protocol (Internet Protocol Address, IP) address, operating system, hard disk space, memory space, processor (Central Processing Unit, CPU) resources, etc., and can also perform operations such as installing programs and restarting servers, which is exactly the same as running an independent server. That is to say, through the software level, a server is virtually divided and multiple servers are virtualized, so that users who only need a little computing power can enjoy the computing resources of a large server. In a broad sense, cloud hosting is VPS, except that cloud hosting further virtualizes all basic resources on all basic servers or virtual machines, such as memory bandwidth, etc. The advantage of cloud hosting is that it can store data in a distributed manner and dynamically expand basic resources. It has strong security and scalability.
[0044] Each cloud host has an independent operating system and hardware structure, which is exactly the same as running an independent host, except that the physical address in each cloud host is the physical address of the virtual machine. Multiple processors can be installed in each cloud host, such as multiple graphics processors (Graphics Processing Unit, GPU) installed in a cloud host. When the cloud host receives a communication instruction, it determines the status information of the access control service. When it detects that the status information is the preset status information, it intercepts the transfer event of the virtual address of the target processor to the source processor, calculates the real address according to the preset relationship and the virtual address, writes the real address into the source processor, and responds to the communication instruction, so that the source processor can realize information communication with the target processor according to the real address.
[0045] It should be noted that Figure 1The scenario diagram of the information communication system shown is only an example. The information communication system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of information communication systems and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0046] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0047] Embodiment 1
[0048] In this embodiment, the description will be made from the perspective of an information communication device, which can be specifically integrated in a cloud host having a storage unit and a microprocessor installed therein and having computing capabilities.
[0049] An information communication method comprises: determining the state information of an access control service upon receiving a communication instruction; intercepting a transfer event of writing a virtual address of a target processor to a source processor when the state information is detected to be preset state information; calculating a real address according to a preset relationship and the virtual address; writing the real address into the source processor, and responding to the communication instruction so that the source processor realizes information communication with the target processor according to the real address.
[0050] See also Figure 2 , Figure 2 : is a flow chart of an information communication method provided in an embodiment of the present application. The information communication method includes:
[0051] In step 101, upon receiving a communication instruction, state information of an access control service is determined.
[0052] A cloud host can be installed with multiple processors, such as a graphics processor and a central processing unit. In order to speed up computing efficiency, multiple processors need to run simultaneously and communicate with each other. In order to better illustrate the embodiments of the present application, the processor is illustrated by taking a graphics processor as an example. The graphics processor is also called a display core, a visual processor or a display chip. It is a microprocessor that specializes in image computing. Point-to-point technology is the core technology for connecting graphics processors, and the performance of graphics processing in artificial intelligence (AI) training depends on the point-to-point transmission speed between the graphics processors. Therefore, the speed of connection and communication between graphics processors determines the efficiency of artificial intelligence training.
[0053] Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0054] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0055] Take computer vision (CV) technology as an example. Computer vision is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further perform graphic processing so that the computer processing becomes an image that is more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology usually includes information communication, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.
[0056] The solution provided in the embodiment of the present application involves technologies such as artificial intelligence computer vision technology. The faster the information communication speed between the multiple graphics processors, the faster the recognition speed of the computer vision technology will be. This is specifically described by the following embodiments:
[0057] It is understandable that graphics processors are interconnected through a high-speed serial computer expansion (Peripheral Component Interconnect Express, PCIe) bus, which uses a serial connection method and a point-to-point data transmission method. The two connected graphics processors on the high-speed serial computer expansion bus use transaction layer packets (TLP) packets to communicate information. However, whether the graphics processors on the high-speed serial computer expansion bus can communicate information depends on the physical topology. In the virtualized environment on the cloud host, since the topology of the high-speed serial computer expansion bus system of the cloud host is flat and has no hierarchy, in principle, the graphics processors in the cloud host cannot perform point-to-point information communication.
[0058] In order to overcome the above problems, the graphics processor provider provides a functional component, namely the GPUDirect component, through which the graphics processors capable of point-to-point information communication can be assigned the same preset identifier (ID), so that the cloud host can still confirm which graphics processors can perform point-to-point information communication through the preset identifier.
[0059] At this point, there is still a problem. Even if the GPUDirect component tells the cloud host which graphics processors can perform point-to-point information communication, it is not enough, because in the virtualization system of the cloud host, the cloud host can only see the virtual address (Guest Physical Address, GPA) of the graphics processor, but cannot see the real address (Host Physical Address, HPA) of the graphics processor. Therefore, when a point-to-point transaction layer packet is sent, it carries a virtual address, which cannot be sent to the target graphics processor and the high-speed serial computer expansion bus, otherwise a communication error will occur. In order to solve this problem, the industry has proposed a solution to map the memory-mapped input / output addresses, i.e., virtual addresses, of all graphics processors connected to the same cloud host in the peripheral memory management unit (I / O memory management unit, IOMMU). When the source graphics processor sends a transaction layer packet carrying the virtual address of the target device, the peripheral memory management unit will translate the virtual address into a real address, thereby realizing communication between graphics processors.
[0060] The embodiment of the present application is improved based on the above technology. Since the peripheral memory management unit is located at the upstream link port of the graphics processor, if the virtual address needs to be transferred to the peripheral memory management unit for translation every time the information communication is performed, it will waste time, affect the point-to-point information communication time, and indirectly cause the multiple graphics processors in the artificial intelligence training model to be unable to efficiently parallelize and calculate. Therefore, the present application can realize the operation of translating the virtual address through the peripheral memory management unit. The communication instruction is generated by the communication request between the graphics processors. When the communication instruction is received, the state information of the access control service (ACS) is determined. The access control service is used to control whether the virtual address is transferred to the peripheral memory management unit for translation. Specifically, by determining the state information, the state information can be understood as switch information. When the state information is the preset state information, the access control service closes the function of translating the virtual address of the peripheral memory management unit. When the state information is not the preset state information, the access control service opens the function of translating the virtual address of the peripheral memory management unit.
[0061] In some implementations, the step of determining the state information of the access control service may include:
[0062] (1) obtaining access control services for a downlink port in a high-speed serial computer expansion bus link;
[0063] (2) Check whether the access control service enables point-to-point redirection requests;
[0064] (3) The state information of the access control service is determined to be the preset state information.
[0065] Among them, the high-speed serial computer expansion bus link includes an uplink port (Upstream Port) and a downlink port (Downstream Port), and the access control service of the downlink can control whether the virtual address is sent to the uplink port, and then translate the virtual address through the peripheral memory management unit. Therefore, the access control service of the downlink port in the high-speed serial computer expansion bus link can be obtained first.
[0066] Furthermore, the access control service specifically controls whether the function of translating the virtual address by the peripheral memory management unit is a redirection (P2P Redirect) request, and detects whether the access control service at the downlink port has enabled the point-to-point redirection request. When it is detected that the access control service has not enabled the point-to-point redirection request, it indicates that the access control service has turned off the function of translating the virtual address by the peripheral memory management unit, and it is determined that the status of the access control service is the preset status information.
[0067] In step 102, when it is detected that the state information is the preset state information, a transfer event of writing the virtual address of the target processor to the source processor is intercepted.
[0068] The source processor may be a source graphics processor, i.e., a graphics processor that sends a transaction layer packet (information), and the target processor may be a graphics processor that receives a transaction layer packet (information). The cloud host may find the source graphics processor and the target processor that need to communicate information according to a preset identifier. Based on this, when it is detected that the status information is not the preset status information, it means that the access control service has turned off the translation of the virtual address by the peripheral memory management unit. In order to realize information communication, the target graphics processor first needs to write the virtual address into the source graphics processor.
[0069] Furthermore, since the access control service disables the translation of virtual addresses by the peripheral memory management unit, the source GPU carries the virtual address when sending the transaction layer packet to the target GPU, which may cause communication errors and lead to information communication failure.
[0070] Therefore, when it is detected that the state information is the preset state information, the transfer event of writing the virtual address of the target graphics processor into the source graphics processor is intercepted to avoid the above communication failure.
[0071] In some implementations, the step of intercepting a transfer event of writing a virtual address of a target processor to a source processor may include:
[0072] (1) Determine the source processor and the corresponding target processor by using a preset identifier;
[0073] (2) obtaining the target register corresponding to the source processor;
[0074] (3) Intercept the transfer event of writing the virtual address of the target processor into the corresponding target register of the source processor.
[0075] Among them, since the GPUDirect component assigns the same preset identifier to the graphics processors that can perform point-to-point information communication, the cloud host can determine the source graphics processor that sends the information and the corresponding target graphics processor that receives the information through the preset identifier, and obtain the corresponding target register of the source graphics processor. The corresponding target register of the source graphics processor is the memory space on the source graphics processor, which is specifically used to store the address of the target graphics processor that needs to perform information communication. The address can be a virtual address or a real address. Since this application turns off the translation function of the virtual address of the peripheral memory management unit, the real address needs to be written into the target register to realize subsequent information communication.
[0076] Furthermore, it is necessary to traverse all registers on the source graphics processor, determine the target register, and set an interception event specifically for intercepting the virtual address, so that when a transfer event of writing the virtual address of the target graphics processor to the corresponding target register of the source graphics processor is detected, interception processing is performed.
[0077] In some implementations, the step of obtaining the target register corresponding to the source processor may include:
[0078] (1.1) obtaining registers and register layout information in the source processor, where the register layout information indicates a target register;
[0079] (1.2) Traverse the register according to the register layout information, determine the corresponding target register, and set an interception event for the target register, where the interception event is used to intercept the write operation of the virtual address.
[0080] Here, each register and register layout information in the source graphics processor is obtained. The register layout information may be provided by the graphics processor manufacturer or obtained by detecting through register detection software. The register layout information indicates the function of each register and correspondingly also indicates the location information of the target register.
[0081] Furthermore, each register may be traversed based on the location information of the target register to find the target register, and an interception event may be set for the target register, where the interception event is used to intercept the write operation of the virtual address.
[0082] In some embodiments, the step of intercepting the transfer event of writing the virtual address of the target processor into the target register corresponding to the source processor may include: when it is detected that the virtual address of the target processor is written into the target register corresponding to the source processor, triggering the interception event in the target register, intercepting the transfer event of writing the virtual address of the target processor into the target register corresponding to the source processor.
[0083] When it is detected that the virtual address of the target graphics processor is written into the corresponding target register of the source graphics processor, an interception event set in the target register will be triggered accordingly, intercepting the transfer event of writing the virtual address of the target graphics processor into the corresponding target register of the source graphics processor, so as to avoid the source graphics processor carrying the virtual address when sending the transaction layer packet to the target graphics processor later, resulting in communication failure.
[0084] In step 103, a real address is calculated according to the preset relationship and the virtual address.
[0085] Among them, the preset relationship can be an offset relationship or an encoding and decryption relationship. When the preset relationship is an offset relationship, it is necessary to directly obtain the target offset and the real address of the target graphics processor when allocating a memory mapping input / output address to the target graphics processor during the initial virtualization of the cloud host. The real address can be de-offset according to the target offset to obtain the corresponding virtual address, so that the virtual address can be subsequently offset according to the target offset to obtain the corresponding real address. The target offset can be confidential information inside the cloud host.
[0086] When the preset relationship is an encoding and decryption relationship, when the cloud host needs to allocate a memory mapping input / output address for the target graphics processor, the target encoding rule and the real address of the target graphics processor are directly obtained, and the real address can be encoded according to the target encoding rule to obtain a corresponding virtual address, so that the virtual address can be subsequently encoded according to the target encoding rule to obtain a corresponding real address, and the target encoding rule is confidential information inside the cloud host.
[0087] It should be noted that in order to protect the security of the cloud host and the graphics processor installed on the cloud host, the virtual address of the graphics processor on the cloud host cannot be directly equal to the real address of the graphics processor. If the virtual address is directly equal to the real address of the graphics processor, illegal users can directly access the graphics processor in the cloud host through the virtual address, resulting in the loss of information of the cloud host.
[0088] In some implementations, the step of calculating the real address based on the preset relationship and the virtual address may include:
[0089] (1) Get the virtual address and the corresponding target address offset;
[0090] (2) The virtual address is offset according to the target address offset to obtain the corresponding real address.
[0091] The preset relationship is determined to be an offset relationship, and the virtual address of the target graphics processor and the corresponding target address offset are obtained. When the cloud host allocates a memory mapping input / output address for the target graphics processor, the virtual address is obtained by performing a de-offset process on the target graphics processor according to the target offset. Therefore, the corresponding real address can be obtained by performing an offset process on the virtual address according to the target address offset.
[0092] In one embodiment, in order to increase the security of the internal information of the cloud host, the target address offset can be changed dynamically, that is, the target address offset of each target processor can be different.
[0093] In step 104, the real address is written into the source processor, and the source processor responds to the communication instruction, so that the source processor realizes information communication with the target processor according to the real address.
[0094] Among them, after intercepting the transfer event of writing the virtual address of the target graphics processor into the source graphics processor and obtaining the real address through the virtual address, the real address can be directly written into the source graphics processor. At this time, although the status information of the access control service is the preset status information, that is, the access control service turns off the function of the peripheral memory management unit to translate the virtual address, the source graphics processor receives the real address, so the source graphics processor can find the target graphics processor according to the real address and realize information communication with the target graphics processor. In this way, the source graphics processor saves the time of sending the virtual address to the peripheral memory management unit for translation and then transmitting it back when communicating with the target graphics processor, speeding up the information communication between multiple graphics processors, improving the information communication efficiency of the graphics processor inside the cloud host, and thus increasing the recognition speed of computer vision technology accordingly.
[0095] In some implementations, the step of writing the real address into the source processor may include:
[0096] (1) replacing the virtual address in the transfer event with the real address;
[0097] (2) Start the transfer event and write the replaced real address into the corresponding target register of the source processor.
[0098] Among them, the cloud host can replace the virtual address in the transfer event with the real address, restart the transfer event, and write the replaced real address into the corresponding target register of the source graphics processor. The corresponding target register of the source graphics processor will save the real address to achieve information communication between the source graphics processor and the target graphics processor in the future. The target graphics processor is directly connected to the target graphics processor through the real address in the target register for information communication, eliminating the process and time of transferring to the upstream peripheral memory management unit for translation, thereby improving the efficiency of information communication.
[0099] As can be seen from the above, when receiving a communication instruction, the embodiment of the present application determines the status information of the access control service; when the status information is detected to be the preset status information, the transfer event of the virtual address of the target processor being written to the source processor is intercepted; the real address is calculated according to the preset relationship and the virtual address; the real address is written into the source processor, and the communication instruction is responded to, so that the source processor realizes information communication with the target processor according to the real address. In this way, when performing information communication, the transfer event of writing the virtual address of the target processor into the source processor is intercepted, the real address is calculated according to the preset relationship and the virtual address, and the real address is written into the source processor. On the premise of saving the time for translating the virtual address through the upstream device, it also avoids the failure of information communication caused by the source processor using the virtual address for communication, which greatly improves the efficiency of information communication.
[0100] Embodiment 2
[0101] The method described in the first embodiment is further described in detail below with examples.
[0102] In this embodiment, the information communication device is specifically integrated in a server, and the server is a cloud host. The processor in the embodiment of the present application is a graphics processor. Please refer to the following description for details.
[0103] See also Figure 3 , Figure 3 Another flow chart of the information communication method provided in the embodiment of the present application. The method flow may include:
[0104] In step 201, when the server detects that a memory-mapped input / output address is allocated to a target processor, the target address offset and the corresponding real address of the target processor are obtained, and the real address is de-offset according to the target address offset to obtain a corresponding virtual address.
[0105] The present application embodiment is based on a high-speed serial computer expansion bus architecture as the implementation background, such as Figure 4a As shown, Figure 4aA schematic diagram of the structure of a high-speed serial computer expansion bus provided in an embodiment of the present application. The high-speed serial computer expansion bus architecture uses a point-to-point serial communication mechanism similar to a network protocol. Multiple graphics processors connected to the high-speed serial computer expansion bus architecture can be interconnected through a switch to form a tree-shaped topology of the high-speed serial computer expansion bus. The root node (Root Complex) is used to connect the processor, memory system, IO system and peripheral memory management unit.
[0106] Based on this, when the server detects the insertion of the target graphics processor, it needs to automatically allocate a memory-mapped input / output address for the target graphics processor, that is, allocate a virtual address on the cloud host. The virtual address is a fake address of the target graphics processor inside the cloud host, which can also be understood as a physical address in the virtual machine. Information communication with other graphics processors cannot be achieved using this fake address. Therefore, the cloud host can obtain the target address offset and the corresponding real address of the target graphics processor. The real address can be the real address of the target graphics processor in the physical machine corresponding to the cloud host. Information communication with other graphics processors can be achieved using this real address. For example, the real address of the target graphics processor can be 0XFFFF1234, and the target address offset is 0000001234. According to the target address offset 0000001234, the real address 0XFFFF1234 is reversed and the corresponding virtual address 0XFFFF0000 can be obtained.
[0107] In step 202, the server controls the access control service of the downlink in the high-speed serial computer expansion bus link to close the point-to-point redirection request, so as to close the operation of translating the virtual address into the real address through the peripheral memory management unit.
[0108] The high-speed serial computer expansion bus structure includes a high-speed serial computer expansion bus link, such as Figure 4b As shown, Figure 4bA structural schematic diagram of a high-speed serial computer expansion bus link provided for an embodiment of the present application, wherein the high-speed serial computer expansion bus link uses an end-to-end data transmission method. In a high-speed serial computer expansion bus link, two ports are completely equal and can be used to connect a sending and receiving graphics processor. Moreover, a section of a high-speed serial computer expansion bus link can only connect one graphics processor, so a switch is required to expand the high-speed serial computer expansion bus link so that multiple graphics processors can be connected. The switch is a special device consisting of an uplink port and 2 to more downlink ports. The port directly or indirectly connected to the root node is an uplink port. Except for the uplink port, all other ports are called downlink ports. The downlink port is connected to the graphics processor, or connected to the next-level Switch to continue to expand the high-speed serial computer expansion bus link. The link connected to the uplink port is called the uplink, and the link connected to the downlink port is called the downlink.
[0109] From the foregoing, it can be seen that when two graphics processors communicate information, such as when the source graphics processor and the target graphics processor need to communicate information, the virtual address in the target graphics processor needs to be transmitted to the root node through the uplink, and then transmitted to the preset management unit through the root node for translation to obtain the real address. After obtaining the real address, it is also necessary to transmit the real address to the root node through the preset management unit, and the root node transmits it to the source graphics processor through the downlink to realize the whole process of translating the virtual address. The process is cumbersome, resulting in a long translation time, which will affect the communication time between the source graphics processor and the target graphics processor and affect the communication efficiency.
[0110] Therefore, in the present application, the server needs to turn off the operation function of translating virtual addresses into real addresses through the peripheral memory management unit. Since this function is controlled by the redirection request in the access control service of the downstream link port, it is necessary to control the access control service of the downstream link in the high-speed serial computer expansion bus to turn off the redirection request, that is, the function of translating virtual addresses through the peripheral memory management unit can be turned off.
[0111] In step 203, upon receiving the communication instruction, the server obtains access control services of the downlink port in the high-speed serial computer expansion bus link.
[0112] When receiving the communication instruction, the server obtains the access control service of the downlink port in the high-speed serial computer expansion bus link to determine whether the access control service opens the redirection request.
[0113] In step 204, the server detects whether the access control service enables point-to-point redirection requests.
[0114] When the server detects that the access control service turns on the point-to-point redirection request, it indicates that the virtual address of the target graphics processor needs to be transferred to the peripheral memory management unit for translation, and the process returns to step 202 to re-control the access control service of the downlink in the high-speed serial computer expansion bus link to turn off the point-to-point redirection request. When the server detects that the access control service does not turn on the point-to-point redirection request, step 205 is executed.
[0115] In step 205, the server determines that the status information of the access control service is the preset status information, determines the source processor and the corresponding target processor through the preset identifier, obtains the registers and register layout information in the source processor, traverses the registers according to the register layout information, determines the corresponding target registers, and sets an interception event for the target register.
[0116] When the server detects that the access control service does not enable the point-to-point redirection request, it indicates that the virtual address of the target graphics processor will not be transferred to the peripheral memory management unit for translation, and it is determined that the state of the access control server is the preset state.
[0117] Furthermore, the server determines through the GPUQDirect component that the preset identifiers are the same, that is, the source graphics processor and the corresponding target graphics processor that can communicate. Since the address in the target graphics processor needs to be written into the source graphics processor to realize subsequent information communication, it is necessary to obtain each register and register layout information in the source processor. The register layout information can be the distribution information of the registers provided by the graphics processor manufacturer, which correspondingly indicates the location information of the target register.
[0118] Therefore, each register in the source graphics processor can be traversed according to the location information of the target register to determine the corresponding target register. Since the translation function of the preset memory unit for the virtual address is turned off, in order to prevent the target graphics processor from directly writing the virtual address into the target register of the source graphics processor, it is necessary to set an interception event in the target register, and the interception event is used to intercept the write operation of the virtual address.
[0119] In step 206, when the server detects that the virtual address of the target processor is written into the corresponding target register of the source processor, an interception event in the target register is triggered to intercept the transfer event of writing the virtual address of the target processor into the corresponding target register of the source processor.
[0120] Among them, when the server detects that the virtual address of the target graphics processor is written into the corresponding target register of the source graphics processor, it will trigger a pre-set interception event to intercept the transfer event of the virtual address of the target graphics processor being written into the corresponding target register of the source graphics processor, so as to avoid the source processor carrying the virtual address when sending the transaction layer packet to the target graphics processor later, resulting in communication failure.
[0121] In step 207, the server obtains the virtual address and the corresponding target address offset, performs offset processing on the virtual address according to the target address offset, and obtains the corresponding real address.
[0122] After intercepting the transfer event of writing the virtual address of the target graphics processor into the corresponding target register of the source graphics processor, the server will obtain the virtual address of the target graphics processor and the corresponding target address offset in real time, such as obtaining the virtual address 0XFFFF0000 and the corresponding target address offset 0000001234.
[0123] Furthermore, the virtual address 0XFFFF0000 is offset according to the target address offset 0000001234 to obtain the corresponding real address 0XFFFF1234.
[0124] In step 208, the server replaces the virtual address in the transfer event with the real address, starts the transfer event, and writes the replaced real address into the corresponding target register of the source processor.
[0125] Among them, the server replaces the virtual address 0XFFFF0000 in the transfer event with the real address 0XFFFF1234, restarts the transfer event, and writes the replaced real address 0XFFFF1234 into the corresponding target register of the source graphics processor. In this way, the server can directly transfer the real address of the target graphics processor to the target register of the source graphics processor in the Switch, without the need for translation and feedback through the peripheral memory management unit after long-distance transmission, thereby saving the efficiency of obtaining the real address.
[0126] In step 209, the server responds to the communication instruction, so that the source processor realizes information communication with the target processor according to the real address.
[0127] The server responds to the communication instruction, causing the core layer (Device Core) of the source GPU to generate a data message, and then sends the message to the target GPU through the transaction layer (Transaction Layer), data link layer (Data Link Layer) and physical layer (Physical Layer) with the real address 0XFFFF1234, thus realizing the information communication between the source GPU and the target GPU. Please continue to refer to Figure 4a and Figure 4b The target graphics processor can directly write the real address into the target register in the source graphics processor through Switch, without passing the virtual address of the target graphics processor to the upstream until it is translated into a real address through IOMMU, and then the real address is fed back through IOMMU, which shortens the information communication time between graphics processors and improves the information communication efficiency between graphics processors, thereby greatly improving the processing efficiency of cloud hosts for computer vision technology.
[0128] As can be seen from the above, in the embodiment of the present application, when the server detects that a memory input / output address is allocated to the target processor, the target address offset and the corresponding real address of the target processor are obtained, and the real address is de-offset according to the target address offset to obtain the virtual address of the target processor, and the access control service of the downlink is controlled to close the point-to-point redirection request, so as to close the operation of the peripheral memory management unit to translate the virtual address into the real address. When the server receives the communication instruction, it obtains the access control service in the high-speed serial computer expansion bus, and when it is detected that the access control service does not open the point-to-point redirection request, the source processor and the corresponding target processor are determined by the preset identifier, and the target register in the target processor is traversed, and an interception event is set for the target register. When the server detects that the virtual address is written to the corresponding target register of the source processor, the interception event is triggered, the transfer event of the virtual address of the target processor being written to the corresponding target register of the source processor is intercepted, and the virtual address is offset according to the target address offset to obtain the corresponding real address, and the real address replaces the virtual address in the transfer event, starts the transfer event, writes the replaced real address into the corresponding target register of the source processor, and responds to the communication instruction, so that the source processor realizes information communication with the target processor according to the real address. In this way, the function of the peripheral memory management unit to translate the virtual address is turned off, so that when information communication is performed, the transfer event of writing the virtual address of the target processor to the source processor is intercepted, and the real address is calculated according to the preset relationship and the virtual address, and the real address is written to the source processor. This saves the time for translating the virtual address through the peripheral memory management unit in the upstream device, and also avoids the failure of information communication caused by the source processor using the virtual address for communication, thereby greatly improving the efficiency of information communication.
[0129] Embodiment 3
[0130] In order to better implement the information communication method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above information communication method. The meanings of the terms are the same as those in the above information communication method, and the specific implementation details can refer to the description in the method embodiment.
[0131] See also Figure 5a , Figure 5a A structural diagram of an information communication device provided in an embodiment of the present application, wherein the information communication device may include a determination unit 301, an interception unit 302, a calculation unit 303, and a communication unit 304, etc.
[0132] The determining unit 301 is configured to determine the state information of the access control service when receiving a communication instruction.
[0133] Among them, the operation of translating the virtual address through the peripheral memory management unit can be turned off in advance. The communication instruction is generated by the communication request between the graphics processors. When the determination unit 301 receives the communication instruction, it determines the state information of the access control service. The access control service is used to control whether the virtual address is passed to the peripheral memory management unit for translation. Specifically, by determining the state information, the state information can be understood as switch information. When the state information is the preset state information, the function of translating the virtual address by the peripheral memory management unit is turned off for the access control service. When the state information is not the preset state information, the function of translating the virtual address by the peripheral memory management unit is turned on for the access control service.
[0134] In some embodiments, the determination unit 301 is specifically used to: upon receiving a communication instruction, obtain an access control service for a downlink port in a high-speed serial computer expansion bus link; detect whether the access control service enables a point-to-point redirection request; and when it is detected that the access control service does not enable a point-to-point redirection request, determine that the status information of the access control service is preset status information.
[0135] Among them, the high-speed serial computer expansion bus link includes an uplink port and a downlink port, and the access control service of the downlink can control whether the virtual address is sent to the uplink port, and then translate the virtual address through the peripheral memory management unit. Therefore, the determination unit 301 can first obtain the access control service of the downlink port in the high-speed serial computer expansion bus link.
[0136] Furthermore, the access control service specifically controls whether the function of translating the virtual address by the peripheral memory management unit is a redirection request. The determination unit 301 detects whether the access control service at the downlink port has enabled the point-to-point redirection request. When it is detected that the access control service has not enabled the point-to-point redirection request, it means that the access control service turns off the function of translating the virtual address by the peripheral memory management unit, and determines that the status of the access control service is the preset status information.
[0137] The interception unit 302 is used to intercept the transfer event of writing the virtual address of the target processor to the source processor when it is detected that the state information is the preset state information.
[0138] The source processor may be a source graphics processor, i.e., a graphics processor that sends a transaction layer packet (information), and the target processor may be a graphics processor that receives a transaction layer packet (information). The cloud host may find the source graphics processor and the target processor that need to communicate information according to a preset identifier. Based on this, when the interception unit 302 detects that the state information is not the preset state information, it indicates that the access control service has turned off the translation of the virtual address by the peripheral memory management unit. In order to realize information communication, the target graphics processor first needs to write the virtual address into the source graphics processor.
[0139] Furthermore, since the access control service disables the translation of virtual addresses by the peripheral memory management unit, the source GPU carries the virtual address when sending the transaction layer packet to the target GPU, which may cause communication errors and lead to information communication failure.
[0140] Therefore, when the interception unit 302 detects that the state information is the preset state information, it will write the virtual address of the target graphics processor into the transfer event of the source graphics processor for interception, so as to avoid the above communication failure.
[0141] In some embodiments, Figure 5b As shown, the interception unit 302 includes:
[0142] A determination subunit 3021, configured to determine a source processor and a corresponding target processor through a preset identifier;
[0143] An acquisition subunit 3022 is used to acquire a target register corresponding to the source processor;
[0144] The interception subunit 3023 is used to intercept the transfer event of writing the virtual address of the target processor into the corresponding target register of the source processor.
[0145] Among them, since the GPUDirect component assigns the same preset identifier to the graphics processors that can perform point-to-point information communication, the determination subunit 3021 can determine the source graphics processor that sends the information and the corresponding target graphics processor that receives the information through the preset identifier, and the acquisition subunit 3022 acquires the corresponding target register of the source graphics processor. The corresponding target register of the source graphics processor is the memory space on the source graphics processor, which is specifically used to store the address of the target graphics processor that needs to perform information communication. The address can be a virtual address or a real address. Since this application turns off the translation function of the virtual address of the peripheral memory management unit, the real address needs to be written into the target register to realize subsequent information communication.
[0146] Furthermore, the acquisition subunit 3022 needs to traverse all registers on the source graphics processor to determine the target register, and set an interception event specifically for intercepting the virtual address through the interception subunit 3023, so that when a transfer event of the virtual address of the target graphics processor being written to the corresponding target register of the source graphics processor is detected, interception processing is performed.
[0147] In some embodiments, the acquisition subunit 3022 is specifically used to obtain registers and register layout information in the source processor, where the register layout information indicates the target register; traverse the register according to the register layout information, determine the corresponding target register, and set an interception event for the target register, where the interception event is used to intercept the write operation of the virtual address.
[0148] The acquisition subunit 3022 acquires each register and register layout information in the source graphics processor. The register layout information may be provided by the graphics processor manufacturer or obtained by detecting through register detection software. The register layout information indicates the function of each register and correspondingly also indicates the location information of the target register.
[0149] Furthermore, the acquisition subunit 3022 may traverse each register based on the location information of the target register, find the target register, and set an interception event for the target register, where the interception event is used to intercept the write operation of the virtual address.
[0150] In some embodiments, the interception subunit 3023 is specifically used to trigger the interception event in the target register when detecting that the virtual address of the target processor is written into the corresponding target register of the source processor, and intercept the transfer event of writing the virtual address of the target processor into the corresponding target register of the source processor.
[0151] Among them, when the interception sub-unit 3023 detects that the virtual address of the target graphics processor is written into the corresponding target register of the source graphics processor, it will trigger the interception event set in the target register accordingly, and intercept the transfer event of writing the virtual address of the target graphics processor into the corresponding target register of the source graphics processor, so as to avoid the source graphics processor carrying the virtual address when sending the transaction layer packet to the target graphics processor later, resulting in communication failure.
[0152] The calculation unit 303 is used to calculate the real address according to the preset relationship and the virtual address.
[0153] Among them, the preset relationship can be an offset relationship or an encoding and decryption relationship. When the preset relationship is an offset relationship, it is necessary to directly obtain the target offset and the real address of the target graphics processor when allocating the memory mapping input / output address to the target graphics processor during the initial virtualization of the cloud host. The real address can be de-offset according to the target offset to obtain the corresponding virtual address, so that the subsequent calculation unit 303 can perform offset processing on the virtual address according to the target offset to obtain the corresponding real address. The target offset can be confidential information inside the cloud host.
[0154] When the preset relationship is an encoding and decryption relationship, when the cloud host needs to allocate a memory mapping input / output address for the target graphics processor, the target encoding rule and the real address of the target graphics processor are directly obtained, and the real address can be encoded according to the target encoding rule to obtain a corresponding virtual address, so that the subsequent calculation unit 303 can encode the virtual address according to the target encoding rule to obtain a corresponding real address, and the target encoding rule is confidential information inside the cloud host.
[0155] In some implementations, the calculation unit 303 is specifically used to: obtain a virtual address and a corresponding target address offset; and perform offset processing on the virtual address according to the target address offset to obtain a corresponding real address.
[0156] The preset relationship is determined to be an offset relationship, and the calculation unit 303 obtains the virtual address of the target graphics processor and the corresponding target address offset. When the cloud host allocates a memory mapping input / output address to the target graphics processor, the virtual address is obtained by performing a de-offset process on the target graphics processor according to the target offset. Therefore, the corresponding real address can be obtained by performing an offset process on the virtual address according to the target address offset.
[0157] The communication unit 304 is used to write the real address into the source processor and respond to the communication instruction so that the source processor can realize information communication with the target processor according to the real address.
[0158] Among them, after intercepting the transfer event of writing the virtual address of the target graphics processor into the source graphics processor and obtaining the real address through the virtual address, the communication unit 304 can write the real address directly into the source graphics processor. At this time, although the state information of the access control service is the preset state information, that is, the access control service turns off the function of the peripheral memory management unit to translate the virtual address, the source graphics processor receives the real address, so the source graphics processor can find the target graphics processor according to the real address to achieve information communication with the target graphics processor. In this way, the source graphics processor saves the time of sending the virtual address to the peripheral memory management unit for translation and then transmitting it back when communicating with the target graphics processor, speeding up the information communication between multiple graphics processors, improving the information communication efficiency of the graphics processor inside the cloud host, and thus increasing the recognition speed of computer vision technology accordingly.
[0159] In some implementations, the communication unit 304 is specifically configured to: replace the virtual address in the transfer event with the real address; initiate the transfer event, and write the replaced real address into a corresponding target register of the source processor.
[0160] The communication unit 304 may replace the virtual address in the transfer event with the real address, restart the transfer event, and write the replaced real address into the corresponding target register of the source graphics processor. The corresponding target register of the source graphics processor will save the real address, so that when the source graphics processor and the target graphics processor communicate with each other later, the target graphics processor can be directly connected to the target graphics processor through the real address in the target register for information communication, thereby eliminating the process and time of transferring to the upstream peripheral memory management unit for translation, thereby improving the efficiency of information communication.
[0161] In some embodiments, Figure 5c As shown, the communication device may also include:
[0162] An acquisition unit 305 is used to acquire a target address offset and a corresponding real address of the target processor when it is detected that a memory mapping input / output address is allocated to the target processor;
[0163] The de-offset unit 306 is used to perform de-offset processing on the real address according to the target address offset to obtain a corresponding virtual address.
[0164] The control unit 307 is used to control the access control service of the downlink in the high-speed serial computer expansion bus link to close the point-to-point redirection request, so as to close the operation of translating the virtual address into the real address through the peripheral memory management unit.
[0165] The specific implementation of each of the above units can be found in the previous embodiments, which will not be described in detail here.
[0166] As can be seen from the above, the embodiment of the present application determines the state information of the access control service when the determination unit 301 receives the communication instruction; when the interception unit 302 detects that the state information is the preset state information, it intercepts the transfer event of the virtual address of the target processor being written to the source processor; the calculation unit 303 calculates the real address according to the preset relationship and the virtual address; the communication unit 304 writes the real address into the source processor, and responds to the communication instruction, so that the source processor realizes information communication with the target processor according to the real address. In this way, when performing information communication, the virtual address of the target processor is written into the transfer event of the source processor for interception, the real address is calculated according to the preset relationship and the virtual address, and the real address is written into the source processor. On the premise of saving the time for the virtual address to be translated through the upstream device, it also avoids the failure of information communication caused by the source processor using the virtual address for communication, which greatly improves the efficiency of information communication.
[0167] Embodiment 4:
[0168] The present application also provides a server, such as Figure 6 As shown, it shows a schematic diagram of the structure of the server involved in the embodiment of the present application, specifically:
[0169] The server may be a cloud host, and may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404, and other components. Those skilled in the art will appreciate that Figure 6 The server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0170] The processor 401 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0171] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0172] The server also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 403 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0173] The server may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0174] Although not shown, the server may also include a display processor, etc., which will not be described in detail here. Specifically in this embodiment, the processor 401 in the server will load the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 will run the application stored in the memory 402, thereby realizing various functions, as follows:
[0175] When a communication instruction is received, the state information of the access control service is determined; when it is detected that the state information is the preset state information, the transfer event of the virtual address of the target processor being written to the source processor is intercepted; the real address is calculated according to the preset relationship and the virtual address; the real address is written into the source processor, and the communication instruction is responded to, so that the source processor realizes information communication with the target processor according to the real address.
[0176] In the above embodiments, the description of each embodiment has its own focus. For the parts that are not described in detail in a certain embodiment, please refer to the detailed description of the information communication method above, and will not be repeated here.
[0177] As can be seen from the above, the server of the embodiment of the present application can determine the status information of the access control service when receiving the communication instruction; when the status information is detected to be the preset status information, intercept the transfer event of the virtual address of the target processor to the source processor; calculate the real address according to the preset relationship and the virtual address; write the real address into the source processor, and respond to the communication instruction, so that the source processor can realize information communication with the target processor according to the real address. In this way, when performing information communication, the transfer event of writing the virtual address of the target processor into the source processor is intercepted, the real address is calculated according to the preset relationship and the virtual address, and the real address is written into the source processor. On the premise of saving the time for translating the virtual address through the upstream device, it also avoids the failure of information communication caused by the source processor using the virtual address for communication, which greatly improves the efficiency of information communication.
[0178] Embodiment 5
[0179] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0180] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the information communication methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0181] When a communication instruction is received, the state information of the access control service is determined; when it is detected that the state information is the preset state information, the transfer event of the virtual address of the target processor being written to the source processor is intercepted; the real address is calculated according to the preset relationship and the virtual address; the real address is written into the source processor, and the communication instruction is responded to, so that the source processor realizes information communication with the target processor according to the real address.
[0182] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0183] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0184] Since the instructions stored in the computer-readable storage medium can execute the steps in any information communication method provided in the embodiments of the present application, the beneficial effects that can be achieved by any information communication method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0185] The above is a detailed introduction to an information communication method, device, and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An information communication method, characterized in that: include: Upon receiving the communication instruction, determining state information of the access control service, the state information being used to indicate whether the access control service enables a point-to-point redirection request; When it is detected that the state information is preset state information, intercepting a transfer event of writing the virtual address of the target processor to the source processor, wherein the preset state information is the state information of the access control service when the access control service does not enable the point-to-point redirection request; Calculate the real address according to the preset relationship and the virtual address; The real address is written into the source processor, and the source processor responds to the communication instruction, so that the source processor realizes information communication with the target processor according to the real address.
2. The information communication method according to claim 1, characterized in that: The step of intercepting the transfer event of writing the virtual address of the target processor to the source processor comprises: Determine the source processor and the corresponding target processor by using a preset identifier; Obtaining a target register corresponding to the source processor; The transfer event of writing the virtual address of the target processor into the corresponding target register of the source processor is intercepted.
3. The information communication method according to claim 2, characterized in that: The step of obtaining the target register corresponding to the source processor comprises: Acquire registers and register layout information in the source processor, wherein the register layout information indicates a target register; The registers are traversed according to the register layout information to determine a corresponding target register, and an interception event is set for the target register, where the interception event is used to intercept a write operation of a virtual address.
4. The information communication method according to claim 3, characterized in that: The step of intercepting a transfer event of writing the virtual address of the target processor into a target register corresponding to the source processor comprises: When it is detected that the virtual address of the target processor is written into the target register corresponding to the source processor, the interception event in the target register is triggered to intercept the transfer event of writing the virtual address of the target processor into the target register corresponding to the source processor.
5. The information communication method according to any one of claims 1 to 4, characterized in that: The step of determining the status information of the access control service comprises: Obtaining access control services for a downlink port in a high-speed serial computer expansion bus link; Detecting whether the access control service enables point-to-point redirection requests; When it is detected that the access control service does not enable the point-to-point redirection request, it is determined that the state information of the access control service is the preset state information.
6. The information communication method according to any one of claims 1 to 4, characterized in that: The step of writing the real address into the source processor comprises: Replacing the virtual address in the transfer event with the real address; The transfer event is initiated to write the replaced real address into the corresponding target register of the source processor.
7. The information communication method according to any one of claims 1 to 4, characterized in that: The step of calculating the real address according to the preset relationship and the virtual address includes: Get the virtual address and the corresponding target address offset; The virtual address is offset according to the target address offset to obtain a corresponding real address.
8. The information communication method according to claim 7, characterized in that: Before the step of obtaining the virtual address and the corresponding target address offset, the method further includes: When it is detected that a memory mapped input / output address is allocated for a target processor, obtaining a target address offset and a corresponding real address of the target processor; The real address is de-offset according to the target address offset to obtain a corresponding virtual address.
9. The information communication method according to any one of claims 1 to 4, characterized in that: Before the step of determining the status information of the access control service, the method further includes: The access control service controlling the downstream link in the high-speed serial computer expansion bus link closes the point-to-point redirection request so as to close the operation of translating the virtual address into the real address through the peripheral memory management unit.
10. An information communication device, characterized in that: include: A determination unit, configured to determine, upon receiving a communication instruction, state information of an access control service, wherein the state information is used to indicate whether the access control service enables a point-to-point redirection request; an interception unit, configured to intercept a transfer event of writing a virtual address of a target processor to a source processor when it is detected that the state information is preset state information, wherein the preset state information is state information of the access control service when the access control service does not enable a point-to-point redirection request; A calculation unit, used for calculating a real address according to a preset relationship and the virtual address; The communication unit is used to write the real address into the source processor and respond to the communication instruction so that the source processor can realize information communication with the target processor according to the real address.
11. The information communication device according to claim 10, characterized in that: The interception unit comprises: A determination subunit, used to determine a source processor and a corresponding target processor through a preset identifier; An acquisition subunit, used for acquiring a target register corresponding to the source processor; The interception subunit is used to intercept the transfer event of writing the virtual address of the target processor into the corresponding target register of the source processor.
12. The information communication device according to claim 11, characterized in that: The acquisition subunit is specifically used for: Acquire registers and register layout information in the source processor, wherein the register layout information indicates a target register; The registers are traversed according to the register layout information to determine a corresponding target register, and an interception event is set for the target register, where the interception event is used to intercept a write operation of a virtual address.
13. The information communication device according to claim 12, characterized in that: The interception subunit is specifically used for: When it is detected that the virtual address of the target processor is written into the target register corresponding to the source processor, the interception event in the target register is triggered to intercept the transfer event of writing the virtual address of the target processor into the target register corresponding to the source processor.
14. The information communication device according to any one of claims 10 to 13, characterized in that: The determining unit is specifically configured to: upon receiving a communication instruction, obtaining access control services for a downlink port in a high-speed serial computer expansion bus link; Detecting whether the access control service enables point-to-point redirection requests; When it is detected that the access control service does not enable the point-to-point redirection request, it is determined that the state information of the access control service is the preset state information.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the information communication method according to any one of claims 1 to 9.
