From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: "Ed L. Cashin" <ecashin@coraid.com>, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 8/15] aoe: improve retransmission heuristics
Date: Wed, 18 Oct 2006 13:08:59 -0700 [thread overview]
Message-ID: <1161202171977-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11612021682148-git-send-email-greg@kroah.com>
From: Ed L. Cashin <ecashin@coraid.com>
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>
---
drivers/block/aoe/aoe.h | 7 ++++---
drivers/block/aoe/aoecmd.c | 16 +++++++++++++---
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index 4d79f1e..7b11217 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -125,8 +125,10 @@ struct aoedev {
ulong sysminor;
ulong aoemajor;
ulong aoeminor;
- ulong nopen; /* (bd_openers isn't available without sleeping) */
- ulong rttavg; /* round trip average of requests/responses */
+ u16 nopen; /* (bd_openers isn't available without sleeping) */
+ u16 lasttag; /* last tag sent */
+ u16 rttavg; /* round trip average of requests/responses */
+ u16 mintimer;
u16 fw_ver; /* version of blade's firmware */
u16 maxbcnt;
struct work_struct work;/* disk create work struct */
@@ -142,7 +144,6 @@ struct aoedev {
mempool_t *bufpool; /* for deadlock-free Buf allocation */
struct list_head bufq; /* queue of bios to work on */
struct buf *inprocess; /* the one we're currently working on */
- ulong lasttag; /* last tag sent */
ushort lostjumbo;
ushort nframes; /* number of frames below */
struct frame *frames;
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 621fdbb..c0bdc1f 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -461,8 +461,15 @@ calc_rttavg(struct aoedev *d, int rtt)
register long n;
n = rtt;
- if (n < MINTIMER)
- n = MINTIMER;
+ if (n < 0) {
+ n = -rtt;
+ if (n < MINTIMER)
+ n = MINTIMER;
+ else if (n > MAXTIMER)
+ n = MAXTIMER;
+ d->mintimer += (n - d->mintimer) >> 1;
+ } else if (n < d->mintimer)
+ n = d->mintimer;
else if (n > MAXTIMER)
n = MAXTIMER;
@@ -498,8 +505,10 @@ aoecmd_ata_rsp(struct sk_buff *skb)
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) {
+ calc_rttavg(d, -tsince(n));
spin_unlock_irqrestore(&d->lock, flags);
snprintf(ebuf, sizeof ebuf,
"%15s e%d.%d tag=%08x@%08lx\n",
@@ -724,6 +733,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
return;
}
d->flags |= DEVFL_PAUSE; /* force pause */
+ d->mintimer = MINTIMER;
d->fw_ver = be16_to_cpu(ch->fwver);
/* check for already outstanding ataid */
--
1.4.2.4
next prev parent reply other threads:[~2006-10-18 20:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 20:04 [GIT PATCH] AOE fixes and update for 2.6.19-rc2 Greg KH
2006-10-18 20:08 ` [PATCH 1/15] aoe: eliminate isbusy message Greg KH
2006-10-18 20:08 ` [PATCH 2/15] aoe: update copyright date Greg KH
2006-10-18 20:08 ` [PATCH 3/15] aoe: remove unused NARGS enum Greg KH
2006-10-18 20:08 ` [PATCH 4/15] aoe: zero copy write 1 of 2 Greg KH
2006-10-18 20:08 ` [PATCH 5/15] aoe: jumbo frame support " Greg KH
2006-10-18 20:08 ` [PATCH 6/15] aoe: clean up printks via macros Greg KH
2006-10-18 20:08 ` [PATCH 7/15] aoe: jumbo frame support 2 of 2 Greg KH
2006-10-18 20:08 ` Greg KH [this message]
2006-10-18 20:09 ` [PATCH 9/15] aoe: zero copy write " Greg KH
2006-10-18 20:09 ` [PATCH 10/15] aoe: module parameter for device timeout Greg KH
2006-10-18 20:09 ` [PATCH 11/15] aoe: use bio->bi_idx Greg KH
2006-10-18 20:09 ` [PATCH 12/15] aoe: remove sysfs comment Greg KH
2006-10-18 20:09 ` [PATCH 13/15] aoe: update driver version Greg KH
2006-10-18 20:09 ` [PATCH 14/15] aoe: revert printk macros Greg KH
2006-10-18 20:09 ` [PATCH 15/15] aoe: fix sysfs_create_file warnings Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1161202171977-git-send-email-greg@kroah.com \
--to=greg@kroah.com \
--cc=ecashin@coraid.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox