Re: [PATCH 3/7] IB/srpt: Change default behavior from using SRQ to not using SRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> ---
>  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.


>  static int srpt_srq_size = DEFAULT_SRPT_SRQ_SIZE;
>  module_param(srpt_srq_size, int, 0444);
>  MODULE_PARM_DESC(srpt_srq_size,
>  		 "Shared receive queue (SRQ) size.");
>
> +static int srpt_sq_size = DEF_SRPT_SQ_SIZE;
> +module_param(srpt_sq_size, int, 0444);
> +MODULE_PARM_DESC(srpt_sq_size, "Per-channel send queue (SQ) size.");
> +

Thanks.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux