WO2024192557A1 - 远端内存访问保护机制构建方法、远端内存节点及设备 - Google Patents
远端内存访问保护机制构建方法、远端内存节点及设备 Download PDFInfo
- Publication number
- WO2024192557A1 WO2024192557A1 PCT/CN2023/082125 CN2023082125W WO2024192557A1 WO 2024192557 A1 WO2024192557 A1 WO 2024192557A1 CN 2023082125 W CN2023082125 W CN 2023082125W WO 2024192557 A1 WO2024192557 A1 WO 2024192557A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- permission
- remote
- remote memory
- memory
- symbol
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/163—Interprocessor communication
- G06F15/173—Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
Definitions
- the present application belongs to the field of remote memory access technology, and in particular, relates to a remote memory access protection mechanism construction method, a remote memory node and a device.
- Remote Direct Memory Access is a high-speed network technology with high bandwidth of hundreds of Gbps and low latency of several microseconds. Due to its performance, RDMA is widely used in data centers by major companies. Based on information security requirements, RDMA often needs to use some protection mechanisms to solve problems such as remote data corruption and remote data privacy leakage. However, the existing protection mechanism operations have very limited performance, and the throughput and latency are often far inferior to the RDMA data path, resulting in the inability to use it to provide runtime remote memory access protection.
- the embodiments of the present application provide a remote memory access protection mechanism construction method, a remote memory node and a device, which can isolate illegal remote access, thereby avoiding remote data corruption and remote data privacy leakage.
- 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, and the method includes:
- 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.
- the memory window is bound to the remote content address. And return the permission symbol, which is used for remote memory access;
- the memory window is unbound from the remote content address to invalidate the permission symbol.
- the memory window is bound to the remote content address and a permission symbol is returned, including:
- the memory window is bound to the remote content address and the permission symbol is returned.
- the method when the permission application is authenticated, the memory window is bound to the remote content address, and after the permission symbol is returned, the method further includes:
- the memory window is unbound from the remote content address to invalidate the permission symbol, and the method further includes:
- the permission symbol includes lease semantics, and the lease semantics corresponds to a lease period.
- the memory window is bound to the remote content address, and after the permission symbol is returned, the method further includes:
- the memory window is unbound from the remote content address to invalidate the permission symbol.
- the lease period is updated based on a user program using a single-side access to the remote memory.
- the network card queue pair has a standby queue pair, wherein the standby queue pair replaces the network card queue pair in the event of a failure of the network card queue pair.
- the memory window is unbound from the remote content address to invalidate the permission symbol, including:
- the memory window is unbound from the remote content address to invalidate the permission symbol.
- the method further comprises:
- the remote memory architecture includes a plurality of compute nodes and a plurality of remote memory nodes.
- 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:
- An acquisition module is used to 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.
- the binding module is used to bind the memory window to the remote content address and return the permission symbol when the permission application is authenticated.
- the permission symbol is used for remote memory access.
- the unbinding module is used to unbind the memory window from the remote content address when the remote memory access ends, so as to invalidate the permission symbol.
- an embodiment of the present application provides a remote memory access protection mechanism construction device, the device comprising:
- a processor and a memory storing programs or instructions
- the above method is implemented when the processor executes the program or instruction.
- an embodiment of the present application provides a machine-readable storage medium, on which a program or instruction is stored, and the program or instruction implements the above method when executed by a processor.
- an embodiment of the present application provides a computer program product.
- the electronic device executes the above method.
- 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.
- the access request includes the remote memory address; if the permission application authentication is passed, the memory window is bound to the remote content address and the permission 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 content address to invalidate the permission symbol.
- 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 potential problems such as remote data corruption and remote data privacy leakage faced by the remote memory architecture.
- FIG1 is a flow chart of a method for constructing a remote memory access protection mechanism provided by an embodiment of the present application
- FIG2 is a schematic diagram of a remote memory architecture provided in an embodiment of the present application.
- FIG. 3 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;
- FIG. 4 is a user usage flow chart of a method for constructing a remote memory access protection mechanism provided in an embodiment of the present application
- FIG. 5 is a schematic diagram of a binding change operation of a remote memory access protection mechanism construction method provided in an embodiment of the present application
- FIG. 6 is a schematic diagram of a batch binding operation and a batch unbinding operation of a method for constructing a remote memory access protection mechanism provided in an embodiment of the present application;
- FIG7 is a schematic diagram of the structure of a remote memory node provided by another embodiment of the present application.
- FIG8 is a schematic diagram of the structure of an electronic device provided in yet another embodiment of the present application.
- the embodiments of the present application provide a remote memory access protection mechanism construction method, a remote memory node and a device.
- FIG1 shows a flow chart of a method for constructing a remote memory access protection mechanism provided by an embodiment of the present application.
- the method for constructing a remote memory access protection mechanism can be applied to a remote memory node in a remote memory architecture, and the remote memory architecture can also include a computing node.
- the method for constructing a remote memory access protection mechanism can include the following steps:
- Step 101 obtaining 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, and the access request includes a remote memory address.
- step 101 before accessing the remote memory, the user can request access rights from the remote memory on demand through a remote procedure call. That is, the user can make an access request to the computing node in the remote memory architecture through the user program, and the access request includes the remote memory address that the user wants to access.
- the computing node After receiving the access request, the computing node can submit it to the network card queue pair to generate a corresponding permission application, so that the subsequent remote memory node can obtain the permission application from the network card queue pair.
- Step 102 When the permission application is authenticated, the memory window is bound to the remote content address and a permission symbol is returned. The permission symbol is used for remote memory access.
- the permission application may carry the authentication information of the user program, such as user ID, user password, etc.
- the remote memory node may perform authentication based on the authentication information.
- the authorization request is authenticated to determine whether the user program can access remote memory. If it can, the authorization is passed. At this time, the memory window (MW) can be bound to the remote content address and the authorization symbol is returned.
- the authorization symbol can be used for remote memory access. In other words, unauthorized remote access will not be executed.
- Step 103 when the remote memory access is completed, the memory window is unbound from the remote content address to invalidate the permission symbol.
- step 103 if the remote memory access is completed, the memory window and the remote content address can be unbound to invalidate the permission symbol. In this way, the remote memory access cannot be continued due to the invalid permission symbol, thereby protecting the privacy of the remote data.
- the remote memory architecture may include a computing node and a remote memory node, wherein the remote memory node may be divided into two parts: a permission header resource pool and a remote memory pool.
- the remote memory node allocates a permission header from the permission header resource pool, allocates a piece of remote memory from the remote memory pool, binds two MWs to the permission header and the remote memory respectively, and returns the two permission symbols to the user.
- the remote memory node unbinds the corresponding two MWs, making the permission symbol invalid.
- the remote memory can be managed using a slab allocator.
- the remote memory is divided into multiple fixed-size block groups.
- a user allocates and uses the remote memory, he can select a remote memory from the smallest non-empty block group that meets the user's needs to implement the allocation according to the user's needs.
- the main part of the remote memory node is divided into a remote memory pool, and a small part is divided into a permission header resource pool.
- the permission header may include the memory address and length of the open permission, the location of the MW used, the timestamp of the permission opening, and the lease period of the permission, etc.
- 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 content 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 content address to invalidate the permission symbol.
- the permission mechanism can be used to effectively isolate illegal remote access from user programs, and the permission symbol becomes invalid after the access ends, effectively avoiding potential remote memory architecture violations. Faced with problems such as remote data corruption and remote data privacy leakage.
- step 102 may include the following steps:
- the memory window is bound to the remote content address and the permission symbol is returned.
- the historical permission symbol corresponding to the ongoing remote memory access can be obtained.
- the historical permission symbol can refer to the currently valid permission symbol, and it can be determined whether the permission application conflicts with the ongoing remote memory access based on the historical permission symbol.
- the historical permission symbol indicates that the remote memory address corresponding to the permission application is currently accessing private remote memory, 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 ends), the memory window can be bound to the remote content address and the permission symbol can be returned.
- the memory window can be directly bound to the remote content address and the permission symbol can be returned.
- part (a) of FIG. 4 reflects a non-conflicting situation, where user 1 applies for shared access rights to a remote memory node and is performing shared remote memory access.
- user 1 can extend the lease of the rights to the remote memory node, where the operation of extending the rights lease can occur multiple times.
- user 1 initiates remote write and remote read to the remote memory, and attaches a permission symbol. If the permission symbol has not expired at this time, the remote write and remote read operations can be successfully executed. If the permission symbol has expired at this time, the remote write and remote read operations will not be executed.
- user 2 can apply for the same shared permissions, and multiple shared permissions pointing to the same remote memory can exist at the same time.
- Part (b) in Figure 4 shows a conflict situation.
- User 1 applies for private access rights to the remote memory node and is accessing the private remote memory.
- user 2 applies for access rights to the same remote memory from the remote memory node. Due to the conflict in rights, the remote memory node delays granting access rights to user 2 until the conflict is resolved.
- the remote memory access protection mechanism construction method may further include the following steps:
- the memory window is unbound from the remote content address to invalidate the permission symbol, and the method further includes:
- the permission symbol may be managed using a hash table, that is, the permission symbol may be stored in the hash table after being returned, and may be deleted from the hash table after the permission symbol becomes invalid.
- 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.
- the permission symbols can be managed in the form of a hash table.
- the remote memory covered by the permission symbols needs to be aligned with the blocks in the slab allocator block group.
- the permission symbols are stored in the hash table.
- the key of the hash table is the remote memory address that the user applies to access, and the value is the metadata required for permission management, that is, the permission header, where the permission header may include the address of the remote memory, the location of the MW, the permission activation time, and the permission lease period, etc.
- the remote memory node can detect conflicting permission requests through a hash table.
- the remote memory node queries the hash table using the remote memory address requested in the request as the key. If it is detected that the permission application has an access conflict with the historical permission symbols in the hash table, the permission application will be delayed until the conflict is resolved.
- the permission symbol includes lease semantics
- the lease semantics corresponds to a lease period.
- the permission symbol may include lease semantics, and the lease semantics corresponds to a lease period.
- the lease semantics can be used to release the residual permissions, that is, to unbind the memory window from the remote content address to invalidate the permission symbol.
- the use of the lease mechanism can solve the problem of permission resource leakage and system blocking caused by the crash or suspension of the user program.
- the lease period is updated based on a user program using a single-side access to the remote memory.
- the lease semantics can support the extension of the lease, and the lease is updated based on the user program using a remote memory unilateral access method.
- the permission lease field on the permission header is exposed to the user through MW, and the user uses the compare and swap primitive (Compare and Swap, CAS) of remote memory unilateral access to complete the update of the permission lease variable.
- the remote memory node can periodically access the hash table, check the permission lease variables of the permission symbols 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.
- a remote memory node in order to avoid fairness issues between shared permissions and private permissions caused by repeated lease extensions, when a remote memory node detects that a piece of remote memory is actively in a shared or private access state for a long time, it can refuse to further extend the lease of the permission symbol. 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 comparison exchange primitive fails and returns a zero value, so that the user knows that the permission extension is prohibited. At the same time, the remote memory node can reserve a bit in the opening 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.
- any permission symbol cannot remain valid beyond the maximum lifetime.
- the maximum lifetime can be set according to actual needs and is not specifically limited here.
- the permission opening time stored in the permission header can be used for judgment. Permission symbols that exceed the maximum lifetime are considered to have timed out and are abolished.
- the network card queue pair has a standby queue pair, wherein the standby queue pair replaces the network card queue pair in the event of a failure of the network card queue pair.
- the network card queue pair required for remote memory access may have several backup copies.
- the standby queue pair can replace the failed network card queue pair, thereby quickly restoring the user's remote memory access capability. In this way, by using a small number of redundant backup queue pairs, the additional recovery time caused by queue pair failure due to illegal remote access can be minimized.
- sequence number 3 any remote memory access with an illegal or expired permission symbol will not take effect. For example, even if an illegal permission application is sent to the network card queue pair, the illegal permission symbol attached to the illegal permission application will be detected by the network card on the remote memory node side, and the remote memory access will not be executed by the network card of the remote memory node.
- 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, and the virtual queue pair number will be mapped to an actual network card queue pair through a virtual-to-real mapping table. All permission applications 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.
- 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.
- step 103 may include the following steps:
- the memory window is unbound from the remote content address to invalidate the permission symbol.
- 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 the preset pressure threshold, or the number is less than the preset number threshold, the memory window can be unbound from the remote content 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.
- the unbinding operation of a memory window when processing the unbinding operation of a memory window, if the remote memory framework is under high load pressure, the unbinding operation of the memory window can be delayed until the load pressure is relieved or the memory is available.
- the number of storage windows is lower than the critical value.
- the remote memory access protection mechanism construction method may further include the following steps:
- a binding operation and an unbinding operation of a memory window can be combined into a rebinding operation.
- the memory window rebinding can be used to complete the process.
- the memory window to be unbound is rebinded to the remote memory that needs to expose access rights, and the newly generated permission symbol after the rebinding is returned.
- multiple memory window binding operations can be replaced with one batch binding operation. For example, as shown in Figure 6, when multiple MWs are bound to continuous remote memory, multiple memory window binding operations can be reduced to one memory window binding operation for the entire continuous remote memory address.
- permission headers are also speculatively allocated immediately before the remote memory. The two memory window binding operations of binding to the remote memory and binding to the adjacent permission header are reduced to one binding operation for the continuous remote memory address.
- multiple memory window unbinding operations can be reduced to one memory window batch unbinding operation for the entire continuous remote memory address.
- the remote memory architecture includes a plurality of compute nodes and a plurality of remote memory nodes.
- the remote memory architecture may include multiple computing nodes and multiple remote memory nodes, the computing nodes have more computing resources and limited memory capacity, and the remote memory nodes have limited computing resources and larger memory capacity.
- the remote memory architecture allows the computing nodes and memory nodes to be expanded independently, thereby improving the resource utilization within the data center.
- the present application also provides an embodiment of a remote memory node.
- FIG7 shows a schematic diagram of the structure of a remote memory node provided in another embodiment of the present application. For ease of explanation, only the portion related to the embodiment of the present application is shown.
- 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:
- the acquisition module 701 is used to acquire 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;
- the binding module 702 is used to bind the memory window to the remote content address and return the permission symbol when the permission application authentication is passed.
- the permission symbol is used for remote memory access.
- the unbinding module 703 is used to unbind the memory window from the remote content address when the remote memory access is completed, so as to invalidate the permission symbol.
- the binding module 702 may also be used to:
- the memory window is bound to the remote content address and the permission symbol is returned.
- the remote memory node 700 may include:
- a storage module used to store the permission symbol in a hash table
- the delete module is used to delete the permission symbol from the hash table.
- the permission symbol includes lease semantics, and the lease semantics corresponds to a lease period.
- the unbinding module 703 can also be used to:
- the memory window is unbound from the remote content address to invalidate the permission symbol.
- the lease period is updated based on a user program using a single-side access to the remote memory.
- the network card queue pair has a standby queue pair, wherein the standby queue pair replaces the network card queue pair in the event of a failure of the network card queue pair.
- the unbinding module 703 may also be used to:
- the memory window is unbound from the remote content address to invalidate the permission symbol.
- the remote memory node 700 may include a processing module, which may be configured to:
- the remote memory architecture includes a plurality of compute nodes and a plurality of remote memory nodes.
- FIG8 shows a schematic diagram of the hardware structure of an electronic device provided in yet another embodiment of the present application.
- the device may include a processor 801 and a memory 802 storing programs or instructions.
- the program may 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 may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.
- the above-mentioned 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.
- CPU central processing unit
- ASIC application specific integrated circuit
- the memory 802 may include a large capacity memory for data or instructions.
- 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.
- the memory 802 may include removable or non-removable (or fixed) media.
- the memory 802 may be inside or outside the integrated gateway disaster recovery device.
- the memory 802 is a non-volatile solid-state memory.
- 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.
- ROM read-only memory
- RAM random access memory
- magnetic disk storage media devices magnetic disk storage media devices
- optical storage media devices flash memory devices
- electrical, optical or other physical/tangible memory storage devices typically, 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.
- the processor 801 implements any one of the methods in the above embodiments by reading and executing the program or instruction stored in the memory 802 .
- 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.
- 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.
- the bus 804 includes hardware, software, or both, coupling the components of the online data traffic metering device to each other.
- the bus may include an accelerated graphics port (AGP) or Other graphics buses, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnect, industry standard architecture (ISA) bus, infinite bandwidth interconnect, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnect (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.
- bus 804 may include one or more buses.
- the embodiment of the present application may provide a machine-readable storage medium for implementation.
- the machine-readable storage medium stores a program or instruction; when the program or instruction is executed by a processor, any one of the methods in the above embodiment is implemented.
- the machine-readable storage medium can be read by a machine such as a computer.
- 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 can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- 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.
- 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.
- the functional modules shown in the above structural block diagram can be implemented as hardware, software, firmware or a combination thereof.
- it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.
- ASIC application-specific integrated circuit
- the elements of the present application are programs or code segments used to perform the required tasks.
- Programs or code segments may be stored in a machine-readable medium or transmitted over a transmission medium or communication link via a data signal carried in a carrier wave.
- "Machine-readable medium” may include any medium capable of storing or transmitting information.
- machine-readable media examples include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like.
- the code segments may be downloaded via a computer grid such as the Internet, an intranet, and the like.
- each box in the flowchart and/or block diagram and the combination of each box in the flowchart and/or block diagram can be implemented by a computer program or instruction.
- 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 so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function/action specified in one or more boxes of the flowchart and/or block diagram.
- 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 can also be understood that each box in the block diagram and/or flowchart and the combination of boxes in the block diagram and/or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
本申请提供了一种远端内存访问保护机制构建方法、远端内存节点及设备,方法包括:获取计算节点的权限申请,权限申请基于计算节点将用户程序的访问请求提交至网卡队列对上生成,访问请求包括远端内存地址;在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限符,权限符用于远端内存访问;在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
Description
本申请属于远端内存访问技术领域,尤其涉及一种远端内存访问保护机制构建方法、远端内存节点及设备。
远端内存直接访问机制(Remote Direct Memory Access,RDMA)是一种高速网络技术,其具有数百Gbps级别的高带宽和数微秒级的低延迟。因其性能,RDMA被各大企业广泛地运用在数据中心内。基于信息安全的需求,RDMA往往需要通过一些保护机制来解决远端数据损坏、远端数据隐私泄露等问题,然而现有的保护机制操作均具有十分受限的性能,吞吐和延迟往往远劣于RDMA的数据路径,导致无法利用其提供运行期的远端内存访问保护。
因此,有必要提供一种隔离非法远程访问,从而避免远端数据损坏、远端数据隐私泄露的远端内存访问保护机制构建方法。
发明内容
本申请实施例提供一种远端内存访问保护机制构建方法、远端内存节点及设备,能够隔离非法远程访问,从而避免远端数据损坏、远端数据隐私泄露。
第一方面,本申请实施例提供一种远端内存访问保护机制构建方法,应用于远端内存架构中的远端内存节点,远端内存架构还包括计算节点,方法包括:
获取计算节点的权限申请,权限申请基于计算节点将用户程序的访问请求提交至网卡队列对上生成,访问请求包括远端内存地址;
在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,
并返回权限符,权限符用于远端内存访问;
在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
在一些实施例中,在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限符,包括:
在权限申请鉴权通过的情况下,获取正在进行的远端内存访问对应的历史权限符;
确定权限申请与历史权限符是否存在冲突;
在权限申请与历史权限符不存在冲突的情况下,将内存窗口绑定到远端内容地址上,并返回权限符。
在一些实施例中,在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限符之后,方法还包括:
将权限符存储至哈希表中;
在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效之后,方法还包括:
将权限符从哈希表中删除。
在一些实施例中,权限符包括租约语义,租约语义对应有租期,在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限符之后,方法还包括:
在远端内存访问的响应时长超过租期的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
在一些实施例中,租期基于用户程序采用远端内存单边访问的方式进行更新。
在一些实施例中,网卡队列对具有备用队列对,其中在网卡队列对失效的情况下,备用队列对替代网卡队列对。
在一些实施例中,在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效,包括:
在远端内存访问结束的情况下,获取远端内存架构的负载压力和未绑定的内存窗口的数量;
在负载压力小于预设压力阈值,或数量小于预设数量阈值的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
在一些实施例中,方法还包括:
将内存窗口的一次绑定操作和一次解绑操作合并为一次换绑操作;
在多个待绑定的远端内存地址为连续地址的情况下,将内存窗口的多次绑定操作替换为一次批量绑定操作。
在一些实施例中,远端内存架构包括多个计算节点和多个远端内存节点。
第二方面,本申请实施例提供了一种远端内存节点,所属于远端内存架构,远端内存架构还包括计算节点,远端内存节点包括:
获取模块,用于获取计算节点的权限申请,权限申请基于计算节点将用户程序的访问请求提交至网卡队列对上生成,访问请求包括远端内存地址;
绑定模块,用于在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限符,权限符用于远端内存访问;
解绑模块,用于在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
第三方面,本申请实施例提供了一种远端内存访问保护机制构建设备,设备包括:
处理器以及存储有程序或指令的存储器;
处理器执行程序或指令时实现上述的方法。
第四方面,本申请实施例提供了一种机器可读存储介质,机器可读存储介质上存储有程序或指令,程序或指令被处理器执行时实现上述的方法。
第五方面,本申请实施例提供了一种计算机程序产品,计算机程序产品中的指令由电子设备的处理器执行时,使得电子设备执行上述方法。
本申请实施例的远端内存访问保护机制构建方法、远端内存节点及设备,能够获取计算节点的权限申请,权限申请基于计算节点将用户程序的访问请求提交至网卡队列对上生成,访问请求包括远端内存地址;在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限
符,权限符用于远端内存访问;在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。这样,能够利用权限机制有效隔离了来自用户程序的非法远程访问,且在访问结束后权限符即失效,有效避免远端内存架构潜在面临的远端数据损坏、远端数据隐私泄露等问题。
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单的介绍,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一个实施例提供的远端内存访问保护机制构建方法的流程示意图;
图2是本申请实施例提供的远端内存架构的示意图;
图3是本申请实施例提供的远端内存访问保护机制构建方法的远端内存布局和数据管理格式示意图;
图4是本申请实施例提供的远端内存访问保护机制构建方法的用户使用流程图;
图5是本申请实施例提供的远端内存访问保护机制构建方法的换绑操作的示意图;
图6是本申请实施例提供的远端内存访问保护机制构建方法的批量绑定操作及批量解绑操作的示意图;
图7是本申请另一个实施例提供的远端内存节点的结构示意图;
图8是本申请又一个实施例提供的电子设备的结构示意图。
下面将详细描述本申请的各个方面的特征和示例性实施例,为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及具体实施例,对本申请进行进一步详细描述。应理解,此处所描述的具体实施例仅意在解释本申请,而不是限定本申请。对于本领域技术人员来说,本申请可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述
仅仅是为了通过示出本申请的示例来提供对本申请更好的理解。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
为了解决现有技术问题,本申请实施例提供了一种远端内存访问保护机制构建方法、远端内存节点及设备。下面首先对本申请实施例所提供的远端内存访问保护机制构建方法进行介绍。
图1示出了本申请一个实施例提供的远端内存访问保护机制构建方法的流程示意图。如图1所示,远端内存访问保护机制构建方法可以应用于远端内存架构中的远端内存节点,远端内存架构还可以包括计算节点,远端内存访问保护机制构建方法可以包括如下步骤:
步骤101,获取计算节点的权限申请,权限申请基于计算节点将用户程序的访问请求提交至网卡队列对上生成,访问请求包括远端内存地址。
在步骤101中,用户在访问远端内存前,可以通过远端过程调用的方式,按需地向远端内存请求访问权限。即用户可以通过用户程序可以向远端内存架构中的计算节点提出访问请求,访问请求中包括了用户想要访问的远端内存地址。计算节点接收到该访问请求后可以提交至网卡队列对张,生成对应的权限申请,以便后续远端内存节点可以从网卡队列对中获取该权限申请。
步骤102,在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限符,权限符用于远端内存访问。
在步骤102中,可以理解的是,权限申请中可以携带用户程序的鉴权信息,例如用户ID、用户密码等,远端内存节点可以基于这些鉴权信息对
该权限申请中的进行鉴权,判断该用户程序是否可以进行远端内存访问,若可以则说明鉴权通过,此时可以将内存窗口(Memory Window,MW)绑定到远端内容地址上,并返回权限符,权限符可以用于远端内存访问。换而言之,无权限的远端访问将不被执行。
步骤103,在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
在步骤103中,若远端内存访问结束,则可以将内存窗口与远端内容地址解绑,以使权限符失效。这样,由于权限符失效,导致无法继续执行远端内存访问,从而保护了远端数据的隐私。
在一些示例中,如图2所示,远端内存架构可以包括计算节点和远端内存节点,其中远端内存节点可以分为权限头资源池和远端内存池两部分。如图2序号1所示,当用户申请访问权限时(即远端内存节点可以获取权限申请),远端内存节点从权限头资源池分配一个权限头,从远端内存池分配一块远端内存,将两个MW分别绑定到权限头和远端内存上,并将两个权限符返回给用户。当用户撤销访问权限(即远端内存访问结束)时,远端内存节点将对应的两个MW解绑,使得权限符失效。
可以理解的是,远端内存可以使用slab分配器进行管理,远端内存被划分进多个固定大小的块组中,用户分配和使用远端内存时,可以根据用户需求,从满足用户需要的最小非空块组中选择一块远端内存实现分配。
如图3所示,远端内存节点的主要部分划分为远端内存池,少数部分划分为权限头资源池,权限头可以包括开放权限的内存地址与长度、所使用的MW的位置、权限开启的时间戳和权限的租期等。
本申请实施例的远端内存访问保护机制构建方法能够获取计算节点的权限申请,权限申请基于计算节点将用户程序的访问请求提交至网卡队列对上生成,访问请求包括远端内存地址;在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限符,权限符用于远端内存访问;在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。这样,能够利用权限机制有效隔离了来自用户程序的非法远程访问,且在访问结束后权限符即失效,有效避免远端内存架构潜在
面临的远端数据损坏、远端数据隐私泄露等问题。
在一些实施例中,步骤102可以包括如下步骤:
在权限申请鉴权通过的情况下,获取正在进行的远端内存访问对应的历史权限符;
确定权限申请与历史权限符是否存在冲突;
在权限申请与历史权限符不存在冲突的情况下,将内存窗口绑定到远端内容地址上,并返回权限符。
在本实施例中,在权限申请鉴权通过的情况下,可以获取正在进行的远端内存访问对应的历史权限符。换而言之,历史权限符可以是指正在有效的权限符,可以根据历史权限符,判断该权限申请是否与正在进行的远端内存访问存在冲突。
例如,若历史权限符指示权限申请对应的远端内存地址正在进行私有的远端内存访问,则可以认为此时权限申请与历史权限符存在冲突,可以在冲突被化解后(即私有的远端内存访问结束后),再将内存窗口绑定到远端内容地址上,并返回权限符。
若权限申请与历史权限符不存在冲突,则可以直接将内存窗口绑定到远端内容地址上,并返回权限符。
在一些示例中,如图4所示,其中图4中的(a)部分体现了一种不冲突的情况,用户1向远端内存节点申请共享的访问权限,正在进行共享的远端内存访问,在远端内存访问过程中,用户1可以向远端内存节点拓展权限的租期,其中拓展权限租期的操作可发生多次。此时用户1向远端内存发起远端写和远端读,并附带权限符,若此时权限符尚未过期,则远端写和远端读操作可成功执行,若此时权限符已过期,则远端写操作和远端读操作不被执行。在此过程中,用户2可申请相同的共享权限,多个指向相同远端内存的共享权限可以同时存在。
其中图4中的(b)部分体现了一种存在冲突的情况,用户1向远端内存节点申请私有的访问权限,正在进行私有的远端内存访问,此时用户2向远端内存节点申请访问相同远端内存的权限,因权限冲突,远端内存节点延迟给予用户2的访问权限,直到冲突被化解。
可以理解的是,若用户1的用户程序崩溃后,待用户1的权限符的租约超时,则用户1的私有访问权限被强制且自动地回收,权限冲突被化解,此时远端内存节点给予用户2访问权限,即返回权限符给用户2。
在一些实施例中,步骤102之后,远端内存访问保护机制构建方法还可以包括如下步骤:
将权限符存储至哈希表中;
在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效之后,方法还包括:
将权限符从哈希表中删除。
在本实施例中,权限符可以使用哈希表进行管理,即在返回权限符后可以将权限符存储至哈希表中,在权限符失效后,可以将权限符从哈希表中删除。
其中,哈希表的键可以为用户申请访问的远端内存地址,值为权限管理所需元数据,元数据可以包括远端内存的地址、MW的位置、权限开启时间和权限租期等。
这样,通过哈希表来管理权限符,可以快速检测存在冲突的权限申请,以便提高远端内存访问的运行效率。
在一些示例中,如图2序号2所示,权限符可以以哈希表的方式进行管理,权限符所覆盖的远端内存需要与slab分配器块组中的块对齐,权限符被存储在哈希表中,哈希表的键为用户申请访问的远端内存地址,值为权限管理所需元数据,即权限头,其中权限头可以包括远端内存的地址、MW的位置、权限开启时间和权限租期等。
远端内存节点可以通过哈希表检测冲突的权限申请,远端内存节点在处理用户的权限申请请求时,以请求中所申请的远端内存地址为键查询哈希表,若检测到权限申请与哈希表中的历史权限符发生访问冲突,则权限申请会被延迟,直到冲突被化解。
在一些实施例中,权限符包括租约语义,租约语义对应有租期,步骤102之后,远端内存访问保护机制构建方法还可以包括如下步骤:
在远端内存访问的响应时长超过租期的情况下,将内存窗口与远端内
容地址解绑,以使权限符失效。
在本实施例中,权限符可以包括租约语义,租约语义对应有租期。在用户程序被挂起或发生崩溃的情况,远端内存访问的响应时长往往会超时,此时可以利用租约语义释放残留权限,即将内存窗口与远端内容地址解绑,以使权限符失效。使用了租约机制,可以解决用户程序崩溃或被挂起所造成的权限资源泄露和系统阻塞问题。
在一些实施例中,租期基于用户程序采用远端内存单边访问的方式进行更新。
在本实施例中,租约语义可以支持拓展租期,租期基于用户程序采用远端内存单边访问的方式进行更新。示例地,将权限头上的权限租期字段通过MW暴露给用户访问,由用户使用远端内存单边访问的比较交换原语(Compare and Swap,CAS)完成对权限租期变量的更新。相应地,远端内存节点可以周期性地访问哈希表,检查其中权限符的权限租期变量,废除所有已超过租期的权限符。其中权限符的废除方式为解绑相关的MW,使得相关权限符失效。
在一些示例中,为避免租期反复拓展导致的共享权限与私有权限之间的公平性问题,远端内存节点在检测到一块远端内存长期活跃地处于共享或私有访问状态时,可以拒绝对该权限符的进一步租期拓展。示例地,远端内存节点可以把权限头的权限租期字段置零,用户拓展该权限的租期时,比较交换原语失败并返回零值,用户由此得知权限拓展被禁止。同时,远端内存节点可以在权限头的开启时间字段中保留一个比特,将该比特置一,以标记权限符应在本轮超时后被废除。
在一些示例中,为避免租期被反复拓展而引发资源占有问题,任何权限符无法保持有效超过最大存活期限,最大存活期限可以根据实际需求进行设定,此处不作具体限定。可以使用权限头存储的权限开启时间进行判别,超过最大存活期限的权限符视为超时而被废除。
在一些实施例中,网卡队列对具有备用队列对,其中在网卡队列对失效的情况下,备用队列对替代网卡队列对。
在本实施例中,远端内存访问时所需的网卡队列对可以具有若干份备
用队列对。在因为用户的非法远端访问而导致网卡队列对失效时,备用队列对可以代替失效的网卡队列对,从而快速恢复用户的远端内存访问能力。这样,可以通过使用少量冗余的备份队列对,最小化非法的远端访问引起队列对失效的额外恢复时间。
在一些示例中,如图2序号3所示,任何带有非法或已失效的权限符的远端内存访问不会生效。示例地,即使非法权限申请被下发至网卡队列对中,该非法权限申请附带的非法权限符会被远端内存节点侧的网卡检测,该远端内存访问不会被远端内存节点的网卡执行。
在一些示例中,如图2序号4所示,网卡队列对可以具有若干份冗余的备用队列对,以在网卡队列对失效时完成备用队列对的切换。远端内存架构内的每个用户程序会被分配一个固定的虚拟队列对编号,虚拟队列对编号通过虚实映射表映射到一个实际的网卡队列对上,用户程序的所有权限申请会依据映射表发送到实际的网卡队列对中,非法的远端内存访问会使所在的网卡队列对失效。此时备用队列对将替换掉失效的网卡队列对,虚实映射表会发生更改,将虚拟队列编号重映射到一个有效的备用队列对上,以使远端内存访问能力能够快速恢复。
在一些实施例中,步骤103可以包括如下步骤:
在远端内存访问结束的情况下,获取远端内存架构的负载压力和未绑定的内存窗口的数量;
在负载压力小于预设压力阈值,或数量小于预设数量阈值的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
在本实施例中,在远端内存访问结束的情况下,可以获取远端内存架构的负载压力和未绑定的内存窗口的数量,若负载压力小于预设压力阈值,或数量小于预设数量阈值,则可以将内存窗口与远端内容地址解绑,以使权限符失效。若负载压力大于或等于预设压力阈值,且未绑定的内存窗口的数量大于或等于预设数量阈值,则可以延迟执行解绑操作。其中预设压力阈值和预设数量阈值可以根据实际需求进行设定,此处不作具体限定。
换而言之,处理内存窗口的解绑操作时,若远端内存框架面临高负载压力,则可以将内存窗口解绑操作延迟执行,直至负载压力缓解或可用内
存窗口数低于临界值。
在一些实施例中,远端内存访问保护机制构建方法还可以包括如下步骤:
将内存窗口的一次绑定操作和一次解绑操作合并为一次换绑操作;
在多个待绑定的远端内存地址为连续地址的情况下,将内存窗口的多次绑定操作替换为一次批量绑定操作。
在本实施例中,可以将内存窗口的一次绑定操作和一次解绑操作合并为一次换绑操作。示例地,如图5所示,在同时处理绑定内存窗口和解绑内存窗口的请求时,可以采用内存窗口换绑的方式完成。在换绑时,将待解绑的内存窗口换绑到需要暴露访问权限的远端内存上,并返回换绑后新生成的权限符。
在多个待绑定的远端内存地址为连续地址的情况下,可以将内存窗口的多次绑定操作替换为一次批量绑定操作。示例地,如图6所示,在将多个MW绑定到连续的远端内存上时,可以将多次内存窗口绑定操作减少为对整片连续远端内存地址的一次内存窗口绑定操作。权限头除了可在权限资源池中分配外,还会投机地紧邻地分配在远端内存之前,绑定到远端内存和绑定到相邻权限头的两次内存窗口绑定操作减少为对该连续远端内存地址的一次绑定操作。
同理的,如图6所示,在连续的远端内存对应的多个MW解绑时,可以将多次内存窗口解绑操作减少为对整片连续远端内存地址的一次内存窗口批量解绑操作。
这样,可以有效减少操作次数,从而提高远端内存访问效率。
在一些实施例中,远端内存架构包括多个计算节点和多个远端内存节点。
在本实施例中,远端内存架构可以包括多个计算节点和多个远端内存节点,计算节点具有较多的计算资源和受限的内存容量,远端内存节点具有受限的计算资源和较大的内存容量。远端内存架构允许计算节点和内存节点各自独立地扩展,因而提高了数据中心内部的资源利用率。
基于上述实施例提供的远端内存访问保护机制构建方法,本申请还提供了一种远端内存节点的实施例。
图7示出了本申请另一个实施例提供的远端内存节点的结构示意图,为了便于说明,仅示出了与本申请实施例相关的部分。
参照图7,远端内存节点700所属于远端内存架构,远端内存架构还可以包括计算节点,远端内存节点700可以包括:
获取模块701,用于获取计算节点的权限申请,权限申请基于计算节点将用户程序的访问请求提交至网卡队列对上生成,访问请求包括远端内存地址;
绑定模块702,用于在权限申请鉴权通过的情况下,将内存窗口绑定到远端内容地址上,并返回权限符,权限符用于远端内存访问;
解绑模块703,用于在远端内存访问结束的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
在一些实施例中,绑定模块702还可以用于:
在权限申请鉴权通过的情况下,获取正在进行的远端内存访问对应的历史权限符;
确定权限申请与历史权限符是否存在冲突;
在权限申请与历史权限符不存在冲突的情况下,将内存窗口绑定到远端内容地址上,并返回权限符。
在一些实施例中,远端内存节点700可以包括:
存储模块,用于将权限符存储至哈希表中;
删除模块,用于将权限符从哈希表中删除。
在一些实施例中,权限符包括租约语义,租约语义对应有租期,解绑模块703还可以用于:
在远端内存访问的响应时长超过租期的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
在一些实施例中,租期基于用户程序采用远端内存单边访问的方式进行更新。
在一些实施例中,网卡队列对具有备用队列对,其中在网卡队列对失效的情况下,备用队列对替代网卡队列对。
在一些实施例中,解绑模块703还可以用于:
在远端内存访问结束的情况下,获取远端内存架构的负载压力和未绑定的内存窗口的数量;
在负载压力小于预设压力阈值,或数量小于预设数量阈值的情况下,将内存窗口与远端内容地址解绑,以使权限符失效。
在一些实施例中,远端内存节点700可以包括处理模块,处理模块可以用于:
将内存窗口的一次绑定操作和一次解绑操作合并为一次换绑操作;
在多个待绑定的远端内存地址为连续地址的情况下,将内存窗口的多次绑定操作替换为一次批量绑定操作。
在一些实施例中,远端内存架构包括多个计算节点和多个远端内存节点。
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,与本申请方法实施例基于同一构思,是与上述远端内存访问保护机制构建方法对应的装置,上述方法实施例中所有实现方式均适用于该装置的实施例中,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
图8示出了本申请又一个实施例提供的电子设备的硬件结构示意图。
设备可以包括处理器801以及存储有程序或指令的存储器802。
处理器801执行程序时实现上述任意各个方法实施例中的步骤。
示例性的,程序可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器802中,并由处理器801执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列程序指令段,该指令段用于描述程序在设备中的执行过程。
具体地,上述处理器801可以包括中央处理器(CPU),或者特定集成电路(Application Specific Integrated Circuit,ASIC),或者可以被配置成实施本申请实施例的一个或多个集成电路。
存储器802可以包括用于数据或指令的大容量存储器。举例来说而非限制,存储器802可包括硬盘驱动器(Hard Disk Drive,HDD)、软盘驱动器、闪存、光盘、磁光盘、磁带或通用串行总线(Universal Serial Bus,USB)驱动器或者两个或更多个以上这些的组合。在合适的情况下,存储器802可包括可移除或不可移除(或固定)的介质。在合适的情况下,存储器802可在综合网关容灾设备的内部或外部。在特定实施例中,存储器802是非易失性固态存储器。
存储器可包括只读存储器(ROM),随机存取存储器(RAM),磁盘存储介质设备,光存储介质设备,闪存设备,电气、光学或其他物理/有形的存储器存储设备。因此,通常,存储器包括一个或多个编码有包括计算机可执行指令的软件的有形(非暂态)机器可读存储介质(例如,存储器设备),并且当该软件被执行(例如,由一个或多个处理器)时,其可操作来执行参考根据本公开的一方面的方法所描述的操作。
处理器801通过读取并执行存储器802中存储的程序或指令,以实现上述实施例中的任意一种方法。
在一个示例中,电子设备还可包括通信接口803和总线804。其中,处理器801、存储器802、通信接口803通过总线804连接并完成相互间的通信。
通信接口803,主要用于实现本申请实施例中各模块、装置、单元和/或设备之间的通信。
总线804包括硬件、软件或两者,将在线数据流量计费设备的部件彼此耦接在一起。举例来说而非限制,总线可包括加速图形端口(AGP)或
其他图形总线、增强工业标准架构(EISA)总线、前端总线(FSB)、超传输(HT)互连、工业标准架构(ISA)总线、无限带宽互连、低引脚数(LPC)总线、存储器总线、微信道架构(MCA)总线、外围组件互连(PCI)总线、PCI-Express(PCI-X)总线、串行高级技术附件(SATA)总线、视频电子标准协会局部(VLB)总线或其他合适的总线或者两个或更多个以上这些的组合。在合适的情况下,总线804可包括一个或多个总线。尽管本申请实施例描述和示出了特定的总线,但本申请考虑任何合适的总线或互连。
另外,结合上述实施例中的方法,本申请实施例可提供一种机器可读存储介质来实现。该机器可读存储介质上存储有程序或指令;该程序或指令被处理器执行时实现上述实施例中的任意一种方法。该机器可读存储介质可以被如计算机等机器读取。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
本申请实施例提供一种计算机程序产品,该程序产品被存储在机器可读存储介质中,该程序产品被至少一个处理器执行以实现如上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要明确的是,本申请并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上述实施例中,描述和示出了若干具体的步骤作为示例。但是,本申请的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本申请的精神后,作出各种改变、修改和添加,或者改变步骤之间的顺序。
以上所述的结构框图中所示的功能模块可以实现为硬件、软件、固件或者它们的组合。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本申请的元素是被用于执行所需任务的程序或者代码段。程序或者代码段
可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。“机器可读介质”可以包括能够存储或传输信息的任何介质。机器可读介质的例子包括电子电路、半导体存储器设备、ROM、闪存、可擦除ROM(EROM)、软盘、CD-ROM、光盘、硬盘、光纤介质、射频(RF)链路,等等。代码段可以经由诸如因特网、内联网等的计算机网格被下载。
还需要说明的是,本申请中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或系统。但是,本申请不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。
上面参考根据本公开的实施例的方法、装置(系统)和程序产品的流程图和/或框图描述了本公开的各方面。应当理解,流程图和/或框图中的每个方框以及流程图和/或框图中各方框的组合可以由计算机程序或指令实现。这些程序或指令可被提供给通用计算机、专用计算机、或其它可编程数据处理装置的处理器,以产生一种机器,使得经由计算机或其它可编程数据处理装置的处理器执行的这些指令使能对流程图和/或框图的一个或多个方框中指定的功能/动作的实现。这种处理器可以是但不限于是通用处理器、专用处理器、特殊应用处理器或者现场可编程逻辑电路。还可理解,框图和/或流程图中的每个方框以及框图和/或流程图中的方框的组合,也可以由执行指定的功能或动作的专用硬件来实现,或可由专用硬件和计算机指令的组合来实现。
以上所述,仅为本申请的具体实施方式,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。应理解,本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。
Claims (13)
- 一种远端内存访问保护机制构建方法,应用于远端内存架构中的远端内存节点,所述远端内存架构还包括计算节点,所述方法包括:获取所述计算节点的权限申请,所述权限申请基于所述计算节点将用户程序的访问请求提交至网卡队列对上生成,所述访问请求包括远端内存地址,在所述权限申请鉴权通过的情况下,将内存窗口绑定到所述远端内容地址上,并返回权限符,所述权限符用于远端内存访问,在所述远端内存访问结束的情况下,将所述内存窗口与所述远端内容地址解绑,以使所述权限符失效。
- 根据权利要求1所述的方法,其中,所述在所述权限申请鉴权通过的情况下,将内存窗口绑定到所述远端内容地址上,并返回权限符,包括:在所述权限申请鉴权通过的情况下,获取正在进行的远端内存访问对应的历史权限符,确定所述权限申请与所述历史权限符是否存在冲突,在所述权限申请与所述历史权限符不存在冲突的情况下,将内存窗口绑定到所述远端内容地址上,并返回权限符。
- 根据权利要求1或2所述的方法,其中,所述在所述权限申请鉴权通过的情况下,将内存窗口绑定到所述远端内容地址上,并返回权限符之后,所述方法还包括:将所述权限符存储至哈希表中,所述在所述远端内存访问结束的情况下,将所述内存窗口与所述远端内容地址解绑,以使所述权限符失效之后,所述方法还包括:将所述权限符从所述哈希表中删除。
- 根据权利要求1所述的方法,其中,所述权限符包括租约语义,所述租约语义对应有租期,所述在所述权限申请鉴权通过的情况下,将内存窗口绑定到所述远端内容地址上,并返回权限符之后,所述方法还包括:在所述远端内存访问的响应时长超过所述租期的情况下,将所述内存窗口与所述远端内容地址解绑,以使所述权限符失效。
- 根据权利要求4所述的方法,其中,所述租期基于所述用户程序采用远端内存单边访问的方式进行更新。
- 根据权利要求1所述的方法,其中,所述网卡队列对具有备用队列对,其中在所述网卡队列对失效的情况下,所述备用队列对替代所述网卡队列对。
- 根据权利要求1所述的方法,其中,所述在所述远端内存访问结束的情况下,将所述内存窗口与所述远端内容地址解绑,以使所述权限符失效,包括:在所述远端内存访问结束的情况下,获取所述远端内存架构的负载压力和未绑定的内存窗口的数量,在所述负载压力小于预设压力阈值,或所述数量小于预设数量阈值的情况下,将所述内存窗口与所述远端内容地址解绑,以使所述权限符失效。
- 根据权利要求1所述的方法,还包括:将所述内存窗口的一次绑定操作和一次解绑操作合并为一次换绑操作,在多个待绑定的远端内存地址为连续地址的情况下,将所述内存窗口的多次绑定操作替换为一次批量绑定操作。
- 根据权利要求1所述的方法,其中,所述远端内存架构包括多个计算节点和多个远端内存节点。
- 一种远端内存节点,所属于远端内存架构,所述远端内存架构还包括计算节点,所述远端内存节点包括:获取模块,用于获取所述计算节点的权限申请,所述权限申请基于所述计算节点将用户程序的访问请求提交至网卡队列对上生成,所述访问请求包括远端内存地址,绑定模块,用于在所述权限申请鉴权通过的情况下,将内存窗口绑定到所述远端内容地址上,并返回权限符,所述权限符用于远端内存访问,解绑模块,用于在所述远端内存访问结束的情况下,将所述内存窗口与所述远端内容地址解绑,以使所述权限符失效。
- 一种电子设备,所述设备包括:处理器以及存储有程序或指令的 存储器;所述处理器执行所述程序或指令时实现如权利要求1-9任意一项所述的方法。
- 一种机器可读存储介质,所述机器可读存储介质上存储有程序或指令,所述程序或指令被处理器执行时实现如权利要求1-9任意一项所述的方法。
- 一种计算机程序产品,所述计算机程序产品中的指令由电子设备的处理器执行时,使得所述电子设备执行如权利要求1-9任意一项所述的方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2023/082125 WO2024192557A1 (zh) | 2023-03-17 | 2023-03-17 | 远端内存访问保护机制构建方法、远端内存节点及设备 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2023/082125 WO2024192557A1 (zh) | 2023-03-17 | 2023-03-17 | 远端内存访问保护机制构建方法、远端内存节点及设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024192557A1 true WO2024192557A1 (zh) | 2024-09-26 |
Family
ID=92840729
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/082125 Ceased WO2024192557A1 (zh) | 2023-03-17 | 2023-03-17 | 远端内存访问保护机制构建方法、远端内存节点及设备 |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2024192557A1 (zh) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106844048A (zh) * | 2017-01-13 | 2017-06-13 | 上海交通大学 | 基于硬件特性的分布式共享内存方法及系统 |
| CN109559407A (zh) * | 2017-09-25 | 2019-04-02 | 亚马逊技术股份有限公司 | 有时间限制的安全访问权 |
| US20190141041A1 (en) * | 2017-11-08 | 2019-05-09 | Ca, Inc. | Remote direct memory access authorization |
| CN113014593A (zh) * | 2021-03-12 | 2021-06-22 | 北京金山云网络技术有限公司 | 访问请求的鉴权方法及装置、存储介质、电子设备 |
| CN113852656A (zh) * | 2020-06-28 | 2021-12-28 | 华为技术有限公司 | 一种数据传输方法、处理器系统及内存访问系统 |
-
2023
- 2023-03-17 WO PCT/CN2023/082125 patent/WO2024192557A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106844048A (zh) * | 2017-01-13 | 2017-06-13 | 上海交通大学 | 基于硬件特性的分布式共享内存方法及系统 |
| CN109559407A (zh) * | 2017-09-25 | 2019-04-02 | 亚马逊技术股份有限公司 | 有时间限制的安全访问权 |
| US20190141041A1 (en) * | 2017-11-08 | 2019-05-09 | Ca, Inc. | Remote direct memory access authorization |
| CN113852656A (zh) * | 2020-06-28 | 2021-12-28 | 华为技术有限公司 | 一种数据传输方法、处理器系统及内存访问系统 |
| CN113014593A (zh) * | 2021-03-12 | 2021-06-22 | 北京金山云网络技术有限公司 | 访问请求的鉴权方法及装置、存储介质、电子设备 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| RU2361267C2 (ru) | Отложенная очистка буферов быстрого преобразования адресов | |
| US10506434B2 (en) | System for accelerated network route update through exclusive access to routing tables | |
| KR101403233B1 (ko) | 정보 처리 장치 및 부정 액세스 방지 방법 | |
| US7103744B2 (en) | Binding a memory window to a queue pair | |
| US11568596B2 (en) | Non-blocking token authentication cache | |
| US8161287B2 (en) | Method and system for memory protection and security using credentials | |
| US20050038941A1 (en) | Method and apparatus for accessing a memory | |
| US6854032B2 (en) | System for accessing a region of memory using remote address translation and using a memory window table and a memory region table | |
| CN117171073A (zh) | 处理远程直接内存访问请求的方法和计算机设备 | |
| US6697899B1 (en) | Bus control device allowing resources to be occupied for exclusive access | |
| CN116366317B (zh) | 远端内存访问保护机制构建方法、远端内存节点及设备 | |
| US20230222082A1 (en) | Zoned accelerator embedded processing | |
| JP7695808B2 (ja) | ストレージ装置のネットワークキーバリューを使用して分散された読み取り/書き込みをロックするシステム及び方法 | |
| CN112631742B (zh) | 一种资源访问权限管理装置、方法及系统 | |
| CN119271580A (zh) | 设备的内存访问权限的确定方法、系统和电子设备 | |
| CN116340243A (zh) | 一种双核可信执行的安全芯片架构 | |
| CN104461705A (zh) | 一种业务访问的方法及存储控制器、集群存储系统 | |
| CN114912107B (zh) | 访问管理方法、相关装置、系统及计算机可读存储介质 | |
| US7565504B2 (en) | Memory window access mechanism | |
| US8291176B2 (en) | Protection domain groups to isolate access to memory windows | |
| US20040193832A1 (en) | Physical mode windows | |
| CN118210636A (zh) | 互斥锁装置、共享资源的互斥访问方法、主机及系统 | |
| US20240236056A1 (en) | Authenticating work order requests in a multiple node environment | |
| CN115699006B (zh) | 双等级管理 | |
| CN120934780A (zh) | 访问控制方法和装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23927876 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23927876 Country of ref document: EP Kind code of ref document: A1 |