All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/7] IB/srpt: Change default behavior from using SRQ to not using SRQ
Date: Mon, 09 Oct 2017 12:56:45 -0400	[thread overview]
Message-ID: <1507568205.46071.46.camel@redhat.com> (raw)
In-Reply-To: <20171008100317.GR25829-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>

On Sun, 2017-10-08 at 13:03 +0300, Leon Romanovsky wrote:
> On Fri, Oct 06, 2017 at 02:42:39PM -0700, Bart Van Assche wrote:
> > Although the non-SRQ mode needs more resources that mode has three
> > advantages over SRQ:
> > - It works with all RDMA adapters, even those that do not support
> >   SRQ.
> > - Posting WRs and polling WCs does not trigger lock contention
> >   because only one thread at a time accesses a WR or WC queue in
> >   non-SRQ mode.
> > - The end-to-end flow control mechanism is used.
> > 
> > From the IB spec:
> > 
> >     C9-150.2.1: For QPs that are not associated with an SRQ, each
> > HCA
> >     receive queue shall generate end-to-end flow control credits.
> > If
> >     a QP is associated with an SRQ, the HCA receive queue shall not
> >     generate end-to-end flow control credits.
> > 
> > Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
> > ---
> >  drivers/infiniband/ulp/srpt/ib_srpt.c | 130
> > +++++++++++++++++++++++++---------
> >  drivers/infiniband/ulp/srpt/ib_srpt.h |   4 ++
> >  2 files changed, 99 insertions(+), 35 deletions(-)
> > 
> > diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c
> > b/drivers/infiniband/ulp/srpt/ib_srpt.c
> > index 6cf95ad870cc..a21b7a96635c 100644
> > --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> > +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> > @@ -75,11 +75,19 @@ module_param(srp_max_req_size, int, 0444);
> >  MODULE_PARM_DESC(srp_max_req_size,
> >  		 "Maximum size of SRP request messages in
> > bytes.");
> > 
> > +static bool use_srq;
> > +module_param(use_srq, bool, S_IRUGO | S_IWUSR);
> > +MODULE_PARM_DESC(use_srq, "Whether or not to use SRQ");
> > +
> 
> It is a little bit strange to ask from user to decide if his adapter
> supports SRQ or not.
> 
> It should be automatically.

I think Bart's intent is that the driver not use SRQ as the default
behavior even if the adapter supports it, so querying the adapter for
support and enabling it if it exists would not achieve his desired
result.  This would then be used to override that behavior.  Is that
correct Bart?

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
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:[~2017-10-09 16:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 21:42 [PATCH 0/7] SRP patches for kernel v4.15 Bart Van Assche
2017-10-06 21:42 ` [PATCH 4/7] IB/srp: Avoid a cable pull can trigger a kernel crash Bart Van Assche
     [not found]   ` <20171006214243.11296-5-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-08 13:22     ` Leon Romanovsky
2017-10-08 13:22       ` Leon Romanovsky
2017-10-09 17:02       ` Bart Van Assche
2017-10-11 12:36     ` Sagi Grimberg
2017-10-11 12:36       ` Sagi Grimberg
     [not found] ` <20171006214243.11296-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-06 21:42   ` [PATCH 1/7] IB/srpt: Limit the send and receive queue sizes to what the HCA supports Bart Van Assche
     [not found]     ` <20171006214243.11296-2-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 12:31       ` Sagi Grimberg
2017-10-06 21:42   ` [PATCH 2/7] IB/srpt: Cache global L_Key Bart Van Assche
     [not found]     ` <20171006214243.11296-3-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-08  9:01       ` Christoph Hellwig
     [not found]         ` <20171008090107.GA17153-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-10-09 16:57           ` Bart Van Assche
2017-10-06 21:42   ` [PATCH 3/7] IB/srpt: Change default behavior from using SRQ to not using SRQ Bart Van Assche
     [not found]     ` <20171006214243.11296-4-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-08 10:03       ` Leon Romanovsky
     [not found]         ` <20171008100317.GR25829-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-09 16:56           ` Doug Ledford [this message]
     [not found]             ` <1507568205.46071.46.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-09 17:01               ` Bart Van Assche
     [not found]                 ` <1507568492.2674.11.camel-Sjgp3cTcYWE@public.gmane.org>
2017-10-09 17:12                   ` Doug Ledford
2017-10-10  4:14                   ` Leon Romanovsky
     [not found]                     ` <20171010041423.GJ1252-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-10 14:34                       ` Doug Ledford
     [not found]                         ` <9443ec1f-0acd-9fa3-4621-a29085d2c606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-10 15:00                           ` Leon Romanovsky
     [not found]                             ` <20171010150018.GC2106-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-10 15:13                               ` Doug Ledford
     [not found]                                 ` <1507648402.46071.53.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-10 15:44                                   ` Leon Romanovsky
     [not found]                                     ` <20171010154439.GE2106-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-10 16:04                                       ` Bart Van Assche
     [not found]                                         ` <1507651473.2815.20.camel-Sjgp3cTcYWE@public.gmane.org>
2017-10-10 17:04                                           ` Jason Gunthorpe
     [not found]                                             ` <20171010170429.GA21288-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-10 17:10                                               ` Bart Van Assche
     [not found]                                                 ` <1507655454.2815.43.camel-Sjgp3cTcYWE@public.gmane.org>
2017-10-10 18:01                                                   ` Leon Romanovsky
2017-10-10 16:11                                       ` Doug Ledford
2017-10-06 21:42   ` [PATCH 5/7] IB/srp: Remove second argument of srp_destroy_qp() Bart Van Assche
     [not found]     ` <20171006214243.11296-6-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 12:36       ` Sagi Grimberg
2017-10-06 21:42   ` [PATCH 6/7] IB/srp: Cache global rkey Bart Van Assche
2017-10-06 21:42   ` [PATCH 7/7] IB/srp: Make CM timeout dependent on subnet timeout Bart Van Assche
     [not found]     ` <20171006214243.11296-8-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 12:38       ` Sagi Grimberg

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=1507568205.46071.46.camel@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bart.vanassche-Sjgp3cTcYWE@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@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.