From: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>,
Laurence Oberman
<loberman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 11/11] IB/srp: Prevent mapping failures
Date: Wed, 4 May 2016 16:44:53 -0700 [thread overview]
Message-ID: <572A8975.9060606@sandisk.com> (raw)
In-Reply-To: <20160503093307.GL19931-jcswGhMUV9g@public.gmane.org>
On 05/03/2016 02:33 AM, Christoph Hellwig wrote:
> On Fri, Apr 22, 2016 at 02:16:31PM -0700, Bart Van Assche wrote:
>> If both max_sectors and the queue_depth are high enough it can
>> happen that the MR pool is depleted temporarily. This causes
>> the SRP initiator to report mapping failures. Although the SRP
>> initiator recovers from such mapping failures, prevent that
>> this can happen by limiting max_sectors.
>
> FYI, even with this patch I see tons of errors like:
>
> [ 2237.161106] scsi host7: ib_srp: Failed to map data (-12)
Hello Christoph,
The patch below makes these messages disappear on my setup. Are
you OK with including this change in patch 11/11?
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index fc1e84b..53c8e08 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -3409,6 +3409,12 @@ static ssize_t srp_create_target(struct device *dev,
target_host->sg_tablesize = target->sg_tablesize;
target->mr_pool_size = target->scsi_host->can_queue;
+ /*
+ * The indirect data buffer descriptor is contiguous so the memory for
+ * that buffer will only be registered if register_always is true.
+ */
+ if (register_always)
+ target->mr_pool_size *= 2;
target->indirect_size = target->sg_tablesize *
sizeof (struct srp_direct_buf);
target->max_iu_len = sizeof (struct srp_cmd) +
Bart.
--
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-05-04 23:44 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 21:11 [PATCH 0/11] More SRP patches for kernel v4.7 Bart Van Assche
[not found] ` <571A936F.7040409-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-22 21:12 ` [PATCH 01/11] IB/srp: Fix a spelling error in a source code comment Bart Van Assche
[not found] ` <571A93AA.9000605-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-03 9:26 ` Christoph Hellwig
2016-04-22 21:12 ` [PATCH 02/11] IB/srp: Fix a comment Bart Van Assche
[not found] ` <571A93CF.9050506-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-26 20:52 ` Sagi Grimberg
2016-05-03 9:26 ` Christoph Hellwig
2016-04-22 21:13 ` [PATCH 03/11] IB/srp: Document srp_map_data() return value Bart Van Assche
[not found] ` <571A93E5.7030807-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-03 9:27 ` Christoph Hellwig
2016-04-22 21:13 ` [PATCH 04/11] IB/srp: Fix srp_map_data() error paths Bart Van Assche
[not found] ` <571A93FF.8020102-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-26 20:53 ` Sagi Grimberg
2016-05-03 9:28 ` Christoph Hellwig
2016-04-22 21:13 ` [PATCH 05/11] IB/srp: Introduce target->mr_pool_size Bart Van Assche
[not found] ` <571A9415.4090002-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-03 9:28 ` Christoph Hellwig
2016-04-22 21:14 ` [PATCH 06/11] IB/srp: Avoid that mapping failure triggers an infinite loop Bart Van Assche
[not found] ` <571A9427.8010306-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-03 9:29 ` Christoph Hellwig
2016-04-22 21:14 ` [PATCH 07/11] IB/srp: Move code out of a loop Bart Van Assche
[not found] ` <571A9443.6000600-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-26 21:00 ` Sagi Grimberg
2016-05-03 9:29 ` Christoph Hellwig
2016-04-22 21:15 ` [PATCH 08/11] IB/srp: Move common code into the caller Bart Van Assche
[not found] ` <571A9458.3050904-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-26 21:00 ` Sagi Grimberg
2016-05-03 9:29 ` Christoph Hellwig
2016-04-22 21:15 ` [PATCH 09/11] IB/srp: Fix a NULL pointer dereference Bart Van Assche
[not found] ` <571A9472.5050202-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-26 21:04 ` Sagi Grimberg
[not found] ` <571FD7F4.4090006-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-27 6:20 ` Leon Romanovsky
[not found] ` <20160427062053.GK7974-2ukJVAZIZ/Y@public.gmane.org>
2016-04-27 14:22 ` Bart Van Assche
2016-04-27 15:39 ` Bart Van Assche
2016-04-27 19:50 ` Bart Van Assche
2016-05-03 9:30 ` Christoph Hellwig
[not found] ` <20160503093032.GJ19931-jcswGhMUV9g@public.gmane.org>
2016-05-03 20:57 ` Bart Van Assche
[not found] ` <5729109E.6040500-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-03 21:01 ` Laurence Oberman
2016-04-22 21:16 ` [PATCH 10/11] IB/srp: Do not register memory if register_always = -1 Bart Van Assche
[not found] ` <571A9490.9010003-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-03 9:30 ` Christoph Hellwig
2016-04-22 21:16 ` [PATCH 11/11] IB/srp: Prevent mapping failures Bart Van Assche
[not found] ` <571A94AF.7000609-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-23 22:12 ` Laurence Oberman
2016-04-24 8:35 ` Leon Romanovsky
[not found] ` <20160424083538.GF7974-2ukJVAZIZ/Y@public.gmane.org>
2016-04-24 22:44 ` Laurence Oberman
2016-04-25 0:48 ` Bart Van Assche
[not found] ` <571D6975.2020905-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-25 5:54 ` Leon Romanovsky
[not found] ` <20160425055433.GG7974-2ukJVAZIZ/Y@public.gmane.org>
2016-04-25 9:46 ` Sagi Grimberg
[not found] ` <571DE793.6090705-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-25 15:53 ` Leon Romanovsky
[not found] ` <20160425155320.GH7974-2ukJVAZIZ/Y@public.gmane.org>
2016-04-25 16:16 ` Bart Van Assche
[not found] ` <571E42D2.70705-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-26 14:12 ` Leon Romanovsky
[not found] ` <20160426141229.GI7974-2ukJVAZIZ/Y@public.gmane.org>
2016-04-26 21:08 ` Sagi Grimberg
[not found] ` <571FD8D3.1060403-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-26 23:10 ` Bart Van Assche
2016-04-26 21:06 ` Sagi Grimberg
2016-05-03 9:33 ` Christoph Hellwig
[not found] ` <20160503093307.GL19931-jcswGhMUV9g@public.gmane.org>
2016-05-03 21:13 ` Bart Van Assche
[not found] ` <5729147C.5000904-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-03 21:23 ` Laurence Oberman
2016-05-04 9:09 ` Christoph Hellwig
[not found] ` <20160504090908.GA14787-jcswGhMUV9g@public.gmane.org>
2016-05-04 16:17 ` Bart Van Assche
2016-05-04 23:44 ` Bart Van Assche [this message]
[not found] ` <572A8975.9060606-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-05 14:06 ` Christoph Hellwig
[not found] ` <20160505140616.GA15000-jcswGhMUV9g@public.gmane.org>
2016-05-05 19:50 ` Bart Van Assche
2016-05-05 19:58 ` Laurence Oberman
[not found] ` <2102017158.34060891.1462478304470.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-05 20:14 ` Bart Van Assche
[not found] ` <572BA98F.4090109-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-05 20:17 ` Bart Van Assche
[not found] ` <572BAA6F.1060607-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-05 20:55 ` Laurence Oberman
[not found] ` <804753248.34153510.1462481756460.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-05 21:40 ` Bart Van Assche
[not found] ` <572BBDC0.5070205-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-05 22:01 ` Laurence Oberman
[not found] ` <1133135399.34245490.1462485666601.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-05 22:46 ` Bart Van Assche
[not found] ` <572BCD59.7010701-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-09 22:50 ` Laurence Oberman
[not found] ` <169904890.34764265.1462834206901.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-09 22:55 ` Bart Van Assche
2016-05-05 20:44 ` [PATCH 0/11] More SRP patches for kernel v4.7 Doug Ledford
[not found] ` <f406cd39-c6dc-d458-0ab0-c400fdd5b243-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-05 20:50 ` Bart Van Assche
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=572A8975.9060606@sandisk.com \
--to=bart.vanassche-xdaiopvojttbdgjk7y7tuq@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hch-jcswGhMUV9g@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=loberman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=sagi-NQWnxTmZq1alnMjI0IkVqw@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.