]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rds: disable cq balance
authorAjaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Fri, 23 Jan 2015 00:04:05 +0000 (16:04 -0800)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Wed, 8 Jul 2015 20:12:39 +0000 (13:12 -0700)
This should be enabled back after IB_CQ_VECTOR_LEAST_ATTACHED is added.

Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
net/rds/ib.c
net/rds/ib.h
net/rds/ib_cm.c
net/rds/rds.h

index a768633ac6270a43b03844ea99f4b91652a8d26a..dbc4f5ea9107bb24e733e82cbf7999a23ecfecba 100644 (file)
@@ -57,7 +57,9 @@ unsigned int rds_ib_haip_enabled = 0;
 unsigned int rds_ib_haip_fallback = 1;
 unsigned int rds_ib_apm_timeout = RDS_IB_DEFAULT_TIMEOUT;
 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_haip_failover_groups = NULL;
 
 module_param(rds_ib_fmr_1m_pool_size, int, 0444);
@@ -81,8 +83,10 @@ MODULE_PARM_DESC(rds_ib_haip_fallback, " HAIP failback Enabled");
 module_param(rds_ib_haip_failover_groups, charp, 0444);
 MODULE_PARM_DESC(rds_ib_haip_failover_groups,
        "<ifname>[,<ifname>]*[;<ifname>[,<ifname>]*]*");
+#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
 
 /*
  * we have a clumsy combination of RCU and a rwsem protecting this list
index 944b6e6927436a0dd2a7327b26335b0bb0765c54..816db3e3153f50d43ae8b4c9def9b46d6a0f0248 100644 (file)
@@ -431,7 +431,9 @@ extern unsigned int rds_ib_haip_enabled;
 extern unsigned int rds_ib_haip_fallback;
 extern unsigned int rds_ib_haip_failover_enabled;
 extern unsigned int rds_ib_apm_timeout;
+#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 228c21138caef0ea1f1dd0a5eef95196cba54d8a..8a805b5c72ca3a5f4c6b6efb6ef8f50cf01fc514 100644 (file)
@@ -464,8 +464,10 @@ static int rds_ib_find_least_loaded_vector(struct rds_ib_device *rds_ibdev)
        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) {
@@ -519,8 +521,10 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
                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;
        }
 
@@ -539,8 +543,10 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
                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;
        }
 
@@ -1068,16 +1074,20 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
                        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
                        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
                        ib_destroy_cq(ic->i_scq);
                }
 
index dfe88f1a99b66a37858724185f61f686554a879f..f329354a07fcda115c6f8568bf47578d270ec7b3 100644 (file)
@@ -21,6 +21,8 @@
 #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