Skip to content

Commit 331332e

Browse files
Ajaykumar Hotchandanivijay-suman
authored andcommitted
rds: add infrastructure to find more details for reconnect failure
This patch adds run-time support to debug scenarios where reconnect is not successful for certain time. We add two sysctl variables for start time and end time. These are number of seconds after reconnect was initiated. Orabug: 22631108 Signed-off-by: Ajaykumar Hotchandani <[email protected]> Signed-off-by: Brian Maly <[email protected]> Reviewed-by: Santosh Shilimkar <[email protected]> Acked-by: Wengang Wang <[email protected]> Orabug: 27364391 (cherry picked from commit a08ba95) cherry-pick-repo=linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]> Orabug: 33590097 UEK6 => UEK7 (cherry picked from commit bf137ce) cherry-pick-repo=UEK/production/linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: William Kucharski <[email protected]> Orabug: 33590087 UEK7 => LUCI (cherry picked from commit c11665a) cherry-pick-repo=UEK/production/linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: William Kucharski <[email protected]>
1 parent c96b52e commit 331332e

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

net/rds/rds.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,8 @@ extern unsigned int rds_sysctl_max_unacked_bytes;
907907
extern unsigned int rds_sysctl_ping_enable;
908908
extern unsigned long rds_sysctl_trace_flags;
909909
extern unsigned int rds_sysctl_trace_level;
910+
extern unsigned int rds_sysctl_shutdown_trace_start_time;
911+
extern unsigned int rds_sysctl_shutdown_trace_end_time;
910912

911913
/* threads.c */
912914
int rds_threads_init(void);

net/rds/sysctl.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ unsigned int rds_sysctl_max_unacked_bytes = (16 << 20);
4949

5050
unsigned int rds_sysctl_ping_enable = 1;
5151

52+
unsigned int rds_sysctl_shutdown_trace_start_time;
53+
unsigned int rds_sysctl_shutdown_trace_end_time;
54+
5255
/*
5356
* We have official values, but must maintain the sysctl interface for existing
5457
* software that expects to find these values here.
@@ -110,6 +113,20 @@ static struct ctl_table rds_sysctl_rds_table[] = {
110113
.mode = 0644,
111114
.proc_handler = proc_dointvec,
112115
},
116+
{
117+
.procname = "shutdown_trace_start_time",
118+
.data = &rds_sysctl_shutdown_trace_start_time,
119+
.maxlen = sizeof(int),
120+
.mode = 0644,
121+
.proc_handler = &proc_dointvec,
122+
},
123+
{
124+
.procname = "shutdown_trace_end_time",
125+
.data = &rds_sysctl_shutdown_trace_end_time,
126+
.maxlen = sizeof(int),
127+
.mode = 0644,
128+
.proc_handler = &proc_dointvec,
129+
},
113130
{ }
114131
};
115132

net/rds/threads.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,16 @@ void rds_reconnect_timeout(struct work_struct *work)
313313
void rds_shutdown_worker(struct work_struct *work)
314314
{
315315
struct rds_connection *conn = container_of(work, struct rds_connection, c_down_w);
316+
unsigned long now = get_seconds();
316317

318+
if ((now - conn->c_reconnect_start > rds_sysctl_shutdown_trace_start_time) &&
319+
(now - conn->c_reconnect_start < rds_sysctl_shutdown_trace_end_time))
320+
pr_info("RDS/IB: connection <%pI4,%pI4,%d> "
321+
"shutdown init due to '%s'\n",
322+
&conn->c_laddr,
323+
&conn->c_faddr,
324+
conn->c_tos,
325+
conn_drop_reason_str(conn->c_drop_source));
317326

318327
/* if racing is detected, lower IP backs off and let the higher IP
319328
* drives the reconnect (one-sided reconnect)

0 commit comments

Comments
 (0)