linux/drivers/staging/rdma
Mitko Haralanov a0d406934a staging/rdma/hfi1: Add page lock limit check for SDMA requests
The driver pins pages on behalf of user processes in two
separate instances - when the process has submitted a
SDMA transfer and when the process programs an expected
receive buffer.

When pinning pages, the driver is required to observe the
locked page limit set by the system administrator and refuse
to lock more pages than allowed. Such a check was done for
expected receives but was missing from the SDMA transfer
code path.

This commit adds the missing check for SDMA transfers. As of
this commit, user SDMA or expected receive requests will be
rejected if the number of pages required to be pinned will
exceed the set limit.

Due to the fact that the driver needs to take the MM semaphore
in order to update the locked page count (which can sleep), this
cannot be done by the callback function as it [the callback] is
executed in interrupt context. Therefore, it is necessary to put
all the completed SDMA tx requests onto a separate list (txcmp) and
offload the actual clean-up and unpinning work to a workqueue.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 13:57:55 -08:00
..
amso1100 staging: rdma: use kmalloc_array instead of kmalloc 2015-11-19 16:55:37 -08:00
ehca staging: rdma: ehca: Added a blank line 2015-11-19 17:13:00 -08:00
hfi1 staging/rdma/hfi1: Add page lock limit check for SDMA requests 2015-12-21 13:57:55 -08:00
ipath staging: rdma: use kmalloc_array instead of kmalloc 2015-11-19 16:55:37 -08:00
Kconfig staging/rdma: Kconfig change STAGING_RDMA to be tristate. 2015-09-29 03:42:27 +02:00
Makefile IB/ehca: Deprecate driver, move to staging, schedule deletion 2015-09-11 18:13:35 -04:00