[Openib-windows] Adding an environment variable for determining the initial CQ size

Tzachi Dar tzachid at mellanox.co.il
Wed Jul 12 04:25:30 PDT 2006


Hi Fab,
 
The following patch does two things:
1) It adds a new environment variable (IBWSD_INITIAL_CQ_SIZE) that
controls the number of QPs that will use the same CQ.
2) It sets the default value from 100 to 500. We believe that this will
allow the users to work on bigger Clusters while the increase in memory
is negligible for a modern system.
 
Thanks
Tzachi
 
Index: user/ibsp_iblow.c
===================================================================
--- user/ibsp_iblow.c (revision 420)
+++ user/ibsp_iblow.c (working copy)
@@ -582,7 +582,7 @@
  STAT_INC( thread_num );
 
  /* Completion queue */
- cq_create.size = IB_INIT_CQ_SIZE;
+ cq_create.size = g_initial_cq_size * IB_CQ_SIZE;
 
  cq_create.pfn_comp_cb = NULL;
  cq_create.h_wait_obj = cq_tinfo->cq_waitobj;
Index: user/ibspdefines.h
===================================================================
--- user/ibspdefines.h (revision 420)
+++ user/ibspdefines.h (working copy)
@@ -77,7 +77,6 @@
  * for 100 QPs per CQ.
  */
 #define IB_CQ_SIZE   (QP_ATTRIB_SQ_DEPTH + QP_ATTRIB_RQ_DEPTH)
-#define IB_INIT_CQ_SIZE  (IB_CQ_SIZE * 100)
 
 /* CM timeouts */
 #define CM_MIN_LOCAL_TIMEOUT (18)
Index: user/ibspdll.c
===================================================================
--- user/ibspdll.c (revision 420)
+++ user/ibspdll.c (working copy)
@@ -54,6 +54,7 @@
 uint32_t  g_max_poll = 500;
 uint32_t  g_sa_timeout = 500;
 uint32_t  g_sa_retries = 4;
+uint32_t  g_initial_cq_size = 500;
 int    g_connect_err = WSAEADDRNOTAVAIL;
 
 
@@ -135,6 +136,10 @@
   if( i )
    g_connect_err = WSAEHOSTUNREACH;
 
+  i = GetEnvironmentVariable( "IBWSD_INITIAL_CQ_SIZE", env_var,
sizeof(env_var) );
+  if( i && i <= 16 )
+   g_initial_cq_size = _tcstoul( env_var, NULL, 10 );  
+
   if( init_globals() )
    return FALSE;
 
Index: user/ibspdll.h
===================================================================
--- user/ibspdll.h (revision 420)
+++ user/ibspdll.h (working copy)
@@ -61,6 +61,7 @@
 extern uint32_t  g_max_poll;
 extern uint32_t  g_sa_timeout;
 extern uint32_t  g_sa_retries;
+extern uint32_t  g_initial_cq_size;
 /* Allow users to control SA timeouts behavior - fall back on IPoIB or
fail. */
 extern int   g_connect_err;
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20060712/a02a0e03/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wsd_cq_size.patch
Type: application/octet-stream
Size: 1896 bytes
Desc: wsd_cq_size.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20060712/a02a0e03/attachment.obj>


More information about the ofw mailing list