Skip to content

Commit 086bee3

Browse files
SantoshShilimkarSomasundaram Krishnasamy
authored andcommitted
RDS: restore the exponential back-off scheme
Lower IP and exponential back-off scheme was added to save the SM queries because of races but it doesn't do what its intended. The exponential back-off scheme does a good job of backing off for races. The code just falls back to the original scheme. Orabug: 22347191 Signed-off-by: Santosh Shilimkar <[email protected]> Reviewed-by: Mukesh Kacker <[email protected]> Tested-by: Michael Nowak <[email protected]> Tested-by: Rafael Alejandro Peralez <[email protected]> Tested-by: Liwen Huang <[email protected]> Tested-by: Hong Liu <[email protected]> Orabug: 27364391 (cherry picked from commit 812c027) cherry-pick-repo=linux-uek.git Conflicts: net/rds/threads.c Signed-off-by: Gerd Rausch <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent 64c8a27 commit 086bee3

File tree

5 files changed

+1
-32
lines changed

5 files changed

+1
-32
lines changed

net/rds/connection.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ void rds_conn_drop(struct rds_connection *conn, int reason)
750750
conn->c_reconnect_warn = 1;
751751
conn->c_reconnect_drops = 0;
752752
conn->c_reconnect_err = 0;
753-
conn->c_reconnect_racing = 0;
754753
printk(KERN_INFO "RDS/IB: connection "
755754
"<%pI4,%pI4,%d> dropped due to '%s'\n",
756755
&conn->c_laddr,

net/rds/ib_cm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,6 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
936936
} else if (rds_conn_state(conn) == RDS_CONN_CONNECTING) {
937937
unsigned long now = get_seconds();
938938

939-
conn->c_reconnect_racing++;
940-
941939
/*
942940
* after 15 seconds, give up on existing connection
943941
* attempts and make them try again. At this point

net/rds/rdma_transport.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,6 @@ int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
256256
case RDMA_CM_EVENT_REJECTED:
257257
err = (int *)event->param.conn.private_data;
258258

259-
if (conn && event->status == RDS_REJ_CONSUMER_DEFINED &&
260-
*err <= 1)
261-
conn->c_reconnect_racing++;
262-
263259
if (conn) {
264260
if (event->status == RDS_REJ_CONSUMER_DEFINED &&
265261
(*err) == 0) {

net/rds/rds.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ struct rds_connection {
294294

295295
unsigned int c_rdsinfo_pending;
296296

297-
unsigned int c_reconnect_racing;
298297
unsigned int c_route_resolved;
299298

300299
enum rds_conn_drop_src c_drop_source;

net/rds/threads.c

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,8 @@ void rds_queue_reconnect(struct rds_connection *conn)
150150
rand % conn->c_reconnect_jiffies, conn->c_reconnect_jiffies,
151151
conn, &conn->c_laddr, &conn->c_faddr, conn->c_tos);
152152

153-
if (conn->c_laddr >= conn->c_faddr)
154153
queue_delayed_work(conn->c_wq, &conn->c_conn_w,
155154
rand % conn->c_reconnect_jiffies);
156-
else
157-
queue_delayed_work(conn->c_wq, &conn->c_conn_w,
158-
msecs_to_jiffies(100));
159155

160156
conn->c_reconnect_jiffies = min(conn->c_reconnect_jiffies * 2,
161157
rds_sysctl_reconnect_max_jiffies);
@@ -297,7 +293,6 @@ void rds_reconnect_timeout(struct work_struct *work)
297293
&conn->c_laddr, &conn->c_faddr,
298294
conn->c_tos);
299295
rds_conn_drop(conn, DR_RECONNECT_TIMEOUT);
300-
conn->c_reconnect_racing = 0;
301296
}
302297
}
303298

@@ -315,25 +310,7 @@ void rds_shutdown_worker(struct work_struct *work)
315310
conn->c_tos,
316311
conn_drop_reason_str(conn->c_drop_source));
317312

318-
/* if racing is detected, lower IP backs off and let the higher IP
319-
* drives the reconnect (one-sided reconnect)
320-
*/
321-
if (conn->c_laddr < conn->c_faddr && conn->c_reconnect_racing) {
322-
rds_rtd(RDS_RTD_CM,
323-
"calling rds_conn_shutdown, conn %p:0 <%pI4,%pI4,%d>\n",
324-
conn, &conn->c_laddr, &conn->c_faddr,
325-
conn->c_tos);
326-
rds_conn_shutdown(conn, 0);
327-
queue_delayed_work(conn->c_wq, &conn->c_reconn_w,
328-
msecs_to_jiffies(5000));
329-
} else {
330-
rds_rtd(RDS_RTD_CM,
331-
"calling rds_conn_shutdown, conn %p:1 <%pI4,%pI4,%d>\n",
332-
conn, &conn->c_laddr, &conn->c_faddr,
333-
conn->c_tos);
334-
rds_conn_shutdown(conn, 1);
335-
}
336-
313+
rds_conn_shutdown(conn, 1);
337314
}
338315

339316
void rds_threads_exit(void)

0 commit comments

Comments
 (0)