Computer system, method for computer system and readable storage medium
By using multiple hosts and switches in the computer system, forwarding and address translation of memory requests is solved, and the problem of memory resources cannot be shared in the cluster system is improved, and the utilization rate of memory resources and task execution speed is improved.
Patent Information
- Application Number
- CN202310511730.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2024-11-05
AI Technical Summary
The memory resources of each node in the cluster system cannot be shared, resulting in serious waste of memory resources and the inability to effectively utilize the memory resources of the cluster.
By introducing multiple hosts and switches into the computer system, the forwarding and address translation of memory requests is achieved using cache coherence devices and switches, so that multiple hosts can share storage space and improve the utilization of memory resources.
It effectively improves the utilization rate of memory resources, reduces the memory requirements of each host, reduces cost and size, and improves task execution speed.
Smart Images

Figure CN118897728A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a computer system, a method for a computer system and a computer-readable storage medium for executing the method for a computer system, and more specifically to a computer system that enables multiple hosts to share memory, a method for a computer system that enables multiple hosts to share memory and a computer-readable storage medium for executing the method. Background Art
[0002] With the continuous development of network technology, the speed of the network is constantly increasing, creating good conditions for the application of cluster systems. Cluster systems can provide users with a large number of central processing units (CPUs) and memory resources, but because each node in the cluster is still an autonomous individual, its memory resources cannot be shared and cannot be effectively utilized, resulting in serious waste of cluster memory resources. Summary of the invention
[0003] One of the objectives of the present application is to disclose a computer system, a method for the computer system, and a readable storage medium for executing the method of the computer system, so as to solve the above-mentioned problem.
[0004] An embodiment of the present invention relates to a method for a computer system, characterized in that the computer system includes multiple hosts and switches. The method for a computer system includes: using a first CPU of a first host among the multiple hosts to issue memory request information according to the storage space required for executing a task; using a first cache consistency device in the first host and the switch to forward the memory request information to at least one second host among the multiple hosts to request the second host to allocate part of the space in the memory for use by the first CPU; using a second cache consistency device in the second host and the switch to provide the physical address of the part of the space to the first cache consistency device for translation to generate a translated physical address when allocating the part of the space in the memory; and the first CPU uses the translated physical address to access the part of the space.
[0005] An embodiment of the present invention relates to a computer system, characterized in that it includes multiple host switches. A first host among the multiple hosts includes a first CPU, a first memory, and a first cache consistency device; the first memory is coupled to the first CPU, and the first cache consistency device is coupled to the first CPU. At least one second host among the multiple hosts includes a second CPU and a second cache consistency device, and the second cache consistency device is coupled to the second CPU. The switch couples the first cache consistency device and the second cache consistency device, wherein the second CPU issues memory request information according to the storage space required for executing a task, and the memory request information is transmitted to the first host through the second cache consistency device and the switch to request the first memory to allocate a specific space to the second CPU for use in executing the task; the first cache consistency device is used to transmit the physical address of the specific space to the second cache consistency device through the switch, and the second cache consistency device performs address translation to translate the physical address into a translated physical address; and the second CPU accesses the specific space through the translated physical address.
[0006] Another embodiment of the present application relates to a computer-readable storage medium storing computer-executable instructions for executing the method for a computer system as described above.
[0007] Since the first high-speed cache consistency device and the second high-speed cache consistency device in the computer system of the present invention communicate with each other through a switch, the utilization rate of memory resources can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] When read in conjunction with the accompanying drawings, aspects of the present disclosure are better understood from the following embodiments. It should be noted that, in accordance with standard practice in the industry, various structures are not drawn to scale. In fact, for clarity of discussion, the dimensions of various structures may be arbitrarily increased or reduced.
[0009] Figure 1 This is an architectural diagram of the computer system of the present application.
[0010] Figure 2 It is a configuration diagram of the local storage space and the remote storage space in the first storage and the second storage of the present application.
[0011] Figure 3 It is a schematic diagram of the total capacity provided to the first central processing unit by the first cache consistency device of the present application.
[0012] Figure 4 is a flow chart of the computer system method of the present application. DETAILED DESCRIPTION
[0013] The following disclosure provides many different embodiments or examples of different components for implementing the subject matter provided. Specific examples of components and arrangements are described below to simplify the disclosure. Of course, this type is only an example and is not intended to be restrictive. For example, in the following description, a first component is formed above or on a second component and may include an embodiment in which the first component and the second component are directly contacted through formation, and may also include an embodiment in which an additional component may be formed between the first component and the second component so that the first component and the second component may not be directly contacted. In addition, the disclosure may repeat reference numbers and / or letters in various examples. This repetition is for the purpose of simplicity and clarity and does not itself indicate the relationship between the various embodiments and / or configurations discussed.
[0014] As used herein, terms such as "first" and "second" describe various components, elements, regions, layers and / or sections, but such components, elements, regions, layers and / or sections should not be limited by such terms. Such terms may only be used to distinguish one component, element, region, layer or section from another. Terms such as "first" and "second" when used herein do not imply a sequence or order unless clearly indicated by the context.
[0015] The singular forms "a", "an", and "the" may also include the plural forms, unless the context clearly indicates otherwise. The term "connected" along with its derivatives may be used herein to describe structural relationships between components. "Connected" may be used to describe that two or more components are in direct physical or electrical contact with each other. "Connected" may also be used to indicate that two or more components are in direct or indirect (with intervening components between them) physical or electrical contact with each other, and / or that the two or more components cooperate or interact with each other.
[0016] Generally speaking, a computer system usually includes multiple interconnected hosts, each of which may include a memory; when executing a task, a storage space sharing mechanism is adopted to allocate specific or idle storage space in the host to the host that has to execute the task; after the task is completed, the storage space is released so that the computer system can continue to allocate the storage space to other tasks with storage requirements. In this way, each host in the computer system does not need to be equipped with a very large capacity memory, which can reduce cost and size. In this application, the cache consistency device configured in the host that executes the task is responsible for managing the application and address mapping of the remote storage space to reduce the workload of the central processing unit that executes the task in the host, and the details are described below.
[0017] Figure 1The computer system 10 is an architectural diagram of an embodiment of the present application. The computer system 10 includes a first host 100, a plurality of second hosts (for example, two in this embodiment) 110A and 110B, and a switch 120, and the first host 100 and the second hosts 110A and 110B communicate with each other via the switch 120. In some embodiments, the first host 100 and the second hosts 110A and 110B are located in a single rack, and the switch 120 can be a top-of-rack (TOR) switch to minimize the communication paths between the first host 100, the second hosts 110A and 110B, and the switch 120, and reduce communication delays. Figure 1 The computer system 10 shown is described by taking three groups of hosts as an example, but in some embodiments, the switch 120 can be used to scale the computer system 10 to a larger size, such as having a larger number of hosts, and the number of hosts included in the computer system 10 can depend on the size of the rack (e.g., height) and the power supply capacity of the rack power module. In other embodiments, multiple hosts connected together by the switch 120 can be configured in different racks, so that the resources of the computer system 10 for executing computer programs are dynamically expandable, and the aforementioned computer program can be a collection of ordered instructions for the computer system 10 to perform specific tasks (such as arithmetic, logic, control, and input / output operations).
[0018] The switch 120 may be a network switch or a switch supporting a high-speed cache coherent interconnect protocol, such as a Compute Express Link (CXL) switch. A CXL switch may provide throughput and latency performance superior to a network switch, while a network switch may provide long-distance transmission; therefore, compared with a CXL switch, a network switch is more suitable for use in an embodiment in which multiple hosts are configured in different racks.
[0019] The first host 100 includes a first central processing unit (CPU) 102, a first memory 104, and a first cache coherence device 106, which are respectively connected to the first central processing unit 102. The first central processing unit 102 may include an electronic circuit for executing a computer program.
[0020] The first memory 104 is connected to the first central processing unit 102 and is used to store instructions, data and data for implementing instructions that need to be processed during the execution of the computer program. The first memory 104 may include a specific number of storage locations, and each storage location has a permanently assigned physical address; the first central processing unit 102 can use the physical address to access the corresponding storage location (i.e., write data to the storage location specified by the physical address or read data from the storage location specified by the physical address). The first memory 104 may include a volatile memory (volatile memory), such as a random access memory (RAM), or other types of memory that can store data. The first central processing unit 102 can access the first memory 104 through a memory interface (e.g., DDR); in some embodiments, the first central processing unit 102 can access the first memory 104 through a device interface, such as a peripheral component interconnect express (PCIe) interface.
[0021] The first cache coherence device 106 is configured as a device operating according to the CXL protocol. The first cache coherence device 106 may comply with the CXL1.1 specification or the CXL2.0 specification, or in some embodiments, the first cache coherence device 106 is configured to comply with a future version of the CXL specification, a modified version of the CXL specification, or any other suitable cache coherence interconnect protocol. The first cache coherence device 106 is coupled to the first central processing unit 102, and the first central processing unit 102 and the first cache coherence device 106 can communicate according to the CXL protocol, that is, the first central processing unit 102 sends information according to the CXL protocol, and the first cache coherence device 106 can recognize the information sent from the first central processing unit 102 according to the CXL protocol, thereby reducing data transmission delay and increasing data throughput.
[0022] The first cache coherence device 106 is further coupled to the switch 120, and the switch 120 can determine where to route the information from the information sent by the first central processing unit 102 and transmitted through the first cache coherence device 106. In the case where the switch 120 is a network switch, the first cache coherence device 106 and the switch 120 communicate using a network protocol based on, for example, Ethernet; therefore, the first cache coherence device 106 is used to convert the information from the first central processing unit 102 and in a format specified by the CXL protocol into a format that can be recognized and forwarded by the network switch 120 to ensure that the information transmitted through different protocols is not lost, even though performing the format conversion may cause a substantial delay in the transmission of the information. In the case where the switch 120 is a CXL switch, the switch 120 is configured as a component operating according to the CXL protocol; since the information in a specific format that complies with the CXL protocol sent by the first central processing unit 102 can be recognized by the switch 120 for information forwarding, the first cache coherence device 106 does not need to perform the format conversion of the information.
[0023] The second host 110A includes a second central processing unit 112A, a second memory 114A, and a second cache coherence device 116A; the second memory 114A is connected to the second central processing unit 112A, and the second cache coherence device 116A is connected to the second central processing unit 112A and the switch 120. The second host 110B includes a second central processing unit 112B, a second memory 114B, and a second cache coherence device 116B; the second memory 114B is connected to the second central processing unit 112B, and the second cache coherence device 116B is connected to the second central processing unit 112B and the switch 120. The first central processing unit 102, the second central processing units 112A and 112B may be central processing units of the same model, or central processing units of different models but with the same computing power, to ensure that completely identical computing results can be provided for tasks that execute the same logic.
[0024] The first memory 104 and the second memories 114A and 114B may be memories of the same type. The storage space in the first memory 104 may be pre-divided into two parts: a local storage space 1042 and a remote storage space 1044. Figure 2As shown. Specifically, the local storage space 1042 is a storage space dedicated to the first central processing unit 102, which is used to store instructions, data and data for implementing instructions that need to be processed during the execution of the computer program by the first central processing unit 102; the remote storage space 1044 can be used to store instructions, data and data for implementing instructions that need to be processed during the execution of the computer program by the second central processing unit 112A and / or 112B. In other words, the first memory 104 will not configure the first central processing unit 102 with permission to access the remote storage space 1044, so the first central processing unit 102 cannot access the remote storage space 1044. In some embodiments, the first memory 104 can be configured to take no action when the first central processing unit 102 performs a write operation on the remote storage space 1044, and return data 0 as a response when the first central processing unit 102 performs a read operation on the remote storage space 1044.
[0025] Similarly, the storage space of the second memory 114A can be divided into a local storage space 1142A and a remote storage space 1144A; the local storage space 1142A is a storage space dedicated to the second central processing unit 112A, and the remote storage space 1144A is a storage space provided for use by one or more central processing units (e.g., the first central processing unit 102 and / or the second central processing unit 112B) that do not belong to the second host 110A. The storage space of the second memory 114B can also be divided into a local storage space 1142B dedicated to the second central processing unit 112B, and a remote storage space 1144B provided for use by one or more central processing units (e.g., the first central processing unit 102 and / or the second central processing unit 112A) other than the second central processing unit 112B.
[0026] See also Figure 1 The first cache coherence device 106 and the second cache coherence devices 116A and 116B may be devices based on a memory mapping input / output (MMIO) interface, and are used to establish cache coherence between the first memory 104 and the second memories 114A and 114B. In some embodiments, the first cache coherence device 106 may be configured to expose at least a portion of the storage space of the first memory 104 to the second hosts 110A and 110B, and to control access to the remote memory (i.e., the second memories 114A and 114B) based on a (memory) access request issued by the first central processing unit 102.
[0027] Specifically, the first cache coherence device 106 is configured to expose at least the real-time capacity of the free space in the remote storage space 1044 (i.e., the storage space not allocated to any central processing unit in the computer system 10) to the second hosts 110A and 110B when the first host 100 communicates with the second hosts 110A and 110B through the switch 120. At the same time, the second cache coherence device 116A can expose the real-time capacity of the free space of the remote storage space 1144A in the second memory 114A to the first host 100 and the second host 110B, and the second cache coherence device 116B can expose the real-time capacity of the free space of the remote storage space 1144B in the second memory 114B to the first host 100 and the second host 110A. The first cache coherence device 106 may be configured to, after obtaining the capacity of the free space of the remote storage spaces 1144A and 1144B exposed by the second cache coherence devices 116A and 116B, use the sum of the capacity of the free space of the local storage space 1042 and the remote storage spaces 1144A and 1144B as the total capacity 118 (e.g., Figure 3 ) is provided to the first central processing unit 102. Figure 1 and Figure 2 Similarly, the second cache consistency device 116A may be configured to expose the sum of the capacities of the free spaces of the local storage space 1142A and the remote storage spaces 1044 and 1144B to the second central processing unit 112A, and the second cache consistency device 116B may be configured to expose the sum of the capacities of the free spaces of the local storage space 1142B and the remote storage spaces 1044 and 1144A to the second central processing unit 112B.
[0028] See also Figure 1 and Figure 2 In some embodiments, the computer system 10 further includes a resource monitoring module 130 coupled to the first host 100 and the second host 110A and 110B; the resource monitoring module 130 can be used to detect the usage of the first memory 104 and the second memory 114A and 114B in real time, such as the usage of the local storage space 1042, 1142A and 1142B and the remote storage space 1044, 1144A and 1144B, and provide the detection result to the corresponding first cache consistency device 106 and the second cache consistency device 116A and 116B. The first cache consistency device 106 and the second cache consistency device 116A and 116B can expose the real-time capacity of the free space to the remote host according to the detection result sent by the resource monitoring module 130.
[0029] When the first host 100 obtains the computer program, the first central processing unit 102 may analyze the computer program to evaluate the capacity of the storage space required to execute the computer program (hereinafter referred to as the occupied capacity), and issue a storage application request according to the occupied capacity; the storage application request is transmitted to the first memory 104 and the first cache consistency device 106. The reply provided by the first memory 104 in response to the storage application request is used to indicate whether the local storage space 1042 includes enough free space to meet the occupied capacity indicated by the storage application request. In some embodiments, before the first central processing unit 102 obtains the reply from the first memory 104, the first cache consistency device 106 may not perform any action. The first central processing unit 102 may copy or move the reply from the first memory 104 to the first cache consistency device 106 so that the first cache consistency device 106 decides whether to send a storage allocation request to the second hosts 110A and 110B. When the capacity of the free space in the local storage space 1042 is greater than or equal to the aforementioned occupied capacity, the first central processing unit 102 executes the computer program by accessing the local storage space 1042, thereby reducing the access delay and improving the task execution speed; in this case, the first cache consistency device 106 will not send a storage allocation request to the second host 110A and 110B.
[0030] The first cache coherence device 106 may be configured to send a storage allocation request for configuring access rights to the remote storage spaces 1144A and 1144B to the second hosts 110A and 110B through the switch 120 when the aforementioned occupied capacity is greater than the capacity of the free space of the local storage space 1042 in the first memory 104. In some embodiments, the first cache coherence device 106 may compare the occupied capacity with the capacity of the free space in the local storage space 1042 of the first memory 104; when the occupied capacity is greater than the capacity of the free space in the local storage space 1042, the first cache coherence device 106 may use the difference between the occupied capacity and the capacity of the free space as the supplementary capacity, and send a storage allocation request carrying the supplementary capacity to the second hosts 110A and 110B.
[0031] The second cache coherence devices 116A and 116B receive the storage allocation request and provide a reply in response to the storage allocation request; the reply may include an indication of whether the remote storage space 1144A and 1144B in the second memory 114A and 114B includes sufficient free space to satisfy the supplemental capacity of the storage allocation request.
[0032] In some embodiments, each of the first memory 104 and the second memories 114A and 114B can be configured to configure access rights for the central processing unit that performs remote access only when the capacity of the free space of the remote storage space 1044, 1144A and 1144B is greater than or equal to the aforementioned supplementary capacity. For example, when the capacity of the free space of the remote storage space 1144A in the second memory 114A is less than the aforementioned supplementary capacity, and the free space of the remote storage space 1144B in the second memory 114B is greater than or equal to the aforementioned supplementary capacity, the second host 110A will not configure access rights for the second memory 114A for the first central processing unit 102, and the second host 110B will configure access rights for at least part of the free space (hereinafter referred to as specific space) of the remote storage space 1144B in the second memory 114B for the first central processing unit 102 according to the supplementary capacity, so that the specific space allows the first central processing unit 102 to perform read and write operations. Therefore, the reply provided by the second cache coherence device 116A to the first cache coherence device 106 will include the allocation request failure, while the reply provided by the second cache coherence device 116B to the first cache coherence device 106 may include the allocation request success and the physical address of each storage location in the said particular space.
[0033] The first cache consistency device 106 may be configured to perform an address translation operation, i.e., to translate the physical addresses of all storage locations in the specific space transmitted by the second cache consistency device 116A (if there is enough free space in the remote storage space 1144A to satisfy the supplementary capacity indicated by the storage allocation request) or the physical addresses of all storage locations in the specific space transmitted by the second cache consistency device 116B into translated physical addresses that can be processed by the first central processing unit 102, and to maintain the mapping information from the translated physical addresses to the physical addresses using an address mapping table. The physical address of the specific space provided by the second memory 114A or 114B to the first central processing unit 102 for use may be discontinuous, but the continuity of the translated address can be ensured through address translation. The first cache consistency device 106 may also be configured to maintain the address continuity of the storage space in the first memory 104 and the specific space; that is, the starting address of the translated physical address used by the specific space is the ending address of the physical address of the storage space of the first memory 104.
[0034] During the process of executing the computer program, the first central processing unit 102 will give priority to storing data in the free space in the local storage space 1042; when the local storage space 1042 is full, the data not stored in the local storage space 1042 will be stored in the remote storage space 1144A or 1144B; that is, when the first central processing unit 102 makes a storage allocation request, the computer system 10 allocates storage space for it using a memory allocation method similar to the non-uniform memory access (NUMA) architecture. In this architecture, several central processing units are connected to a memory through a memory bus to form a node. The entire system is divided into several such nodes. The memory in a certain node is called local storage, and the memory in other nodes is called remote storage for the node. When the computer system 10 allocates storage space for a computer program running on a certain central processing unit, it usually allocates from the local storage of the central processing unit, rather than the remote storage, so as to provide data access performance.
[0035] The first cache consistency device 106 can determine whether the first central processing unit 102 wants to access the local storage space 1042 or the remote storage space 1144A or 1144B based on the address range check. When the first cache consistency device 106 obtains the translated physical address in response to the access request issued by the first central processing unit 102, the translated physical address can be converted into a physical address for accessing the second memory 114A or 114B by referring to the address mapping table, and then relayed to the corresponding second cache consistency device 116A or 116B by the switch 120 to execute the access to the remote storage space 1144A or 1144B. During the process of the first central processing unit 102 executing the computer program, the first cache consistency device 106 and the second cache consistency devices 116A and 116B continuously monitor the data read and write operations performed by the first central processing unit 102, and thereby establish cache consistency. For example, when the first central processing unit 102 writes data at an address in the remote memory space 1144B of the second memory 114B, the first cache coherence device 106 and the second cache coherence devices 116A and 116B can communicate through the switch 120 to invalidate the data stored by the second central processing unit 112A at the address in the corresponding remote memory space 1144B. The operation of the second cache coherence devices 116A and 116B is substantially the same as that of the first cache coherence device 106, and will not be described in detail herein.
[0036] Figure 4300 is a schematic diagram of an embodiment of a method for a computer system of the present application. In some embodiments, the method 300 for a computer system may be Figure 1 The computer system 10 shown in FIG. Figure 1 and Figure 4 The method 300 of the computer system may start at step S302, where the first host 100 in the computer system 10 obtains a computer program. The central processing unit 102 in the first host 100 may send a storage request to the first memory 104 and the first cache coherence device 106 according to the occupied capacity indicated by the message of the computer program (step S304). Then, the first memory 104 may compare the occupied capacity with the capacity of the free space in the local storage space 1042 to determine whether the local storage space 1042 includes enough free space to satisfy the occupied capacity indicated by the storage allocation request (step S306).
[0037] When the local storage space 1042 in the first memory 104 has enough free space (i.e., the capacity of the free space in the local storage space 1042 is greater than or equal to the occupied capacity), the first central processing unit 102 executes the computer program by accessing the local storage space 1042 (step S308). When the local storage space 1042 does not have enough free space (i.e., the capacity of the free space in the local storage space 1042 is less than the occupied capacity), the first cache coherence device 106 sends a storage allocation request to at least one second host 110A and / or 110B in the computer system 10 through the switch 120 (step S310). In some embodiments, the first cache coherence device 106 may compare the occupied capacity with the capacity of the free space in the local storage space 1042, and when the occupied capacity is greater than the capacity of the free space in the local storage space 1042, the difference between the occupied capacity and the capacity of the free space is used as the supplementary capacity, and send a storage allocation request carrying information about the supplementary capacity to the second host 110A and / or 110B.
[0038] When the capacity of the free space in the remote storage space 1144A or 1144B of the second memory 114A or 114B is greater than or equal to the supplementary capacity, the first central processing unit 102 can execute the computer program by accessing the local storage space 1042 and the remote storage space 1144A or 1144B (step S312).
[0039] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiment method can be implemented by instructing and commanding related hardware through computer programs and instructions. The computer programs can be stored in a computer-readable storage medium. When the computer programs and instructions are executed, they may include processes such as the above-described method for a computer system.
[0040] In certain embodiments, the first host 100 and the second host 110A and 110B further include a memory, a processor, and a computer program stored in the memory and running on the processor. The processor and the memory can be connected by a bus or otherwise. The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. The memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0041] The non-transitory software programs and instructions required to implement the method 300 for a computer system of the above embodiment are stored in the memory; when the programs and instructions are executed by the processor, Figure 4 Steps S302 to S312 shown may be executed.
[0042] In some embodiments, the first central processing unit 102 and the second central processing units 112A and 112B can perform various functional applications and data processing by executing computer programs stored in the first memory 104 and the second memory 114A and 114B, such as implementing the method 300 for a computer system provided in an embodiment of the present invention.
[0043] In addition, one embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions; the computer-executable instructions are executed by a processor or a controller, for example, by the first central processing unit 102, the second central processing unit 112A and / or 112B in the computer system 10; the first central processing unit 102, the second central processing unit 112A and / or 112B can execute the method 300 for the computer system in the above embodiment, for example, execute the above described Figure 4 Steps S302 to S312 of method 300 in FIG.
[0044] Those skilled in the art will appreciate that all or some of the steps and systems in the method 300 for a computer system disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, electronically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0045] The foregoing summarizes the structures of several embodiments so that those skilled in the art can better understand the aspects of the present disclosure. Those skilled in the art will appreciate that they can easily use the present disclosure as a basis for designing or modifying other manufacturing processes and structures for carrying out the same purposes and / or achieving the same advantages of the embodiments described herein. Those skilled in the art will also recognize that such equivalent constructions do not depart from the spirit and scope of the present disclosure, and that various changes, substitutions, and modifications may be made herein without departing from the spirit and scope of the present disclosure.
Claims
1. A method for a computer system, characterized in that: The computer system includes a plurality of hosts and switches, and the method includes: Using a first CPU in a first host among the multiple hosts to issue memory request information according to a storage space required for executing a task; forwarding the memory request information to at least one second host among the plurality of hosts by using a first cache coherence device in the first host and the switch, so as to request the second host to allocate part of the space in the memory to the first CPU for use; utilizing the second cache coherence device in the second host and the switch to provide the physical address of the partial space to the first cache coherence device for translation to generate a translated physical address when the memory allocates the partial space; and The first CPU uses the translated physical address to access the portion of space.
2. The method according to claim 1, characterized in that When the first CPU accesses the portion of space using a translated physical address, the physical address mapped to the translated physical address is transmitted to the second host via the switch using the first cache consistency device, wherein the first cache consistency device records mapping information between the physical address and the translated physical address.
3. The method according to claim 1, characterized in that The first cache coherent device, the second cache coherent device, and the switch communicate via a cache coherent interconnect protocol.
4. The method according to claim 1, characterized in that: translating the memory request information sent by the first CPU in accordance with the first protocol into information in accordance with the second protocol by using the first cache consistency device, and sending the memory request information in accordance with the second protocol to the switch; as well as using the second cache coherence device to translate the memory request information transmitted by the switch in accordance with the second protocol into information in accordance with the first protocol, and sending the memory request information in accordance with the first protocol to the second CPU, The first protocol complies with the protocol provisions of the cache coherent interconnect protocol, and the second protocol complies with the protocol provisions of the network protocol.
5. The method according to claim 1, characterized in that The computer system further includes a resource monitoring module coupled to the memory, and the method further includes: Monitor the usage status of the memory and provide the detection result to the first cache consistency device.
6. A computer system, characterized in that: include: The first host includes: First CPU; a first memory coupled to the first CPU; and a first cache coherence device coupled to the first CPU; The second host includes: A second CPU; and a second cache coherence device coupled to the second CPU; and a switch coupling the first cache coherence device and the second cache coherence device, wherein: The second CPU issues a memory request message according to the storage space required for executing the task, and the memory request message is transmitted to the first host through the second cache consistency device and the switch to request the first memory to allocate a specific space to the second CPU for executing the task. The first cache coherence device is used to transmit the physical address of the specific space to the second cache coherence device through the switch, and the second cache coherence device performs address translation to translate the physical address into a translated physical address, and The second CPU accesses the specific space through the translated physical address.
7. The computer system according to claim 6, characterized in that: When the first host and the second host establish communication through the switch, the first cache coherence device exposes a portion of the space in the first memory to the second CPU for use by the second CPU, wherein the portion of the space includes the specific space.
8. The computer system according to claim 7, characterized in that: The first memory includes a local storage space and a remote storage space; When the first cache coherence device establishes communication with the second cache coherence device through the switch, the first cache coherence device exposes the remaining space of the remote storage space to the second cache coherence device.
9. The computer system according to claim 8, characterized in that: The second host also includes a second memory. When the storage space required by the second CPU to execute a task is lower than the remaining space of the second memory, the second cache consistency device requests the first memory to use the specific space through the switch and the first cache consistency device.
10. The computer system according to claim 9, characterized in that: The system further comprises a resource monitoring module coupled to the first memory and the second memory, for monitoring the usage status of the second memory, the local storage space and the remote storage space, and providing the inspection result to the first cache consistency device and the second cache consistency device.
11. The computer system according to claim 9, characterized in that: The second cache coherence device records mapping information between the physical address and the translated physical address, and the translated physical address used by the specific space is a physical address of a storage space subsequent to the second memory.
12. The computer system according to claim 6, characterized in that: The switch comprises a CXL switch or a network switch.
13. The computer system according to claim 6, characterized in that: The second cache coherence device is configured to receive the memory request information in accordance with the first protocol, convert the memory request information from being in accordance with the first protocol to being in accordance with the second protocol, and send the memory request information in accordance with the second protocol to the switch; as well as The first cache coherence device is configured to receive the memory request information in accordance with the second protocol from the switch, convert the memory request information from being in accordance with the second protocol to being in accordance with the first protocol, and send the memory request information in accordance with the first protocol to the first CPU, The first protocol is a cache coherent interconnect protocol, and the second protocol is a network protocol.
14. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the method for a computer system according to any one of claims 1 to 5.
