Method and system for efficient memory region deallocation
First Claim
1. A method for deallocation of a memory region, comprising:
- transmitting, by a host channel adapter (HCA), a first invalidation command for invalidating at least one key associated with the memory region, wherein the HCA is an Infiniband HCA that communicates via the Infiniband network;
transmitting, by the HCA, a second invalidation command for invalidating a translation lookaside buffer (TLB) entry for the memory region, wherein the first and second invalidation commands are transmitted via a send queue of a queue pair (QP) associated with the Infiniband HCA;
invalidating the at least one key associated with the memory region by removing a corresponding DMA validation entry for the memory region from a key validation table stored in the DMA module of the Infiniband HCA, wherein the at least one key is an index into the key validation table;
determining whether all memory access requests to the memory region have been processed by the Infiniband HCA;
stalling processing of the second invalidation command when outstanding memory access requests to the memory region are present; and
processing the outstanding memory access requests for the memory region by the Infiniband HCA before executing the second invalidation command invalidating the TLB entry for the memory region.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for deallocation of a memory region involving transmitting, by a host channel adapter (HCA), a first invalidation command for invalidating at least one key associated with the memory region, transmitting, by the HCA, a second invalidation command for invalidating a translation lookaside buffer (TLB) entry for the memory region, invalidate the at least one key associated with the memory region, determining whether all memory access requests to the memory region have been processed by the HCA, stalling processing of the second invalidation command when outstanding memory access requests to the memory region are present, and processing the outstanding memory access requests for the memory region by the HCA before executing the second invalidation command invalidating the TLB entry for the memory region.
10 Citations
20 Claims
-
1. A method for deallocation of a memory region, comprising:
-
transmitting, by a host channel adapter (HCA), a first invalidation command for invalidating at least one key associated with the memory region, wherein the HCA is an Infiniband HCA that communicates via the Infiniband network; transmitting, by the HCA, a second invalidation command for invalidating a translation lookaside buffer (TLB) entry for the memory region, wherein the first and second invalidation commands are transmitted via a send queue of a queue pair (QP) associated with the Infiniband HCA; invalidating the at least one key associated with the memory region by removing a corresponding DMA validation entry for the memory region from a key validation table stored in the DMA module of the Infiniband HCA, wherein the at least one key is an index into the key validation table; determining whether all memory access requests to the memory region have been processed by the Infiniband HCA; stalling processing of the second invalidation command when outstanding memory access requests to the memory region are present; and processing the outstanding memory access requests for the memory region by the Infiniband HCA before executing the second invalidation command invalidating the TLB entry for the memory region. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A system, comprising:
-
a host in an Infiniband network executing a software application, wherein the software application is configured to issue a first invalidation command and a second invalidation command to deallocate a memory region in the host, wherein the first invalidation command is for invalidating at least one key for access to the memory region, and the second invalidation command is for invalidating a translation lookaside buffer (TLB) entry for the memory region; and an Infiniband host communication adapter (HCA) operatively connected to the host and configured to communicate via the Infiniband network to; receive the first and second invalidation commands, wherein the first and second invalidation commands are transmitted and received via a queue pair (QP) associated with the Infiniband HCA; invalidate the at least one key associated with the memory region by removing a corresponding DMA validation entry for the memory region from a key validation table stored in the DMA module of the Infiniband HCA, wherein the at least one key is an index into the key validation table; determine whether all memory access requests to the memory region have been processed by the HCA; stall processing of the second invalidation command, when outstanding memory access requests to the memory region are present; and process the outstanding memory access requests for the memory region before executing the second invalidation command invalidating the TLB entry for the memory region. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
-
-
20. An Infiniband host channel adapter (HCA) configured to communicate via the Infiniband network, comprising:
-
a direct memory access (DMA) validation module as part of the Infiniband HCA for storing a DMA validation table and a plurality of memory access keys, each of which is a credential to authenticate a memory access request, wherein the DMA validation module is configured to; authenticate the memory access request using a corresponding key; and process a command to invalidate a memory access key by invalidating a corresponding DMA validation entry in the DMA validation table wherein the memory access key is an index into the DMA validation table; and a memory management module (MMU) for storing a translation lookaside buffer (TLB) comprising a plurality of memory address translations for a plurality of memory regions, wherein the Infiniband HCA is configured to; receive and process a request to deallocate a memory region of the plurality of memory regions, wherein the request to deallocate the memory region comprises a first invalidation command for invalidating at least one key associated with the memory region and a second invalidation command for invalidating a translation lookaside buffer (TLB) entry for the memory region; invalidate at least one key associated with the memory region; determine whether all memory access requests to the memory region have completed address translation in the MMU; stall processing of the second invalidation command, when outstanding memory access requests to the memory region are present; and process the outstanding memory access requests for the memory region before executing the second invalidation command.
-
Specification