All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Christoph Hellwig <hch-jcswGhMUV9g@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: Mon, 25 Apr 2016 09:16:18 -0700	[thread overview]
Message-ID: <571E42D2.70705@sandisk.com> (raw)
In-Reply-To: <20160425155320.GH7974-2ukJVAZIZ/Y@public.gmane.org>

On 04/25/2016 08:53 AM, Leon Romanovsky wrote:
> On Mon, Apr 25, 2016 at 12:46:59PM +0300, Sagi Grimberg wrote:
>>
>>>>>> +		max_max_sectors = (srp_dev->max_pages_per_mr - 1) <<
>>>>>> +				  (ilog2(srp_dev->mr_page_size) - 9);
>>>>>
>>>>>  From my understanding, srp_dev->max_pages_per_mr can be equal to 1, in
>>>>> case device will advertise it.
>>>>>
>>>>> Is this understanding correct?
>>>>> Will the code work in such case?
>>>>
>>>> Hello Leon,
>>>>
>>>> I'm not sure a HCA driver exists for which max_pages_per_mr == 1.
>>>> Additionally, I'm not sure such a driver would be useful because such a
>>>> driver would limit the maximum data transfer size for the iSER protocol to 4
>>>> KB. That is too low to reach good performance.
>>>
>>> Bart and Laurence,
>>> You are raising valuable arguments about sanity of setting srp_dev->max_pages_per_mr
>>> to be equal 1. I totally agree with you that it is insane, however my
>>> original question was "does the code support such value?"
>>
>> I don't see why we should worry about imaginary devices.
>
> It is called corner case and the code supports it.

I can add a WARN_ON_ONCE() statement for max_pages_per_mr == 1. That 
will make it easy to figure out where to start looking if in the future 
a HCA driver would be added that causes max_pages_per_mr == 1.

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

  parent reply	other threads:[~2016-04-25 16:16 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 [this message]
     [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
     [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=571E42D2.70705@sandisk.com \
    --to=bart.vanassche-xdaiopvojttbdgjk7y7tuq@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@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.