aoe: improve retransmission heuristics
Add a dynamic minimum timer for better retransmission behavior. Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ddec63e867
commit
dced3a053d
@@ -125,8 +125,10 @@ struct aoedev {
|
|||||||
ulong sysminor;
|
ulong sysminor;
|
||||||
ulong aoemajor;
|
ulong aoemajor;
|
||||||
ulong aoeminor;
|
ulong aoeminor;
|
||||||
ulong nopen; /* (bd_openers isn't available without sleeping) */
|
u16 nopen; /* (bd_openers isn't available without sleeping) */
|
||||||
ulong rttavg; /* round trip average of requests/responses */
|
u16 lasttag; /* last tag sent */
|
||||||
|
u16 rttavg; /* round trip average of requests/responses */
|
||||||
|
u16 mintimer;
|
||||||
u16 fw_ver; /* version of blade's firmware */
|
u16 fw_ver; /* version of blade's firmware */
|
||||||
u16 maxbcnt;
|
u16 maxbcnt;
|
||||||
struct work_struct work;/* disk create work struct */
|
struct work_struct work;/* disk create work struct */
|
||||||
@@ -142,7 +144,6 @@ struct aoedev {
|
|||||||
mempool_t *bufpool; /* for deadlock-free Buf allocation */
|
mempool_t *bufpool; /* for deadlock-free Buf allocation */
|
||||||
struct list_head bufq; /* queue of bios to work on */
|
struct list_head bufq; /* queue of bios to work on */
|
||||||
struct buf *inprocess; /* the one we're currently working on */
|
struct buf *inprocess; /* the one we're currently working on */
|
||||||
ulong lasttag; /* last tag sent */
|
|
||||||
ushort lostjumbo;
|
ushort lostjumbo;
|
||||||
ushort nframes; /* number of frames below */
|
ushort nframes; /* number of frames below */
|
||||||
struct frame *frames;
|
struct frame *frames;
|
||||||
|
@@ -461,10 +461,17 @@ calc_rttavg(struct aoedev *d, int rtt)
|
|||||||
register long n;
|
register long n;
|
||||||
|
|
||||||
n = rtt;
|
n = rtt;
|
||||||
|
if (n < 0) {
|
||||||
|
n = -rtt;
|
||||||
if (n < MINTIMER)
|
if (n < MINTIMER)
|
||||||
n = MINTIMER;
|
n = MINTIMER;
|
||||||
else if (n > MAXTIMER)
|
else if (n > MAXTIMER)
|
||||||
n = MAXTIMER;
|
n = MAXTIMER;
|
||||||
|
d->mintimer += (n - d->mintimer) >> 1;
|
||||||
|
} else if (n < d->mintimer)
|
||||||
|
n = d->mintimer;
|
||||||
|
else if (n > MAXTIMER)
|
||||||
|
n = MAXTIMER;
|
||||||
|
|
||||||
/* g == .25; cf. Congestion Avoidance and Control, Jacobson & Karels; 1988 */
|
/* g == .25; cf. Congestion Avoidance and Control, Jacobson & Karels; 1988 */
|
||||||
n -= d->rttavg;
|
n -= d->rttavg;
|
||||||
@@ -498,8 +505,10 @@ aoecmd_ata_rsp(struct sk_buff *skb)
|
|||||||
|
|
||||||
spin_lock_irqsave(&d->lock, flags);
|
spin_lock_irqsave(&d->lock, flags);
|
||||||
|
|
||||||
f = getframe(d, be32_to_cpu(hin->tag));
|
n = be32_to_cpu(hin->tag);
|
||||||
|
f = getframe(d, n);
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
|
calc_rttavg(d, -tsince(n));
|
||||||
spin_unlock_irqrestore(&d->lock, flags);
|
spin_unlock_irqrestore(&d->lock, flags);
|
||||||
snprintf(ebuf, sizeof ebuf,
|
snprintf(ebuf, sizeof ebuf,
|
||||||
"%15s e%d.%d tag=%08x@%08lx\n",
|
"%15s e%d.%d tag=%08x@%08lx\n",
|
||||||
@@ -724,6 +733,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d->flags |= DEVFL_PAUSE; /* force pause */
|
d->flags |= DEVFL_PAUSE; /* force pause */
|
||||||
|
d->mintimer = MINTIMER;
|
||||||
d->fw_ver = be16_to_cpu(ch->fwver);
|
d->fw_ver = be16_to_cpu(ch->fwver);
|
||||||
|
|
||||||
/* check for already outstanding ataid */
|
/* check for already outstanding ataid */
|
||||||
|
Reference in New Issue
Block a user