public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Schumaker, Anna" <Anna.Schumaker@netapp.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"thomas.preston@codethink.co.uk" <thomas.preston@codethink.co.uk>,
	"jlayton@kernel.org" <jlayton@kernel.org>
Cc: "ts001-upstream@lists.codethink.co.uk" 
	<ts001-upstream@lists.codethink.co.uk>,
	"ben.dooks@codethink.co.uk" <ben.dooks@codethink.co.uk>
Subject: Re: [PATCH 1/1] SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG
Date: Tue, 27 Nov 2018 21:29:06 +0000	[thread overview]
Message-ID: <599fef6feb5a87e5864f5cda35997d46fcfe7e10.camel@netapp.com> (raw)
In-Reply-To: <20181120175930.27853-2-thomas.preston@codethink.co.uk>

Hi Thomas,

On Tue, 2018-11-20 at 17:59 +0000, Thomas Preston wrote:
> From: Ben Dooks <ben.dooks@codethink.co.uk>
> 
> If we want /proc/sys/sunrpc the current kernel also drags
> in other debug features which we don't really want. Add the
> option for the entries by adding CONFIG_SUNRPC_DEBUG.
> 
> /proc/sys/sunrpc/max_resvport
> /proc/sys/sunrpc/min_resvport
> /proc/sys/sunrpc/nfsd_debug
> /proc/sys/sunrpc/nfs_debug
> /proc/sys/sunrpc/nlm_debug
> /proc/sys/sunrpc/rpc_debug

Can we hide the nfsd_debug, nfs_debug, nlm_debug, and rpc_debug entries under
CONFIG_SUNRPC_DEBUG, but still show everything else?

> /proc/sys/sunrpc/tcp_fin_timeout
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
> ---
>  net/sunrpc/Kconfig    | 7 +++++++
>  net/sunrpc/xprtsock.c | 6 +++---
>  2 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/net/sunrpc/Kconfig b/net/sunrpc/Kconfig
> index ac09ca803296..0e23a7a6cce8 100644
> --- a/net/sunrpc/Kconfig
> +++ b/net/sunrpc/Kconfig
> @@ -48,6 +48,13 @@ config SUNRPC_DEBUG
>  
>  	  If unsure, say Y.
>  
> +config SUNRPC_PROC
> +	bool "RPC: Enable /proc/sys/sunrpc entries"
> +	depends on SUNRPC && SYSCTL
> +	help
> +	  Enable /proc entires for tuning /proc/sys/sunrpc information
> +	  without enabling all the debug features for the SUNRPC system.

I don't think we need a new Kconfig option for this, do we?  Let's just show the
proc entries unconditionally.

Thanks,
Anna

> +
>  config SUNRPC_XPRT_RDMA
>  	tristate "RPC-over-RDMA transport"
>  	depends on SUNRPC && INFINIBAND && INFINIBAND_ADDR_TRANS
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
> index ae77c71c1f64..71b64402c070 100644
> --- a/net/sunrpc/xprtsock.c
> +++ b/net/sunrpc/xprtsock.c
> @@ -68,7 +68,7 @@ static unsigned int xprt_max_tcp_slot_table_entries =
> RPC_MAX_SLOT_TABLE;
>  static unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT;
>  static unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT;
>  
> -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
> +#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_SUNRPC_PROC)
>  
>  #define XS_TCP_LINGER_TO	(15U * HZ)
>  static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO;
> @@ -3114,7 +3114,7 @@ static struct xprt_class	xs_bc_tcp_transport = {
>   */
>  int init_socket_xprt(void)
>  {
> -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
> +#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_SUNRPC_PROC)
>  	if (!sunrpc_table_header)
>  		sunrpc_table_header = register_sysctl_table(sunrpc_table);
>  #endif
> @@ -3133,7 +3133,7 @@ int init_socket_xprt(void)
>   */
>  void cleanup_socket_xprt(void)
>  {
> -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
> +#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_SUNRPC_PROC)
>  	if (sunrpc_table_header) {
>  		unregister_sysctl_table(sunrpc_table_header);
>  		sunrpc_table_header = NULL;

      reply	other threads:[~2018-11-27 21:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 17:59 [PATCH 0/1] SUNRPC: Allow /proc entries without CONFIG_SUNRPC_DEBUG Thomas Preston
2018-11-20 17:59 ` [PATCH 1/1] SUNRPC: allow " Thomas Preston
2018-11-27 21:29   ` Schumaker, Anna [this message]

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=599fef6feb5a87e5864f5cda35997d46fcfe7e10.camel@netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=bfields@fieldses.org \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=thomas.preston@codethink.co.uk \
    --cc=ts001-upstream@lists.codethink.co.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox