Remote memory access protection mechanism construction method, remote memory node and device
By obtaining permission application in remote memory access and binding the memory window after authentication is passed, and unbinding at the end of access, the problem of insufficient remote data security in the existing technology is solved, and effective access protection and efficiency improvement are achieved.
Patent Information
- Application Number
- CN202310272728.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-03-17
AI Technical Summary
The existing remote memory access protection mechanism has far inferior operational performance to the RDMA data path and cannot effectively isolate illegal remote access, resulting in remote data corruption and privacy leakage.
By obtaining the permission application of the computing node, the memory window is bound to the remote memory address after authentication, and unbinding it at the end of the access. The permission token mechanism is used to isolate illegal access, and the permission token becomes invalid after the access ends.
It effectively isolates illegal remote access, prevents remote data damage and privacy leakage, and improves the security and efficiency of remote memory access.
Smart Images

Figure CN116366317B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of remote memory access technology, and in particular relates to a method for constructing a remote memory access protection mechanism, a remote memory node, and a device. Background Art
[0002] Remote Direct Memory Access (RDMA) is a high-speed network technology with bandwidth in the hundreds of Gbps and low latency in the microseconds. Due to its impressive performance, RDMA is widely used in data centers by major enterprises. Due to information security requirements, RDMA often requires protection mechanisms to address issues such as remote data corruption and privacy leaks. However, existing protection mechanisms have very limited performance, with throughput and latency often far inferior to RDMA data paths, making them ineffective for providing runtime remote memory access protection.
[0003] Therefore, it is necessary to provide a method for constructing a remote memory access protection mechanism that isolates illegal remote access, thereby avoiding remote data corruption and remote data privacy leakage. Summary of the Invention
[0004] The embodiments of the present application provide a method for constructing a remote memory access protection mechanism, a remote memory node, and a device, which can isolate illegal remote access, thereby avoiding remote data damage and remote data privacy leakage.
[0005] In a first aspect, an embodiment of the present application provides a method for constructing a remote memory access protection mechanism, which is applied to a remote memory node in a remote memory architecture, wherein the remote memory architecture also includes a computing node. The method includes:
[0006] Obtaining the permission application of the computing node. The permission application is generated based on the computing node submitting the user program's access request to the network card queue pair. The access request includes the remote memory address.
[0007] If the permission request is authenticated, the memory window is bound to the remote memory address and a permission token is returned. The permission token is used for remote memory access.
[0008] When the remote memory access is completed, the memory window is unbound from the remote memory address to invalidate the permission symbol.
[0009] In some embodiments, if the permission request is authenticated, the memory window is bound to the remote memory address and a permission symbol is returned, including:
[0010] If the permission request is authenticated, obtain the historical permission symbol corresponding to the ongoing remote memory access;
[0011] Determine whether the permission application conflicts with historical permission symbols;
[0012] If there is no conflict between the permission request and the historical permission symbol, the memory window is bound to the remote memory address and the permission symbol is returned.
[0013] In some embodiments, if the permission request is authenticated, the memory window is bound to the remote memory address, and after returning the permission symbol, the method further includes:
[0014] Store the permission token in the hash table;
[0015] When the remote memory access is completed, the memory window is unbound from the remote memory address to invalidate the permission symbol. The method further includes:
[0016] Remove the permission token from the hash table.
[0017] In some embodiments, the permission symbol includes lease semantics, and the lease semantics corresponds to a lease period. If the permission request is authenticated, the memory window is bound to the remote memory address, and after returning the permission symbol, the method further includes:
[0018] When the response time of remote memory access exceeds the lease period, the memory window is unbound from the remote memory address to invalidate the permission token.
[0019] In some embodiments, the lease period is updated based on a user program using a unilateral access to the remote memory.
[0020] In some embodiments, the network card queue pair has a backup queue pair, wherein the backup queue pair replaces the network card queue pair in the event of a failure of the network card queue pair.
[0021] In some embodiments, when the remote memory access ends, unbinding the memory window from the remote memory address to invalidate the permission symbol includes:
[0022] When the remote memory access is completed, obtain the load pressure of the remote memory architecture and the number of unbound memory windows;
[0023] When the load pressure is less than a preset pressure threshold, or the quantity is less than a preset quantity threshold, the memory window is unbound from the remote memory address to invalidate the permission symbol.
[0024] In some embodiments, the method further comprises:
[0025] Combine a memory window binding operation and an unbinding operation into a binding change operation;
[0026] When multiple remote memory addresses to be bound are consecutive addresses, multiple binding operations of the memory window are replaced with one batch binding operation.
[0027] In some embodiments, the remote memory architecture includes a plurality of compute nodes and a plurality of remote memory nodes.
[0028] In a second aspect, an embodiment of the present application provides a remote memory node, which belongs to a remote memory architecture. The remote memory architecture also includes a computing node. The remote memory node includes:
[0029] An acquisition module is used to obtain a permission application from a computing node. The permission application is generated based on the computing node submitting an access request from a user program to a network card queue pair. The access request includes a remote memory address.
[0030] The binding module is used to bind the memory window to the remote memory address and return the permission symbol when the permission application is authenticated. The permission symbol is used for remote memory access.
[0031] The unbinding module is used to unbind the memory window from the remote memory address when the remote memory access ends, so as to invalidate the permission symbol.
[0032] In a third aspect, an embodiment of the present application provides a device for constructing a remote memory access protection mechanism, the device comprising:
[0033] a processor and a memory storing programs or instructions;
[0034] The above method is implemented when the processor executes the program or instruction.
[0035] In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium, on which a program or instruction is stored, and the above-mentioned method is implemented when the program or instruction is executed by a processor.
[0036] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the above method.
[0037] The remote memory access protection mechanism construction method, remote memory node and device of the embodiment of the present application can obtain the permission application of the computing node. The permission application is generated based on the computing node submitting the access request of the user program to the network card queue pair, and the access request includes the remote memory address; if the permission application authentication is passed, the memory window is bound to the remote memory address and the permission symbol is returned. The permission symbol is used for remote memory access; when the remote memory access ends, the memory window is unbound from the remote memory address to invalidate the permission symbol. In this way, the permission mechanism can be used to effectively isolate illegal remote access from user programs, and the permission symbol will become invalid after the access ends, effectively avoiding the problems of remote data damage, remote data privacy leakage and other problems potentially faced by the remote memory architecture. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0039] Figure 1 This is a flowchart of a method for constructing a remote memory access protection mechanism provided by an embodiment of the present application;
[0040] Figure 2 is a schematic diagram of a remote memory architecture provided in an embodiment of the present application;
[0041] Figure 3 This is a schematic diagram of the remote memory layout and data management format of the remote memory access protection mechanism construction method provided in an embodiment of the present application;
[0042] Figure 4 This is a user usage flow chart of the method for constructing a remote memory access protection mechanism provided in an embodiment of the present application;
[0043] Figure 5 Schematic diagram of a rebinding operation in a method for constructing a remote memory access protection mechanism provided in an embodiment of the present application;
[0044] Figure 6 Schematic diagram of batch binding and batch unbinding operations of the remote memory access protection mechanism construction method provided in an embodiment of the present application;
[0045] Figure 7 is a schematic structural diagram of a remote memory node provided by another embodiment of the present application;
[0046] Figure 8 This is a structural diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0047] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0048] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.
[0049] In order to solve the problems of the prior art, the embodiments of the present application provide a method for constructing a remote memory access protection mechanism, a remote memory node, and a device. The following first introduces the method for constructing a remote memory access protection mechanism provided by the embodiments of the present application.
[0050] Figure 1 FIG2 shows a flow chart of a method for constructing a remote memory access protection mechanism provided by an embodiment of the present application. Figure 1 As shown, the remote memory access protection mechanism construction method can be applied to remote memory nodes in a remote memory architecture. The remote memory architecture can also include computing nodes. The remote memory access protection mechanism construction method can include the following steps:
[0051] Step 101: Obtain a permission application of a computing node. The permission application is generated based on the computing node submitting an access request of a user program to a network card queue pair. The access request includes a remote memory address.
[0052] In step 101, before accessing remote memory, a user can request access permissions from the remote memory on demand through a remote procedure call. Specifically, a user program can submit an access request to a compute node in the remote memory architecture. The access request includes the address of the remote memory the user wishes to access. Upon receiving the access request, the compute node submits it to the network card queue pair, generating a corresponding permission request so that the remote memory node can subsequently retrieve the permission request from the network card queue pair.
[0053] Step 102: If the permission application is authenticated, the memory window is bound to the remote memory address and a permission symbol is returned. The permission symbol is used for remote memory access.
[0054] In step 102, it is understood that the permission request may include the user program's authentication information, such as a user ID and password. The remote memory node can authenticate the permission request based on this authentication information and determine whether the user program can access the remote memory. If so, authentication is successful. At this point, a memory window (MW) can be bound to the remote memory address and a permission token returned, which can be used for remote memory access. In other words, unauthorized remote access will not be executed.
[0055] Step 103: When the remote memory access is completed, the memory window is unbound from the remote memory address to invalidate the permission symbol.
[0056] In step 103, if the remote memory access ends, the memory window and the remote memory address can be untied to invalidate the permission symbol. In this way, since the permission symbol is invalid, the remote memory access cannot be continued, thereby protecting the privacy of the remote data.
[0057] In some examples, such as Figure 2 As shown in , the remote memory architecture can include computing nodes and remote memory nodes, where the remote memory nodes can be divided into two parts: the authority header resource pool and the remote memory pool. Figure 2 As shown in sequence number 1, when a user applies for access rights (i.e., the remote memory node receives the access rights request), the remote memory node allocates a permission header from the permission header resource pool, allocates a block of remote memory from the remote memory pool, binds two MWs to the permission header and remote memory, and returns the two permission tokens to the user. When the user revokes access rights (i.e., remote memory access ends), the remote memory node unbinds the two corresponding MWs, rendering the permission tokens invalid.
[0058] It is understandable that remote memory can be managed using a slab allocator. Remote memory is divided into multiple fixed-size block groups. When users allocate and use remote memory, they can select a piece of remote memory from the smallest non-empty block group that meets the user's needs for allocation according to user needs.
[0059] like Figure 3 As shown, the main part of the remote memory node is divided into the remote memory pool, and a small part is divided into the permission header resource pool. The permission header can include the memory address and length of the open permission, the location of the MW used, the timestamp of the permission opening and the permission lease period, etc.
[0060] The remote memory access protection mechanism construction method of the embodiment of the present application can obtain the permission application of the computing node. The permission application is generated based on the computing node submitting the access request of the user program to the network card queue pair. The access request includes the remote memory address. If the permission application authentication is passed, the memory window is bound to the remote memory address and the permission symbol is returned. The permission symbol is used for remote memory access. When the remote memory access ends, the memory window is unbound from the remote memory address to invalidate the permission symbol. In this way, the permission mechanism can be used to effectively isolate illegal remote access from user programs, and the permission symbol will become invalid after the access ends, effectively avoiding the problems of remote data damage, remote data privacy leakage, etc. that the remote memory architecture may face.
[0061] In some embodiments, step 102 may include the following steps:
[0062] If the permission request is authenticated, obtain the historical permission symbol corresponding to the ongoing remote memory access;
[0063] Determine whether the permission application conflicts with historical permission symbols;
[0064] If there is no conflict between the permission request and the historical permission symbol, the memory window is bound to the remote memory address and the permission symbol is returned.
[0065] In this embodiment, if the permission application is authenticated, the historical permission symbol corresponding to the ongoing remote memory access can be obtained. In other words, the historical permission symbol can refer to the currently valid permission symbol, and the historical permission symbol can be used to determine whether the permission application conflicts with the ongoing remote memory access.
[0066] For example, if the historical permission symbol indicates that the remote memory address corresponding to the permission application is currently being accessed privately, then it can be considered that there is a conflict between the permission application and the historical permission symbol. After the conflict is resolved (that is, after the private remote memory access is completed), the memory window can be bound to the remote memory address and the permission symbol can be returned.
[0067] If the permission request does not conflict with the historical permission symbol, the memory window can be directly bound to the remote memory address and the permission symbol can be returned.
[0068] In some examples, such as Figure 4 As shown, Figure 4 Part (a) in the figure illustrates a non-conflicting situation. User 1 applies for shared access rights to a remote memory node and is currently accessing the shared remote memory. During this remote memory access, User 1 can extend the permission lease on the remote memory node. This permission lease extension operation can occur multiple times. At this point, User 1 initiates a remote write and remote read operation to the remote memory, along with a permission token. If the permission token has not expired, the remote write and remote read operations are successfully executed. If the permission token has expired, the remote write and remote read operations are not executed. During this process, User 2 can apply for the same shared permission, and multiple shared permissions pointing to the same remote memory can exist simultaneously.
[0069] in Figure 4 Part (b) shows a conflicting situation. User 1 applies for private access rights to a remote memory node and is currently accessing private remote memory. At this time, user 2 also applies for access rights to the same remote memory node. Due to the conflicting rights, the remote memory node delays granting user 2 access rights until the conflict is resolved.
[0070] It is understandable that if user 1's user program crashes, when the lease of user 1's permission symbol times out, user 1's private access rights are forcibly and automatically reclaimed, and the permission conflict is resolved. At this time, the remote memory node grants user 2 access rights, that is, returns the permission symbol to user 2.
[0071] In some embodiments, after step 102, the method for establishing a remote memory access protection mechanism may further include the following steps:
[0072] Store the permission token in the hash table;
[0073] When the remote memory access is completed, the memory window is unbound from the remote memory address to invalidate the permission symbol. The method further includes:
[0074] Remove the permission token from the hash table.
[0075] In this embodiment, the permission symbol may be managed using a hash table, that is, after the permission symbol is returned, the permission symbol may be stored in the hash table, and after the permission symbol becomes invalid, the permission symbol may be deleted from the hash table.
[0076] The key of the hash table can be the remote memory address that the user applies to access, and the value is the metadata required for permission management. The metadata may include the address of the remote memory, the location of the MW, the permission opening time, and the permission lease period.
[0077] In this way, by managing permission symbols through a hash table, conflicting permission applications can be quickly detected to improve the operating efficiency of remote memory access.
[0078] In some examples, such as Figure 2 As shown in sequence number 2, permission symbols can be managed in the form of a hash table. The remote memory covered by the permission symbol needs to be aligned with the blocks in the slab allocator block group. The permission symbol is stored in the hash table. The key of the hash table is the remote memory address that the user requests to access, and the value is the metadata required for permission management, that is, the permission header, which can include the address of the remote memory, the location of the MW, the permission activation time, and the permission lease period.
[0079] Remote memory nodes can detect conflicting permission requests through a hash table. When processing a user's permission request, the remote memory node uses the remote memory address requested in the request as the key to query the hash table. If an access conflict is detected between the permission request and the historical permission symbols in the hash table, the permission request will be delayed until the conflict is resolved.
[0080] In some embodiments, the permission symbol includes lease semantics, and the lease semantics corresponds to a lease period. After step 102, the method for constructing a remote memory access protection mechanism may further include the following steps:
[0081] When the response time of remote memory access exceeds the lease period, the memory window is unbound from the remote memory address to invalidate the permission token.
[0082] In this embodiment, the permission symbol may include lease semantics, which correspond to a lease period. If a user program is suspended or crashes, the response time for remote memory access will often time out. In this case, the lease semantics can be used to release residual permissions, that is, to unbind the memory window from the remote memory address, thereby invalidating the permission symbol. Using the lease mechanism can solve the problem of permission resource leakage and system blockage caused by user program crashes or suspensions.
[0083] In some embodiments, the lease period is updated based on a user program using a unilateral access to the remote memory.
[0084] In this embodiment, the lease semantics can support the extension of the lease period, and the lease period is updated based on the user program using a remote memory unilateral access method. For example, the permission lease field on the permission header is exposed to the user through the MW, and the user uses the compare and swap primitive (CAS) of the remote memory unilateral access to complete the update of the permission lease variable. Accordingly, the remote memory node can periodically access the hash table, check the permission lease variable of the permission symbol therein, and abolish all permission symbols that have exceeded the lease period. The permission symbol is abolished by unbinding the related MW, making the related permission symbol invalid.
[0085] In some examples, to avoid fairness issues between shared and private permissions caused by repeated lease extensions, a remote memory node can refuse to extend the lease of a permission symbol when it detects that a piece of remote memory is actively in a shared or private access state for a long time. For example, the remote memory node can set the permission lease field of the permission header to zero. When the user extends the lease of the permission, the compare and exchange primitive fails and returns a zero value, so the user knows that the permission extension is prohibited. At the same time, the remote memory node can reserve a bit in the start time field of the permission header and set the bit to one to mark that the permission symbol should be revoked after the current round of timeout.
[0086] In some examples, to avoid resource occupation issues caused by repeated lease extensions, no permission token can remain valid beyond a maximum lifetime. The maximum lifetime can be set based on actual needs and is not specifically limited here. The permission activation time stored in the permission header can be used for judgment. Permission tokens that exceed the maximum lifetime are considered to have timed out and are revoked.
[0087] In some embodiments, the network card queue pair has a backup queue pair, wherein the backup queue pair replaces the network card queue pair in the event of a failure of the network card queue pair.
[0088] In this embodiment, the network card queue pair required for remote memory access can have multiple backup queue pairs. If a network card queue pair fails due to illegal remote access by a user, the backup queue pair can replace the failed network card queue pair, thereby quickly restoring the user's remote memory access capability. This minimizes the additional recovery time caused by queue pair failures due to illegal remote access by using a small number of redundant backup queue pairs.
[0089] In some examples, such as Figure 2 As shown in sequence number 3, any remote memory access with an illegal or expired permission token will not be executed. For example, even if an illegal permission request is sent to the network card queue pair, the illegal permission token attached to the illegal permission request will be detected by the network card on the remote memory node side, and the remote memory access will not be executed by the remote memory node's network card.
[0090] In some examples, such as Figure 2 As shown in sequence number 4, the network card queue pair can have several redundant standby queue pairs to complete the switching of the standby queue pair when the network card queue pair fails. Each user program in the remote memory architecture will be assigned a fixed virtual queue pair number. The virtual queue pair number is mapped to an actual network card queue pair through a virtual-to-real mapping table. All permission requests of the user program will be sent to the actual network card queue pair according to the mapping table. Illegal remote memory access will make the network card queue pair invalid. At this time, the standby queue pair will replace the failed network card queue pair, and the virtual-to-real mapping table will be changed to remap the virtual queue number to a valid standby queue pair so that the remote memory access capability can be quickly restored.
[0091] In some embodiments, step 103 may include the following steps:
[0092] When the remote memory access is completed, obtain the load pressure of the remote memory architecture and the number of unbound memory windows;
[0093] When the load pressure is less than a preset pressure threshold, or the quantity is less than a preset quantity threshold, the memory window is unbound from the remote memory address to invalidate the permission symbol.
[0094] In this embodiment, when the remote memory access ends, the load pressure of the remote memory architecture and the number of unbound memory windows can be obtained. If the load pressure is less than a preset pressure threshold, or the number is less than a preset number threshold, the memory window can be unbound from the remote memory address to invalidate the permission symbol. If the load pressure is greater than or equal to the preset pressure threshold, and the number of unbound memory windows is greater than or equal to the preset number threshold, the unbinding operation can be delayed. The preset pressure threshold and the preset number threshold can be set according to actual needs and are not specifically limited here.
[0095] In other words, when processing a memory window unbinding operation, if the remote memory framework faces high load pressure, the memory window unbinding operation can be delayed until the load pressure is relieved or the number of available memory windows is lower than a critical value.
[0096] In some embodiments, the method for establishing a remote memory access protection mechanism may further include the following steps:
[0097] Combine a memory window binding operation and an unbinding operation into a binding change operation;
[0098] When multiple remote memory addresses to be bound are consecutive addresses, multiple binding operations of the memory window are replaced with one batch binding operation.
[0099] In this embodiment, a memory window binding operation and an unbinding operation can be combined into a rebinding operation. Figure 5 As shown in the figure, when processing requests to bind and unbind a memory window simultaneously, the memory window rebinding method can be used to complete the process. During the rebinding, the memory window to be unbound is rebound to the remote memory whose access rights need to be exposed, and the newly generated permission token is returned.
[0100] When multiple remote memory addresses to be bound are consecutive addresses, multiple binding operations of the memory window can be replaced with one batch binding operation. For example, Figure 6 As shown in Figure 1, when binding multiple MWs to contiguous remote memory, multiple memory window binding operations can be reduced to a single memory window binding operation for the entire contiguous remote memory address. Besides being allocated from the permission resource pool, permission headers are also speculatively allocated immediately before the remote memory. This reduces the two memory window binding operations—binding to the remote memory and binding to the adjacent permission header—to a single binding operation for the contiguous remote memory address.
[0101] Similarly, if Figure 6 As shown, when multiple MWs corresponding to continuous remote memories are unbound, multiple memory window unbinding operations can be reduced to one memory window batch unbinding operation for the entire continuous remote memory address.
[0102] In this way, the number of operations can be effectively reduced, thereby improving the efficiency of remote memory access.
[0103] In some embodiments, the remote memory architecture includes a plurality of compute nodes and a plurality of remote memory nodes.
[0104] In this embodiment, the remote memory architecture may include multiple compute nodes and multiple remote memory nodes. The compute nodes have relatively large computing resources and limited memory capacity, while the remote memory nodes have limited computing resources and relatively large memory capacity. The remote memory architecture allows the compute nodes and memory nodes to scale independently, thereby improving resource utilization within the data center.
[0105] Based on the method for constructing a remote memory access protection mechanism provided in the above embodiment, the present application also provides an embodiment of a remote memory node.
[0106] Figure 7 A schematic structural diagram of a remote memory node provided in another embodiment of the present application is shown. For ease of explanation, only the portion related to the embodiment of the present application is shown.
[0107] Reference Figure 7 The remote memory node 700 belongs to a remote memory architecture. The remote memory architecture may further include a computing node. The remote memory node 700 may include:
[0108] An acquisition module 701 is configured to acquire a permission application from a computing node. The permission application is generated based on the computing node submitting an access request from a user program to a network card queue pair. The access request includes a remote memory address.
[0109] Binding module 702, for binding the memory window to the remote memory address and returning a permission symbol when the permission application is authenticated, the permission symbol being used for remote memory access;
[0110] The unbinding module 703 is used to unbind the memory window from the remote memory address when the remote memory access ends, so as to invalidate the permission symbol.
[0111] In some embodiments, the binding module 702 may also be used to:
[0112] If the permission request is authenticated, obtain the historical permission symbol corresponding to the ongoing remote memory access;
[0113] Determine whether the permission application conflicts with historical permission symbols;
[0114] If there is no conflict between the permission request and the historical permission symbol, the memory window is bound to the remote memory address and the permission symbol is returned.
[0115] In some embodiments, the remote memory node 700 may include:
[0116] A storage module, used to store permission symbols in a hash table;
[0117] The delete module is used to delete the permission symbol from the hash table.
[0118] In some embodiments, the permission symbol includes lease semantics, and the lease semantics corresponds to a lease period. The unbinding module 703 can also be used to:
[0119] When the response time of remote memory access exceeds the lease period, the memory window is unbound from the remote memory address to invalidate the permission token.
[0120] In some embodiments, the lease period is updated based on a user program using a unilateral access to the remote memory.
[0121] In some embodiments, the network card queue pair has a backup queue pair, wherein the backup queue pair replaces the network card queue pair in the event of a failure of the network card queue pair.
[0122] In some embodiments, the unbinding module 703 may also be used to:
[0123] When the remote memory access is completed, obtain the load pressure of the remote memory architecture and the number of unbound memory windows;
[0124] When the load pressure is less than a preset pressure threshold, or the quantity is less than a preset quantity threshold, the memory window is unbound from the remote memory address to invalidate the permission symbol.
[0125] In some embodiments, the remote memory node 700 may include a processing module, which may be configured to:
[0126] Combine a memory window binding operation and an unbinding operation into a binding change operation;
[0127] When multiple remote memory addresses to be bound are consecutive addresses, multiple binding operations of the memory window are replaced with one batch binding operation.
[0128] In some embodiments, the remote memory architecture includes a plurality of compute nodes and a plurality of remote memory nodes.
[0129] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned remote memory access protection mechanism construction method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device. Its specific functions and the technical effects brought about can be found in the method embodiment part, and will not be repeated here.
[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0131] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in yet another embodiment of the present application is shown.
[0132] The device may include a processor 801 and a memory 802 storing programs or instructions.
[0133] When the processor 801 executes the program, the steps in any of the above method embodiments are implemented.
[0134] For example, the program can be divided into one or more modules / units, one or more modules / units are stored in the memory 802 and executed by the processor 801 to complete the present application. One or more modules / units can be a series of program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the program in the device.
[0135] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0136] The memory 802 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 802 may include removable or non-removable (or fixed) media. Where appropriate, the memory 802 may be internal or external to the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.
[0137] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) machine-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0138] The processor 801 implements any one of the methods in the above embodiments by reading and executing the program or instructions stored in the memory 802 .
[0139] In one example, the electronic device may further include a communication interface 803 and a bus 804. The processor 801, the memory 802, and the communication interface 803 are connected via the bus 804 and communicate with each other.
[0140] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0141] Bus 804 includes hardware, software, or both, and couples the components of the online data traffic metering device to each other. By way of example, and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industrial Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Area Network (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 804 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0142] In addition, in conjunction with the methods in the above embodiments, embodiments of the present application may be implemented by providing a machine-readable storage medium. The machine-readable storage medium stores a program or instructions; when the program or instructions are executed by a processor, any of the methods in the above embodiments is implemented. The machine-readable storage medium can be read by a machine, such as a computer.
[0143] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0144] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0145] An embodiment of the present application provides a computer program product, which is stored in a machine-readable storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0146] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0147] The functional modules shown in the block diagrams described above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they may be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, and the like. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave over a transmission medium or communication link. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memory, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. Code segments can be downloaded via computer networks such as the Internet or an intranet.
[0148] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0149] Aspects of the present disclosure have been described above with reference to flowcharts and / or block diagrams of methods, devices (systems), and program products according to embodiments of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, as well as combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer programs or instructions. These programs or instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine such that execution of these instructions by the processor of the computer or other programmable data processing device enables the implementation of the functions / actions specified in one or more blocks in the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It should also be understood that each block in the block diagrams and / or flowcharts, as well as combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware that performs the specified functions or actions, or by a combination of dedicated hardware and computer instructions.
[0150] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A method for constructing a remote memory access protection mechanism, characterized in that: A remote memory node in a remote memory architecture, wherein the remote memory architecture further includes a computing node, wherein the method comprises: Obtaining a permission application of the computing node, the permission application being generated based on the computing node submitting an access request of a user program to a network card queue pair, the access request including a remote memory address; If the permission application is authenticated, the memory window is bound to the remote memory address and a permission symbol is returned, where the permission symbol is used for remote memory access; When the remote memory access is completed, obtaining the load pressure of the remote memory architecture and the number of unbound memory windows; When the load pressure is less than a preset pressure threshold, or the quantity is less than a preset quantity threshold, unbinding the memory window from the remote memory address to invalidate the permission symbol; The permission symbol includes lease semantics, and the lease semantics corresponds to a lease period. When the permission application is authenticated, the memory window is bound to the remote memory address, and after the permission symbol is returned, the method further includes: When the response time of the remote memory access exceeds the lease period, the memory window is unbound from the remote memory address to invalidate the permission symbol.
2. The method according to claim 1, characterized in that When the permission application is authenticated, the memory window is bound to the remote memory address and a permission symbol is returned, including: If the permission application is authenticated, obtaining a historical permission symbol corresponding to the ongoing remote memory access; Determine whether the permission application conflicts with the historical permission symbol; In the case that there is no conflict between the permission application and the historical permission symbol, the memory window is bound to the remote memory address and the permission symbol is returned.
3. The method according to claim 1 or 2, characterized in that When the permission application is authenticated, the memory window is bound to the remote memory address, and after returning the permission symbol, the method further includes: Storing the permission symbol in a hash table; When the remote memory access ends, after unbinding the memory window from the remote memory address to invalidate the permission symbol, the method further includes: Delete the permission token from the hash table.
4. The method according to claim 1, wherein The lease period is updated based on the user program using a remote memory unilateral access method.
5. The method according to claim 1, wherein The network card queue pair has a backup queue pair, wherein in the event that the network card queue pair fails, the backup queue pair replaces the network card queue pair.
6. The method according to claim 1, characterized in that The method further comprises: Combining a binding operation and an unbinding operation of the memory window into a binding change operation; In the case that multiple remote memory addresses to be bound are consecutive addresses, multiple binding operations of the memory window are replaced with one batch binding operation.
7. The method according to claim 1, characterized in that The remote memory architecture includes multiple computing nodes and multiple remote memory nodes.
8. A remote memory node, characterized in that: Belonging to a remote memory architecture, the remote memory architecture also includes a computing node, and the remote memory node includes: an acquisition module, configured to acquire a permission application of the computing node, wherein the permission application is generated based on the computing node submitting an access request of a user program to a network card queue pair, wherein the access request includes a remote memory address; A binding module is used to bind the memory window to the remote memory address and return a permission symbol when the permission application is authenticated, wherein the permission symbol is used for remote memory access; Unbinding module, used for: When the remote memory access is completed, obtaining the load pressure of the remote memory architecture and the number of unbound memory windows; When the load pressure is less than a preset pressure threshold, or the quantity is less than a preset quantity threshold, unbinding the memory window from the remote memory address to invalidate the permission symbol; The permission symbol includes lease semantics, and the lease semantics corresponds to a lease period. The unbinding module is further used to: When the response time of the remote memory access exceeds the lease period, the memory window is unbound from the remote memory address to invalidate the permission symbol.
9. An electronic device, characterized in that: The device includes: a processor and a memory storing programs or instructions; When the processor executes the program or instruction, the method according to any one of claims 1 to 7 is implemented.
10. A machine-readable storage medium, characterized in that The machine-readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Remote direct memory access authorization
US20190141041A1