diff options
author | Andy Grover <andy.grover@oracle.com> | 2009-07-17 09:13:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-20 11:03:01 -0400 |
commit | 3ba23ade464cca7c4a7ba5628c613339d3f2e161 (patch) | |
tree | b0c5e487a9b2461fbbfdcedde870d2b545b5deb3 /net/rds | |
parent | 4edf547b4d0f886acf5aa5a0c8f8edbaff280830 (diff) |
RDS: Set retry_count to 2 and make modifiable via modparam
This will be default cause IB connections to failover faster,
but allow a longer retry count to be used if desired.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r-- | net/rds/ib.c | 3 | ||||
-rw-r--r-- | net/rds/ib.h | 3 | ||||
-rw-r--r-- | net/rds/ib_cm.c | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/net/rds/ib.c b/net/rds/ib.c index b9bcd32431e1..27abdd3df2cc 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c | |||
@@ -43,11 +43,14 @@ | |||
43 | 43 | ||
44 | unsigned int fmr_pool_size = RDS_FMR_POOL_SIZE; | 44 | unsigned int fmr_pool_size = RDS_FMR_POOL_SIZE; |
45 | unsigned int fmr_message_size = RDS_FMR_SIZE + 1; /* +1 allows for unaligned MRs */ | 45 | unsigned int fmr_message_size = RDS_FMR_SIZE + 1; /* +1 allows for unaligned MRs */ |
46 | unsigned int rds_ib_retry_count = RDS_IB_DEFAULT_RETRY_COUNT; | ||
46 | 47 | ||
47 | module_param(fmr_pool_size, int, 0444); | 48 | module_param(fmr_pool_size, int, 0444); |
48 | MODULE_PARM_DESC(fmr_pool_size, " Max number of fmr per HCA"); | 49 | MODULE_PARM_DESC(fmr_pool_size, " Max number of fmr per HCA"); |
49 | module_param(fmr_message_size, int, 0444); | 50 | module_param(fmr_message_size, int, 0444); |
50 | MODULE_PARM_DESC(fmr_message_size, " Max size of a RDMA transfer"); | 51 | MODULE_PARM_DESC(fmr_message_size, " Max size of a RDMA transfer"); |
52 | module_param(rds_ib_retry_count, int, 0444); | ||
53 | MODULE_PARM_DESC(rds_ib_retry_count, " Number of hw retries before reporting an error"); | ||
51 | 54 | ||
52 | struct list_head rds_ib_devices; | 55 | struct list_head rds_ib_devices; |
53 | 56 | ||
diff --git a/net/rds/ib.h b/net/rds/ib.h index 455ae73047fe..420afb95ca1a 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #define RDS_IB_DEFAULT_RECV_WR 1024 | 15 | #define RDS_IB_DEFAULT_RECV_WR 1024 |
16 | #define RDS_IB_DEFAULT_SEND_WR 256 | 16 | #define RDS_IB_DEFAULT_SEND_WR 256 |
17 | 17 | ||
18 | #define RDS_IB_DEFAULT_RETRY_COUNT 2 | ||
19 | |||
18 | #define RDS_IB_SUPPORTED_PROTOCOLS 0x00000003 /* minor versions supported */ | 20 | #define RDS_IB_SUPPORTED_PROTOCOLS 0x00000003 /* minor versions supported */ |
19 | 21 | ||
20 | extern struct list_head rds_ib_devices; | 22 | extern struct list_head rds_ib_devices; |
@@ -247,6 +249,7 @@ extern struct ib_client rds_ib_client; | |||
247 | 249 | ||
248 | extern unsigned int fmr_pool_size; | 250 | extern unsigned int fmr_pool_size; |
249 | extern unsigned int fmr_message_size; | 251 | extern unsigned int fmr_message_size; |
252 | extern unsigned int rds_ib_retry_count; | ||
250 | 253 | ||
251 | extern spinlock_t ib_nodev_conns_lock; | 254 | extern spinlock_t ib_nodev_conns_lock; |
252 | extern struct list_head ib_nodev_conns; | 255 | extern struct list_head ib_nodev_conns; |
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index f8e40e1a6038..605c032ed5d5 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c | |||
@@ -145,7 +145,7 @@ static void rds_ib_cm_fill_conn_param(struct rds_connection *conn, | |||
145 | /* XXX tune these? */ | 145 | /* XXX tune these? */ |
146 | conn_param->responder_resources = 1; | 146 | conn_param->responder_resources = 1; |
147 | conn_param->initiator_depth = 1; | 147 | conn_param->initiator_depth = 1; |
148 | conn_param->retry_count = 7; | 148 | conn_param->retry_count = min_t(unsigned int, rds_ib_retry_count, 7); |
149 | conn_param->rnr_retry_count = 7; | 149 | conn_param->rnr_retry_count = 7; |
150 | 150 | ||
151 | if (dp) { | 151 | if (dp) { |