From: Ed Cashin <ecashin@coraid.com>
To: akpm@linux-foundation.org
Cc: ecashin@coraid.com, linux-kernel@vger.kernel.org
Subject: [PATCH 3/9] aoe: update cap on outstanding commands based on config query response
Date: Wed, 17 Oct 2012 18:47:31 -0700 [thread overview]
Message-ID: <0868aa101f303368be1cd83ca34e7ca4d35eb7a5.1350524227.git.ecashin@coraid.com> (raw)
In-Reply-To: <cover.1350524227.git.ecashin@coraid.com>
The ATA over Ethernet config query response contains a "buffer count"
field reflecting the AoE target's capacity to buffer incoming AoE
commands.
By taking the current value of this field into accound, we increase
performance throughput or avoid network congestion, when the value
has increased or decreased, respectively.
Signed-off-by: Ed Cashin <ecashin@coraid.com>
---
drivers/block/aoe/aoe.h | 6 +++---
drivers/block/aoe/aoecmd.c | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index d2ed7f1..52f75c0 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -122,14 +122,14 @@ struct aoeif {
struct aoetgt {
unsigned char addr[6];
- ushort nframes;
+ ushort nframes; /* cap on frames to use */
struct aoedev *d; /* parent device I belong to */
struct list_head ffree; /* list of free frames */
struct aoeif ifs[NAOEIFS];
struct aoeif *ifp; /* current aoeif in use */
ushort nout;
- ushort maxout;
- ulong falloc;
+ ushort maxout; /* current value for max outstanding */
+ ulong falloc; /* number of allocated frames */
ulong lastwadj; /* last window adjustment */
int minbcnt;
int wpkts, rpkts;
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 3804a0a..2bb8c7d 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1373,7 +1373,11 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
spin_lock_irqsave(&d->lock, flags);
t = gettgt(d, h->src);
- if (!t) {
+ if (t) {
+ t->nframes = n;
+ if (n < t->maxout)
+ t->maxout = n;
+ } else {
t = addtgt(d, h->src, n);
if (!t)
goto bail;
--
1.7.1
next prev parent reply other threads:[~2012-10-18 1:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 1:43 [PATCH 0/9] aoe: various enhancements and cleanup from v50 to v60 Ed Cashin
2012-10-18 1:43 ` [PATCH 1/9] aoe: describe the behavior of the "err" character device Ed Cashin
2012-10-18 1:45 ` [PATCH 2/9] aoe: print warning regarding a common reason for dropped transmits Ed Cashin
2012-10-18 1:47 ` Ed Cashin [this message]
2012-10-18 1:49 ` [PATCH 4/9] aoe: support the forgetting (flushing) of a user-specified AoE target Ed Cashin
2012-10-18 1:51 ` [PATCH 5/9] aoe: support larger I/O requests via aoe_maxsectors module param Ed Cashin
2012-10-18 1:53 ` [PATCH 6/9] aoe: "payload" sysfs file exports per-AoE-command data transfer size Ed Cashin
2012-10-18 1:55 ` [PATCH 7/9] aoe: cleanup: remove unused ata_scnt function Ed Cashin
2012-10-18 1:57 ` [PATCH 8/9] aoe: whitespace cleanup Ed Cashin
2012-10-18 1:59 ` [PATCH 9/9] aoe: update driver-internal version number to 60 Ed Cashin
-- strict thread matches above, loose matches on Subject: below --
2012-10-16 1:40 [PATCH 0/9] aoe: various enhancements and cleanup from v50 to v60 Ed Cashin
2012-10-16 1:44 ` [PATCH 3/9] aoe: update cap on outstanding commands based on config query response Ed Cashin
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=0868aa101f303368be1cd83ca34e7ca4d35eb7a5.1350524227.git.ecashin@coraid.com \
--to=ecashin@coraid.com \
--cc=akpm@linux-foundation.org \
--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
all inboxes | Powered by JetHome®