]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rds: avoid call to flush_mrs() in specific condition
authorAjaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Thu, 16 Apr 2015 21:35:39 +0000 (14:35 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 13 Sep 2016 05:56:53 +0000 (22:56 -0700)
This is to reduce process spawn time.
When user provides 0 values for cookie and flags in rds_free_mr() call,
avoid calling flush_mr()

skgxp uses cookie 0 and flag 0 combination for checking whether
transport is RDMA capable or not.

This is short term hack for customer escalation.
Customer is having other processes which are calling flush_mrs() and
that is causing mutex contention.
skgxp change is fairly significant, and we want to provide minimal
change in customer environment.

Risk factor here is, if there is any other use of cookie 0 and flag 0
combination (like freeing up unused MRs), then that will be impacted.
Code inspection by Leo/Avneesh at skgxp and skgnfs suggests that, this
combination not being used anywhere.

Long term solution for this requires changes in RDS as well as skgxp
application, which should be done in next UEK release.
Required RDS changes are present in UEK4; however, skgxp changes are
still remaining. Since this was escalation from major customer, we
require this hack in UEK4.

Orabug: 24656750

Tested-by: Sujatha Tolstoy <sujatha.tolstoy@oracle.com>
Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Reviewed-by: Leo Tominna <leo.tominna@oracle.com>
Reviewed-by: Avneesh Pant <avneesh.pant@oracle.com>
Reviewed-by: John Sobecki <john.sobecki@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
net/rds/rdma.c

index e49d4b1cc8f4951878ed53709dd298340288f6cd..37b99465ab77bea19ade0a1ad35adffad69a873a 100644 (file)
@@ -366,6 +366,16 @@ int rds_free_mr(struct rds_sock *rs, char __user *optval, int optlen)
                           sizeof(struct rds_free_mr_args)))
                return -EFAULT;
 
+       /*
+        * 20366776 workaround.
+        * Let process spawn quickly by avoiding call to flush_mrs()
+        */
+       if (args.cookie == 0 && args.flags == 0) {
+               if (!rs->rs_transport || !rs->rs_transport->flush_mrs)
+                       return -EINVAL;
+               return 0;
+       }
+
        /* Special case - a null cookie means flush all unused MRs */
        if (args.cookie == 0) {
                if (!rs->rs_transport || !rs->rs_transport->flush_mrs)