From: sagig <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
To: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: iSER initiator in 4.5 is unhappy..
Date: Wed, 6 Apr 2016 20:34:35 +0300 [thread overview]
Message-ID: <570548AB.4090802@grimberg.me> (raw)
In-Reply-To: <20160405094339.GA1622-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
>> This implies that maybe something broke in ib_sg_to_pages:
>>
>> Can you run iser with this patch applied (FR or FMR):
>
> For FMR this won't trigger, but here is the FR run:
>
> [ 63.016616] iser: iser_fast_reg_mr: failed to map sg (101/102)
> [ 63.023183] iser: iser_data_buf_dump: sg[0] dma_addr:0x90E15D200
> page:0xffffea0024385740 off:0x200 sz:0xe00 dma_len:0xe00
> [ 63.035466] iser: iser_data_buf_dump: sg[1] dma_addr:0x90611D000
> page:0xffffea0024184740 off:0x0 sz:0x1000 dma_len:0x1000
> [ 63.047749] iser: iser_data_buf_dump: sg[2] dma_addr:0x90EDB3000
> page:0xffffea00243b6cc0 off:0x0 sz:0x1000 dma_len:0x1000
> [ 63.060050] iser: iser_data_buf_dump: sg[3] dma_addr:0x9062CB000
> page:0xffffea002418b2c0 off:0x0 sz:0x1000 dma_len:0x1000
...
> [ 64.215764] iser: iser_data_buf_dump: sg[95] dma_addr:0x90E440000
> page:0xffffea0024391000 off:0x0 sz:0x2000 dma_len:0x2000
> [ 64.228380] iser: iser_data_buf_dump: sg[96] dma_addr:0x90E43E000
> page:0xffffea0024390f80 off:0x0 sz:0x2000 dma_len:0x2000
> [ 64.240995] iser: iser_data_buf_dump: sg[97] dma_addr:0x901586000
> page:0xffffea0024056180 off:0x0 sz:0x2000 dma_len:0x2000
> [ 64.253611] iser: iser_data_buf_dump: sg[98] dma_addr:0x90F390000
> page:0xffffea00243ce400 off:0x0 sz:0x2000 dma_len:0x2000
> [ 64.266219] iser: iser_data_buf_dump: sg[99] dma_addr:0x90660E000
> page:0xffffea0024198380 off:0x0 sz:0x2000 dma_len:0x2000
> [ 64.278836] iser: iser_data_buf_dump: sg[100] dma_addr:0x9017E6000
> page:0xffffea002405f980 off:0x0 sz:0x1000 dma_len:0x1000
> [ 64.291577] iser: iser_data_buf_dump: sg[101] dma_addr:0x93FBF1000
> page:0xffffea0024fefc40 off:0x0 sz:0x200 dma_len:0x200
>
So this scatterlist seems perfectly fine (no gaps). The only thing I
can think of is that we don't have enough space reserved, but I counted
127 pages in the scatterlist when iser reserves 128 (by default).
Just in case I mis-counted, can you (or Max) try with the below
patch:
--
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c
b/drivers/infiniband/ulp/iser/iser_initiator.c
index ed54b388e7ad..f2ac891c432a 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -250,7 +250,7 @@ int iser_alloc_rx_descriptors(struct iser_conn
*iser_conn,
iser_conn->min_posted_rx = iser_conn->qp_max_recv_dtos >> 2;
if (device->reg_ops->alloc_reg_res(ib_conn, session->scsi_cmds_max,
- iser_conn->scsi_sg_tablesize))
+ iser_conn->scsi_sg_tablesize
+ 1))
goto create_rdma_reg_res_failed;
if (iser_alloc_login_buf(iser_conn))
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c
b/drivers/infiniband/ulp/iser/iser_verbs.c
index 40c0f4978e2f..937b97f34be1 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -721,7 +721,7 @@ iser_calc_scsi_params(struct iser_conn *iser_conn,
sg_tablesize = DIV_ROUND_UP(max_sectors * 512, SIZE_4K);
sup_sg_tablesize = min_t(unsigned, ISCSI_ISER_MAX_SG_TABLESIZE,
-
device->ib_device->attrs.max_fast_reg_page_list_len);
+
device->ib_device->attrs.max_fast_reg_page_list_len - 1);
if (sg_tablesize > sup_sg_tablesize) {
sg_tablesize = sup_sg_tablesize;
--
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-04-06 17:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 13:46 iSER initiator in 4.5 is unhappy Christoph Hellwig
[not found] ` <20160404134656.GA30269-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-04 14:42 ` Max Gurtovoy
[not found] ` <57027D48.4000500-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-04-04 15:10 ` Christoph Hellwig
2016-04-04 17:29 ` sagig
[not found] ` <5702A46F.5070109-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-04 17:38 ` sagig
[not found] ` <5702A6AC.9020008-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-04 22:58 ` Christoph Hellwig
[not found] ` <20160404225831.GA6725-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-05 8:55 ` sagig
[not found] ` <57037D8E.4030506-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-05 9:43 ` Christoph Hellwig
[not found] ` <20160405094339.GA1622-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-06 17:34 ` sagig [this message]
[not found] ` <570548AB.4090802-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-06 23:16 ` Christoph Hellwig
[not found] ` <20160406231658.GB11588-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-07 7:14 ` Sagi Grimberg
[not found] ` <570608C9.1070805-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-07 9:09 ` Max Gurtovoy
[not found] ` <570623B9.8040108-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-04-07 15:16 ` Sagi Grimberg
[not found] ` <570679B6.10409-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-07 15:20 ` Christoph Hellwig
2016-04-07 22:13 ` Christoph Hellwig
[not found] ` <20160407221359.GA16686-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-08 1:42 ` Bart Van Assche
2016-04-10 13:30 ` Max Gurtovoy
[not found] ` <570A5563.5060104-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-04-10 14:52 ` Christoph Hellwig
2016-04-12 21:33 ` Bart Van Assche
2016-04-04 22:46 ` Christoph Hellwig
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=570548AB.4090802@grimberg.me \
--to=sagi-nqwnxtmzq1alnmji0ikvqw@public.gmane.org \
--cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.