From: Pete Wyckoff <pw@osc.edu>
To: Mike Christie <michaelc@cs.wisc.edu>,
Erez Zilber <erezz@voltaire.com>,
Roland Dreier <rolandd@cisco.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH 3/3] iscsi iser: increase sg_tablesize
Date: Tue, 12 Feb 2008 15:54:31 -0500 [thread overview]
Message-ID: <20080212205431.GE13643@osc.edu> (raw)
In-Reply-To: <20080212205252.GB13643@osc.edu>
Increase FMR limits from 512 kB to 1 MB. This matches the limit
used by SRP which also uses FMRs for memory mapping. Also
correct a bug where the sg_tablesize was 1 smaller than what was
allocated, by folding the "+ 1" used everywhere into the
definition of the constant.
Signed-off-by: Pete Wyckoff <pw@osc.edu>
---
drivers/infiniband/ulp/iser/iscsi_iser.h | 3 ++-
drivers/infiniband/ulp/iser/iser_verbs.c | 6 ++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index 1ee867b..db8f81a 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -87,7 +87,8 @@
#define MASK_4K (~(SIZE_4K-1))
/* support upto 512KB in one RDMA */
-#define ISCSI_ISER_SG_TABLESIZE (0x80000 >> SHIFT_4K)
+/* FMR space for 1 MB of 4k-page transfers, plus 1 if not page aligned */
+#define ISCSI_ISER_SG_TABLESIZE (((1<<20) >> SHIFT_4K) + 1)
#define ISCSI_ISER_MAX_LUN 256
#define ISCSI_ISER_MAX_CMD_LEN 16
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 714b8db..c5b374f 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -140,7 +140,7 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn)
device = ib_conn->device;
ib_conn->page_vec = kmalloc(sizeof(struct iser_page_vec) +
- (sizeof(u64) * (ISCSI_ISER_SG_TABLESIZE +1)),
+ sizeof(u64) * ISCSI_ISER_SG_TABLESIZE,
GFP_KERNEL);
if (!ib_conn->page_vec) {
ret = -ENOMEM;
@@ -149,9 +149,7 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn)
ib_conn->page_vec->pages = (u64 *) (ib_conn->page_vec + 1);
params.page_shift = SHIFT_4K;
- /* when the first/last SG element are not start/end *
- * page aligned, the map whould be of N+1 pages */
- params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE + 1;
+ params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE;
/* make the pool size twice the max number of SCSI commands *
* the ML is expected to queue, watermark for unmap at 50% */
params.pool_size = ISCSI_DEF_XMIT_CMDS_MAX * 2;
--
1.5.3.8
next prev parent reply other threads:[~2008-02-12 20:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 20:52 [PATCH 0/3] iscsi iser limits Pete Wyckoff
2008-02-12 20:54 ` [PATCH 1/3] iscsi iser: remove DMA restrictions Pete Wyckoff
2008-02-12 21:10 ` James Bottomley
2008-02-12 21:46 ` Pete Wyckoff
2008-02-12 21:57 ` James Bottomley
2008-02-13 19:59 ` Pete Wyckoff
2008-02-14 21:10 ` [PATCH 1/3 v2] iscsi iser: remove DMA alignment restriction Pete Wyckoff
2008-05-05 13:19 ` Erez Zilber
2008-04-21 13:51 ` [PATCH 1/3] iscsi iser: remove DMA restrictions Erez Zilber
2008-04-23 13:41 ` [ofa-general] " Erez Zilber
2008-04-23 16:33 ` Mike Christie
2008-04-23 17:16 ` Mike Christie
2008-04-23 17:43 ` Mike Christie
2008-02-14 17:56 ` Mike Christie
2008-02-14 18:10 ` James Bottomley
2008-02-14 18:21 ` Mike Christie
2008-02-14 18:34 ` Mike Christie
2008-02-14 19:04 ` Mike Christie
2008-02-12 20:54 ` [PATCH 2/3] iscsi iser: increase max_sectors Pete Wyckoff
2008-05-05 13:36 ` Erez Zilber
2008-05-05 20:43 ` Roland Dreier
2008-05-05 17:49 ` Mike Christie
2008-05-07 15:53 ` Pete Wyckoff
2008-05-12 12:10 ` Erez Zilber
2008-02-12 20:54 ` Pete Wyckoff [this message]
2008-03-02 13:56 ` [PATCH 0/3] iscsi iser limits Erez Zilber
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=20080212205431.GE13643@osc.edu \
--to=pw@osc.edu \
--cc=erezz@voltaire.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=rolandd@cisco.com \
/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;
as well as URLs for NNTP newsgroup(s).