]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: IB: drop discontinued IB CQ_VECTOR support
authorSantosh Shilimkar <santosh.shilimkar@oracle.com>
Wed, 17 Feb 2016 18:10:14 +0000 (10:10 -0800)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 27 May 2016 16:31:17 +0000 (09:31 -0700)
IB_CQ_VECTOR_LEAST_ATTACHED was OFED 1.5 feature which later Mellanox
dropped. As per them 'least attached' was not a way to distribute the load
and that actually fools the user to think it does so. The fact that some
cpu had 'least amount of attached cqs' has nothing to do with this cpu
actual load. This is why the feature never made to upstream.

On UEK4, the code is already under #if 0 because feature isn't
available. Time to clean up the dead code considering its already
dropped from upstream as well as OFED2.0+ onwards.

Orabug: 23027670

Tested-by: Michael Nowak <michael.nowak@oracle.com>
Tested-by: Rose Wang <rose.wang@oracle.com>
Tested-by: Rafael Alejandro Peralez <rafael.peralez@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
net/rds/ib.c
net/rds/ib.h
net/rds/ib_cm.c
net/rds/rds.h

index 3ade8031849e7353e888a8486a8922c15fa8bed6..d68ea09c196648fb12f228e3d4045269485a2a5f 100644 (file)
@@ -59,9 +59,6 @@ unsigned int rds_ib_active_bonding_reconnect_delay = 1;
 unsigned int rds_ib_active_bonding_trigger_delay_max_msecs; /* = 0; */
 unsigned int rds_ib_active_bonding_trigger_delay_min_msecs; /* = 0; */
 unsigned int rds_ib_rnr_retry_count = RDS_IB_DEFAULT_RNR_RETRY_COUNT;
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-unsigned int rds_ib_cq_balance_enabled = 1;
-#endif
 static char *rds_ib_active_bonding_failover_groups = NULL;
 unsigned int rds_ib_active_bonding_arps = RDS_IB_DEFAULT_NUM_ARPS;
 static char *rds_ib_active_bonding_excl_ips = "169.254/16,172.10/16";
@@ -90,10 +87,6 @@ module_param(rds_ib_active_bonding_trigger_delay_min_msecs, int, 0444);
 MODULE_PARM_DESC(rds_ib_active_bonding_trigger_delay_min_msecs,
                 " Active Bonding Min delay before active "
                 "bonding is triggered(msecs)");
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-module_param(rds_ib_cq_balance_enabled, int, 0444);
-MODULE_PARM_DESC(rds_ib_cq_balance_enabled, " CQ load balance Enabled");
-#endif
 module_param(rds_ib_active_bonding_arps, int, 0444);
 MODULE_PARM_DESC(rds_ib_active_bonding_arps, " Num ARPs to be sent when IP moved");
 module_param(rds_ib_active_bonding_excl_ips, charp, 0444);
index f6b06641a88269f85066466949b3d4288bb5380e..c1c7a629a2e7fc5e1e597ff3369f640184669b81 100644 (file)
@@ -558,9 +558,6 @@ extern unsigned int rds_ib_retry_count;
 extern unsigned int rds_ib_rnr_retry_count;
 extern unsigned int rds_ib_active_bonding_enabled;
 extern unsigned int rds_ib_active_bonding_fallback;
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-extern unsigned int rds_ib_cq_balance_enabled;
-#endif
 
 extern spinlock_t ib_nodev_conns_lock;
 extern struct list_head ib_nodev_conns;
index 4507e7ca8f18bb0e6a01cadb0ca51aaa6e75d5b0..458d718215da808dff1d2aa8e9d28529bbf19cca 100644 (file)
@@ -580,28 +580,6 @@ static void rds_ib_qp_event_handler(struct ib_event *event, void *data)
        }
 }
 
