Skip to content

Commit bbb44e3

Browse files
ecashintorvalds
authored andcommitted
aoe: improve handling of misbehaving network paths
An AoE target can have multiple network ports used for AoE, and in the aoe driver, those are tracked by the aoetgt struct. These changes allow the aoe driver to handle network paths, or aoetgts, that are not working well, compared to the others. Paths that do not get responses despite the retransmission of AoE commands are marked as "tainted", and non-tainted paths are preferred. Meanwhile, the aoe driver attempts to "probe" the tainted path in the background by issuing reads of LBA 0 that are padded out to full (possibly jumbo-frame) size. If the probes get responses, then the path is "redeemed", and its taint is removed. This mechanism has been shown to be helpful in transparently handling and recovering from real-world network "brown outs" in ways that the earlier "shoot the help-needing target in the head" mechanism could not. Signed-off-by: Ed Cashin <ecashin@coraid.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b91316f commit bbb44e3

3 files changed

Lines changed: 268 additions & 121 deletions

File tree

‎drivers/block/aoe/aoe.h‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ enum {
9191
RTTDSCALE = 3,
9292
RTTAVG_INIT = USEC_PER_SEC / 4 << RTTSCALE,
9393
RTTDEV_INIT = RTTAVG_INIT / 4,
94+
95+
HARD_SCORN_SECS = 10, /* try another remote port after this */
96+
MAX_TAINT = 1000, /* cap on aoetgt taint */
9497
};
9598

9699
struct buf {
@@ -103,6 +106,10 @@ struct buf {
103106
struct request *rq;
104107
};
105108

109+
enum frame_flags {
110+
FFL_PROBE = 1,
111+
};
112+
106113
struct frame {
107114
struct list_head head;
108115
u32 tag;
@@ -118,6 +125,7 @@ struct frame {
118125
struct bio_vec *bv;
119126
ulong bcnt;
120127
ulong bv_off;
128+
char flags;
121129
};
122130

123131
struct aoeif {
@@ -138,8 +146,10 @@ struct aoetgt {
138146
ushort next_cwnd; /* incr maxout after decrementing to zero */
139147
ushort ssthresh; /* slow start threshold */
140148
ulong falloc; /* number of allocated frames */
149+
int taint; /* how much we want to avoid this aoetgt */
141150
int minbcnt;
142151
int wpkts, rpkts;
152+
char nout_probes;
143153
};
144154

145155
struct aoedev {
@@ -174,7 +184,6 @@ struct aoedev {
174184
struct list_head rexmitq; /* deferred retransmissions */
175185
struct aoetgt *targets[NTARGETS];
176186
struct aoetgt **tgt; /* target in use when working */
177-
struct aoetgt *htgt; /* target needing rexmit assistance */
178187
ulong ntargets;
179188
ulong kicked;
180189
char ident[512];

0 commit comments

Comments
 (0)