Commit bbb44e30 authored by Ed Cashin's avatar Ed Cashin Committed by Linus Torvalds

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: default avatarEd Cashin <ecashin@coraid.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b91316f2
......@@ -91,6 +91,9 @@ enum {
RTTDSCALE = 3,
RTTAVG_INIT = USEC_PER_SEC / 4 << RTTSCALE,
RTTDEV_INIT = RTTAVG_INIT / 4,
HARD_SCORN_SECS = 10, /* try another remote port after this */
MAX_TAINT = 1000, /* cap on aoetgt taint */
};
struct buf {
......@@ -103,6 +106,10 @@ struct buf {
struct request *rq;
};
enum frame_flags {
FFL_PROBE = 1,
};
struct frame {
struct list_head head;
u32 tag;
......@@ -118,6 +125,7 @@ struct frame {
struct bio_vec *bv;
ulong bcnt;
ulong bv_off;
char flags;
};
struct aoeif {
......@@ -138,8 +146,10 @@ struct aoetgt {
ushort next_cwnd; /* incr maxout after decrementing to zero */
ushort ssthresh; /* slow start threshold */
ulong falloc; /* number of allocated frames */
int taint; /* how much we want to avoid this aoetgt */
int minbcnt;
int wpkts, rpkts;
char nout_probes;
};
struct aoedev {
......@@ -174,7 +184,6 @@ struct aoedev {
struct list_head rexmitq; /* deferred retransmissions */
struct aoetgt *targets[NTARGETS];
struct aoetgt **tgt; /* target in use when working */
struct aoetgt *htgt; /* target needing rexmit assistance */
ulong ntargets;
ulong kicked;
char ident[512];
......
This diff is collapsed.
......@@ -223,7 +223,6 @@ aoedev_downdev(struct aoedev *d)
/* clean out the in-process request (if any) */
aoe_failip(d);
d->htgt = NULL;
/* fast fail all pending I/O */
if (d->blkq) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment