From: Leon Romanovsky <leonro@xxxxxxxxxxxx> >From Parav: In some applications which create large number of MRs in range of 500K or more, when application terminates due to segmentation fault or it was killed, it takes relatively long time to terminate such application, as all RDMA resources are destructed in single threaded manner in kernel. This affects the application/service restart time. Parallel destruction in kernel was considered but its relatively complex operation with regards to locking and dependency of a resource on other resources in uverbs layer. Therefore, to facilitate a user space program which can implement a child/buddy process who can free up resources using threads in parallel, provide basic infrastructure APIs to query and destroy the resources. 1. API to query a resource based on object type such as MR, QP, PD etc. 2. ioctl() to destroy an MR, PD, FLOW, AH, XRCD, RWQ_IND_TBL and MW (Resources which doesn't require a response during destroy operation) Thanks Jason Gunthorpe (1): RDMA/uverbs: Add a method to introspect handles in a context Parav Pandit (1): RDMA/uverbs: Add an ioctl method to destroy an object drivers/infiniband/core/uverbs_std_types.c | 60 +++++++++++-- .../infiniband/core/uverbs_std_types_device.c | 89 ++++++++++++++++++- drivers/infiniband/core/uverbs_std_types_mr.c | 10 ++- include/uapi/rdma/ib_user_ioctl_cmds.h | 59 ++++++++++++ 4 files changed, 210 insertions(+), 8 deletions(-) -- 2.19.1