Whamcloud - gitweb
LU-431 o2iblnd: reduce failed alloc retry interval
authorLiang Zhen <liang@whamcloud.com>
Sat, 18 Jun 2011 10:03:12 +0000 (18:03 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 14 Dec 2011 15:22:04 +0000 (10:22 -0500)
o2iblnd can dynamically grow TX descriptor pool at run time,
it will take 10 seconds as retry interval if there is a failed
allocating, this interval is too long and some RPC might timeout.
So we decreased it to one second.

Change-Id: I0693e9d2cbf321e473713db6dd668afaf64e1bae
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/966
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/o2iblnd/o2iblnd.h

index 5eed508..190d90e 100644 (file)
@@ -1629,7 +1629,7 @@ kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, __u64 *pages, int npages,
                 fps->fps_version ++;
                 cfs_list_add_tail(&fpo->fpo_list, &fps->fps_pool_list);
         } else {
                 fps->fps_version ++;
                 cfs_list_add_tail(&fpo->fpo_list, &fps->fps_pool_list);
         } else {
-                fps->fps_next_retry = cfs_time_shift(10);
+                fps->fps_next_retry = cfs_time_shift(IBLND_POOL_RETRY);
         }
         cfs_spin_unlock(&fps->fps_lock);
 
         }
         cfs_spin_unlock(&fps->fps_lock);
 
@@ -1824,8 +1824,7 @@ kiblnd_pool_alloc_node(kib_poolset_t *ps)
         if (rc == 0) {
                 cfs_list_add_tail(&pool->po_list, &ps->ps_pool_list);
         } else {
         if (rc == 0) {
                 cfs_list_add_tail(&pool->po_list, &ps->ps_pool_list);
         } else {
-                /* retry 10 seconds later */
-                ps->ps_next_retry = cfs_time_shift(10);
+                ps->ps_next_retry = cfs_time_shift(IBLND_POOL_RETRY);
                 CERROR("Can't allocate new %s pool because out of memory\n",
                        ps->ps_name);
         }
                 CERROR("Can't allocate new %s pool because out of memory\n",
                        ps->ps_name);
         }
index 9c0409b..aa16854 100644 (file)
@@ -227,7 +227,10 @@ typedef struct kib_hca_dev
         cfs_atomic_t         ibh_ref;           /* refcount */
 } kib_hca_dev_t;
 
         cfs_atomic_t         ibh_ref;           /* refcount */
 } kib_hca_dev_t;
 
-#define IBLND_POOL_DEADLINE     300             /* # of seconds to keep pool alive */
+/** # of seconds to keep pool alive */
+#define IBLND_POOL_DEADLINE     300
+/** # of seconds to retry if allocation failed */
+#define IBLND_POOL_RETRY        1
 
 typedef struct
 {
 
 typedef struct
 {