-static int rds_ib_find_least_loaded_vector(struct rds_ib_device *rds_ibdev)
-{
-       int i;
-       int index = rds_ibdev->dev->num_comp_vectors - 1;
-       int min = rds_ibdev->vector_load[rds_ibdev->dev->num_comp_vectors - 1];
-
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-       if (!rds_ib_cq_balance_enabled)
-               return IB_CQ_VECTOR_LEAST_ATTACHED;
-#endif
-
-       for (i = rds_ibdev->dev->num_comp_vectors - 1; i >= 0; i--) {
-               if (rds_ibdev->vector_load[i] < min) {
-                       index = i;
-                       min = rds_ibdev->vector_load[i];
-               }
-       }
-
-       rds_ibdev->vector_load[index]++;
-       return index;
-}
-
 /*
  * This needs to be very careful to not leave IS_ERR pointers around for
  * cleanup to trip over.
@@ -634,41 +612,28 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
        ic->i_pd = rds_ibdev->pd;
        ic->i_mr = rds_ibdev->mr;
 
-       ic->i_scq_vector = rds_ib_find_least_loaded_vector(rds_ibdev);
        ic->i_scq = ib_create_cq(dev, rds_ib_cq_comp_handler_send,
                                rds_ib_cq_event_handler, conn,
-                               ic->i_send_ring.w_nr + 1,
-                               ic->i_scq_vector);
+                               ic->i_send_ring.w_nr + 1, 0);
        if (IS_ERR(ic->i_scq)) {
                ret = PTR_ERR(ic->i_scq);
                ic->i_scq = NULL;
                rdsdebug("ib_create_cq send failed: %d\n", ret);
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-               if (ic->i_scq_vector != IB_CQ_VECTOR_LEAST_ATTACHED)
-                       rds_ibdev->vector_load[ic->i_scq_vector]--;
-#endif
                goto out;
        }
 
-       ic->i_rcq_vector = rds_ib_find_least_loaded_vector(rds_ibdev);
        if (rds_ib_srq_enabled)
                ic->i_rcq = ib_create_cq(dev, rds_ib_cq_comp_handler_recv,
                                        rds_ib_cq_event_handler, conn,
-                                       rds_ib_srq_max_wr - 1,
-                                       ic->i_rcq_vector);
+                                       rds_ib_srq_max_wr - 1, 0);
        else
                ic->i_rcq = ib_create_cq(dev, rds_ib_cq_comp_handler_recv,
                                        rds_ib_cq_event_handler, conn,
-                                       ic->i_recv_ring.w_nr,
-                                       ic->i_rcq_vector);
+                                       ic->i_recv_ring.w_nr, 0);
        if (IS_ERR(ic->i_rcq)) {
                ret = PTR_ERR(ic->i_rcq);
                ic->i_rcq = NULL;
                rdsdebug("ib_create_cq recv failed: %d\n", ret);
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-               if (ic->i_scq_vector != IB_CQ_VECTOR_LEAST_ATTACHED)
-                       rds_ibdev->vector_load[ic->i_rcq_vector]--;
-#endif
                goto out;
        }
 
@@ -1185,23 +1150,11 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
                if (ic->i_cm_id->qp)
                        rdma_destroy_qp(ic->i_cm_id);
 
-               if (ic->i_rcq) {
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-                       if (ic->rds_ibdev &&
-                               ic->i_rcq_vector != IB_CQ_VECTOR_LEAST_ATTACHED)
-                               ic->rds_ibdev->vector_load[ic->i_rcq_vector]--;
-#endif
+               if (ic->i_rcq)
                        ib_destroy_cq(ic->i_rcq);
-               }
 
-               if (ic->i_scq) {
-#if IB_RDS_CQ_VECTOR_SUPPORTED
-                       if (ic->rds_ibdev &&
-                               ic->i_scq_vector != IB_CQ_VECTOR_LEAST_ATTACHED)
-                               ic->rds_ibdev->vector_load[ic->i_scq_vector]--;
-#endif
+               if (ic->i_scq)
                        ib_destroy_cq(ic->i_scq);
-               }
 
                /* then free the resources that ib callbacks use */
                if (ic->i_send_hdrs)
index 6978f0db842436c7d43b5c5fb7da2006d3f5f0b1..a3d6284edd2a72e153759c018996adba701abc66 100644 (file)
@@ -25,8 +25,6 @@
 #define RDS_PROTOCOL_MINOR(v)  ((v) & 255)
 #define RDS_PROTOCOL(maj, min) (((maj) << 8) | min)
 
-#define IB_RDS_CQ_VECTOR_SUPPORTED 0
-
 /*
  * XXX randomly chosen, but at least seems to be unused:
  * #               18464-18768 Unassigned