]> git.ipfire.org Git - thirdparty/linux.git/commit
RDMA/core: Add aging to FRMR pools
authorMichael Guralnik <michaelgur@nvidia.com>
Thu, 26 Feb 2026 13:52:08 +0000 (15:52 +0200)
committerLeon Romanovsky <leon@kernel.org>
Mon, 2 Mar 2026 18:45:05 +0000 (13:45 -0500)
commit84cb1dd06fc47c5a7bb797a83bf3a776dcd28afd
treefc40e1b529a5dec697aac7738b82ab8ec4b75282
parentce5df0b891edfa19620cd7e28bd69246c77ae78c
RDMA/core: Add aging to FRMR pools

Add aging mechanism to handles of FRMR pools.
Keep the handles stored in FRMR pools for at least 1 minute for
application to reuse, destroy all handles which were not reused.

Add a new queue to each pool to accomplish that.
Upon aging trigger, destroy all FRMR handles from the new 'inactive'
queue and move all handles from the 'active' pool to the 'inactive' pool.
This ensures all destroyed handles were not reused for at least one aging
time period and were not held longer than 2 aging time periods.
Handles from the inactive queue will be popped only if the active queue is
empty.

Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Link: https://patch.msgid.link/20260226-frmr_pools-v4-3-95360b54f15e@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/frmr_pools.c
drivers/infiniband/core/frmr_pools.h