All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Talpey <tom@talpey.com>
To: Chuck Lever <chuck.lever@oracle.com>,
	linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v1 2/8] svcrdma: Define maximum number of backchannel requests
Date: Mon, 23 Nov 2015 19:39:02 -0500	[thread overview]
Message-ID: <5653B1A6.3010707@talpey.com> (raw)
In-Reply-To: <20151123222030.13040.19373.stgit@klimt.1015granger.net>

On 11/23/2015 5:20 PM, Chuck Lever wrote:
> Extra resources for handling backchannel requests have to be
> pre-allocated when a transport instance is created. Set a limit.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>   include/linux/sunrpc/svc_rdma.h          |    5 +++++
>   net/sunrpc/xprtrdma/svc_rdma_transport.c |    6 +++++-
>   2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
> index f869807..478aa30 100644
> --- a/include/linux/sunrpc/svc_rdma.h
> +++ b/include/linux/sunrpc/svc_rdma.h
> @@ -178,6 +178,11 @@ struct svcxprt_rdma {
>   #define RPCRDMA_SQ_DEPTH_MULT   8
>   #define RPCRDMA_MAX_REQUESTS    32
>   #define RPCRDMA_MAX_REQ_SIZE    4096
> +#if defined(CONFIG_SUNRPC_BACKCHANNEL)

Why is this a config option? Why wouldn't you always want
this? It's needed for any post-1990 NFS dialect.

> +#define RPCRDMA_MAX_BC_REQUESTS	8

Why a constant 8? The forward channel value is apparently
configurable, just a few lines down.

> +#else
> +#define RPCRDMA_MAX_BC_REQUESTS	0
> +#endif
>
>   #define RPCSVC_MAXPAYLOAD_RDMA	RPCSVC_MAXPAYLOAD
>
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> index b348b4a..01c7b36 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -923,8 +923,10 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>   				  (size_t)RPCSVC_MAXPAGES);
>   	newxprt->sc_max_sge_rd = min_t(size_t, devattr.max_sge_rd,
>   				       RPCSVC_MAXPAGES);
> +	/* XXX: what if HCA can't support enough WRs for bc operation? */
>   	newxprt->sc_max_requests = min((size_t)devattr.max_qp_wr,
> -				   (size_t)svcrdma_max_requests);
> +				       (size_t)(svcrdma_max_requests +
> +				       RPCRDMA_MAX_BC_REQUESTS));
>   	newxprt->sc_sq_depth = RPCRDMA_SQ_DEPTH_MULT * newxprt->sc_max_requests;
>
>   	/*
> @@ -964,7 +966,9 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>   	qp_attr.event_handler = qp_event_handler;
>   	qp_attr.qp_context = &newxprt->sc_xprt;
>   	qp_attr.cap.max_send_wr = newxprt->sc_sq_depth;
> +	qp_attr.cap.max_send_wr += RPCRDMA_MAX_BC_REQUESTS;
>   	qp_attr.cap.max_recv_wr = newxprt->sc_max_requests;
> +	qp_attr.cap.max_recv_wr += RPCRDMA_MAX_BC_REQUESTS;
>   	qp_attr.cap.max_send_sge = newxprt->sc_max_sge;
>   	qp_attr.cap.max_recv_sge = newxprt->sc_max_sge;
>   	qp_attr.sq_sig_type = IB_SIGNAL_REQ_WR;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>

WARNING: multiple messages have this Message-ID (diff)
From: Tom Talpey <tom-CLs1Zie5N5HQT0dZR+AlfA@public.gmane.org>
To: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1 2/8] svcrdma: Define maximum number of backchannel requests
Date: Mon, 23 Nov 2015 19:39:02 -0500	[thread overview]
Message-ID: <5653B1A6.3010707@talpey.com> (raw)
In-Reply-To: <20151123222030.13040.19373.stgit-Hs+gFlyCn65vLzlybtyyYzGyq/o6K9yX@public.gmane.org>

On 11/23/2015 5:20 PM, Chuck Lever wrote:
> Extra resources for handling backchannel requests have to be
> pre-allocated when a transport instance is created. Set a limit.
>
> Signed-off-by: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>   include/linux/sunrpc/svc_rdma.h          |    5 +++++
>   net/sunrpc/xprtrdma/svc_rdma_transport.c |    6 +++++-
>   2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
> index f869807..478aa30 100644
> --- a/include/linux/sunrpc/svc_rdma.h
> +++ b/include/linux/sunrpc/svc_rdma.h
> @@ -178,6 +178,11 @@ struct svcxprt_rdma {
>   #define RPCRDMA_SQ_DEPTH_MULT   8
>   #define RPCRDMA_MAX_REQUESTS    32
>   #define RPCRDMA_MAX_REQ_SIZE    4096
> +#if defined(CONFIG_SUNRPC_BACKCHANNEL)

Why is this a config option? Why wouldn't you always want
this? It's needed for any post-1990 NFS dialect.

> +#define RPCRDMA_MAX_BC_REQUESTS	8

Why a constant 8? The forward channel value is apparently
configurable, just a few lines down.

> +#else
> +#define RPCRDMA_MAX_BC_REQUESTS	0
> +#endif
>
>   #define RPCSVC_MAXPAYLOAD_RDMA	RPCSVC_MAXPAYLOAD
>
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> index b348b4a..01c7b36 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -923,8 +923,10 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>   				  (size_t)RPCSVC_MAXPAGES);
>   	newxprt->sc_max_sge_rd = min_t(size_t, devattr.max_sge_rd,
>   				       RPCSVC_MAXPAGES);
> +	/* XXX: what if HCA can't support enough WRs for bc operation? */
>   	newxprt->sc_max_requests = min((size_t)devattr.max_qp_wr,
> -				   (size_t)svcrdma_max_requests);
> +				       (size_t)(svcrdma_max_requests +
> +				       RPCRDMA_MAX_BC_REQUESTS));
>   	newxprt->sc_sq_depth = RPCRDMA_SQ_DEPTH_MULT * newxprt->sc_max_requests;
>
>   	/*
> @@ -964,7 +966,9 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
>   	qp_attr.event_handler = qp_event_handler;
>   	qp_attr.qp_context = &newxprt->sc_xprt;
>   	qp_attr.cap.max_send_wr = newxprt->sc_sq_depth;
> +	qp_attr.cap.max_send_wr += RPCRDMA_MAX_BC_REQUESTS;
>   	qp_attr.cap.max_recv_wr = newxprt->sc_max_requests;
> +	qp_attr.cap.max_recv_wr += RPCRDMA_MAX_BC_REQUESTS;
>   	qp_attr.cap.max_send_sge = newxprt->sc_max_sge;
>   	qp_attr.cap.max_recv_sge = newxprt->sc_max_sge;
>   	qp_attr.sq_sig_type = IB_SIGNAL_REQ_WR;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
--
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

  reply	other threads:[~2015-11-24  0:46 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 22:20 [PATCH v1 0/8] NFS/RDMA server patches for 4.5 Chuck Lever
2015-11-23 22:20 ` Chuck Lever
2015-11-23 22:20 ` [PATCH v1 1/8] svcrdma: Do not send XDR roundup bytes for a write chunk Chuck Lever
2015-11-23 22:20   ` Chuck Lever
2015-11-23 22:20 ` [PATCH v1 2/8] svcrdma: Define maximum number of backchannel requests Chuck Lever
2015-11-23 22:20   ` Chuck Lever
2015-11-24  0:39   ` Tom Talpey [this message]
2015-11-24  0:39     ` Tom Talpey
2015-11-24  1:09     ` Chuck Lever
2015-11-24  1:09       ` Chuck Lever
2015-11-24  1:19       ` Tom Talpey
2015-11-24  1:19         ` Tom Talpey
2015-11-24  1:36         ` Trond Myklebust
2015-11-24  1:36           ` Trond Myklebust
2015-11-24  1:36         ` Chuck Lever
2015-11-24  1:36           ` Chuck Lever
2015-11-24  1:47           ` Tom Talpey
2015-11-24  1:47             ` Tom Talpey
2015-11-23 22:20 ` [PATCH v1 3/8] svcrdma: Add svc_rdma_get_context() API that is allowed to fail Chuck Lever
2015-11-23 22:20   ` Chuck Lever
2015-11-24  6:55   ` Christoph Hellwig
2015-11-24  6:55     ` Christoph Hellwig
2015-11-24 14:24     ` Chuck Lever
2015-11-24 14:24       ` Chuck Lever
2015-11-24 20:02       ` Christoph Hellwig
2015-11-24 20:02         ` Christoph Hellwig
2015-11-24 20:06         ` Chuck Lever
2015-11-24 20:06           ` Chuck Lever
2015-12-04 15:29     ` Chuck Lever
2015-12-04 15:29       ` Chuck Lever
2015-11-23 22:20 ` [PATCH v1 4/8] svcrdma: Add infrastructure to send backwards direction RPC/RDMA calls Chuck Lever
2015-11-23 22:20   ` Chuck Lever
2015-11-23 22:20 ` [PATCH v1 5/8] svcrdma: Add infrastructure to receive backwards direction RPC/RDMA replies Chuck Lever
2015-11-23 22:20   ` Chuck Lever
2015-11-24  0:44   ` Tom Talpey
2015-11-24  0:44     ` Tom Talpey
2015-11-24  1:47     ` Chuck Lever
2015-11-24  1:47       ` Chuck Lever
2015-11-24  2:02       ` Tom Talpey
2015-11-24  2:02         ` Tom Talpey
2015-11-23 22:21 ` [PATCH v1 6/8] xprtrdma: Add class for RDMA backwards direction transport Chuck Lever
2015-11-23 22:21   ` Chuck Lever
2015-11-24  0:49   ` Tom Talpey
2015-11-24  0:49     ` Tom Talpey
2015-11-23 22:21 ` [PATCH v1 7/8] svcrdma: No need to count WRs in svc_rdma_send() Chuck Lever
2015-11-23 22:21   ` Chuck Lever
2015-11-23 22:21 ` [PATCH v1 8/8] svcrdma: Remove svc_rdma_fastreg_mr::access_flags field Chuck Lever
2015-11-23 22:21   ` Chuck Lever
2015-11-24  0:52   ` Tom Talpey
2015-11-24  0:52     ` Tom Talpey
2015-11-24  0:53     ` Chuck Lever
2015-11-24  0:53       ` Chuck Lever
2015-11-24  6:39       ` Christoph Hellwig
2015-11-24  6:39         ` Christoph Hellwig
2015-11-24 14:08         ` Chuck Lever
2015-11-24 14:08           ` Chuck Lever
2015-11-24 16:03           ` Christoph Hellwig
2015-11-24 16:03             ` Christoph Hellwig
2015-11-24 16:04             ` Chuck Lever
2015-11-24 16:04               ` Chuck Lever

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=5653B1A6.3010707@talpey.com \
    --to=tom@talpey.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.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.