let two infiniband process execute on two machines. When one process terminates, all its resources (allocated file, buffers, ...) are freed even the memory that the process registered for RDMA
WRITE/READ operations.
Can someone has references on how the remote Channel Adapter on the other process knows that the buffer memory is now free ? Which element of the infiniband stack does this control and when ?
When a Linux process terminates all its open file descriptors are closed. A process that uses RDMA would have an open device file connected with the ib_uverbs module. When that file descriptor is closed the module cleans up every open RDMA resource opened by the process, including any memory region and queue pair. This clean up includes notifying the HCA's driver and through it the device itself.
If the remote machine continues attempting to perform RDMA operations, the HCA will refuse its requests, because the relevant resources would be closed.