* [PATCH v2 0/1] SUNRPC: Allow /proc entries without CONFIG_SUNRPC_DEBUG @ 2018-11-28 15:05 Thomas Preston 2018-11-28 15:05 ` [PATCH v2 1/1] SUNRPC: allow " Thomas Preston 0 siblings, 1 reply; 3+ messages in thread From: Thomas Preston @ 2018-11-28 15:05 UTC (permalink / raw) To: anna.schumaker, jlayton, bfields, linux-nfs; +Cc: linux-kernel, Thomas Preston Hello, We have a patch which adds sunrpc /proc entries without having to enable the full SUNRPC debug, which we found useful. Tested on NVIDIA Tegra30. Changes since v1: - Non-debug /proc/sys/sunrpc entries are always enabled. Ben Dooks (1): SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG net/sunrpc/xprtsock.c | 8 -------- 1 file changed, 8 deletions(-) -- 2.11.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/1] SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG 2018-11-28 15:05 [PATCH v2 0/1] SUNRPC: Allow /proc entries without CONFIG_SUNRPC_DEBUG Thomas Preston @ 2018-11-28 15:05 ` Thomas Preston 2018-11-28 21:38 ` Schumaker, Anna 0 siblings, 1 reply; 3+ messages in thread From: Thomas Preston @ 2018-11-28 15:05 UTC (permalink / raw) To: anna.schumaker, jlayton, bfields, linux-nfs Cc: linux-kernel, Ben Dooks, Thomas Preston 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. Instead, we should always show the following entries: /proc/sys/sunrpc/udp_slot_table_entries /proc/sys/sunrpc/tcp_slot_table_entries /proc/sys/sunrpc/tcp_max_slot_table_entries /proc/sys/sunrpc/min_resvport /proc/sys/sunrpc/max_resvport /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/xprtsock.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index ae77c71c1f64..c6c07fa410d1 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -68,8 +68,6 @@ 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) - #define XS_TCP_LINGER_TO (15U * HZ) static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO; @@ -159,8 +157,6 @@ static struct ctl_table sunrpc_table[] = { { }, }; -#endif - /* * Wait duration for a reply from the RPC portmapper. */ @@ -3114,10 +3110,8 @@ static struct xprt_class xs_bc_tcp_transport = { */ int init_socket_xprt(void) { -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) if (!sunrpc_table_header) sunrpc_table_header = register_sysctl_table(sunrpc_table); -#endif xprt_register_transport(&xs_local_transport); xprt_register_transport(&xs_udp_transport); @@ -3133,12 +3127,10 @@ int init_socket_xprt(void) */ void cleanup_socket_xprt(void) { -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) if (sunrpc_table_header) { unregister_sysctl_table(sunrpc_table_header); sunrpc_table_header = NULL; } -#endif xprt_unregister_transport(&xs_local_transport); xprt_unregister_transport(&xs_udp_transport); -- 2.11.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG 2018-11-28 15:05 ` [PATCH v2 1/1] SUNRPC: allow " Thomas Preston @ 2018-11-28 21:38 ` Schumaker, Anna 0 siblings, 0 replies; 3+ messages in thread From: Schumaker, Anna @ 2018-11-28 21:38 UTC (permalink / raw) To: bfields@fieldses.org, linux-nfs@vger.kernel.org, thomas.preston@codethink.co.uk, jlayton@kernel.org Cc: linux-kernel@lists.codethink.co.uk, ben.dooks@codethink.co.uk Hi Thomas, On Wed, 2018-11-28 at 15:05 +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. Instead, we should always show the > following entries: > > /proc/sys/sunrpc/udp_slot_table_entries > /proc/sys/sunrpc/tcp_slot_table_entries > /proc/sys/sunrpc/tcp_max_slot_table_entries > /proc/sys/sunrpc/min_resvport > /proc/sys/sunrpc/max_resvport > /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> Thanks, this looks great to me! Anna > --- > net/sunrpc/xprtsock.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c > index ae77c71c1f64..c6c07fa410d1 100644 > --- a/net/sunrpc/xprtsock.c > +++ b/net/sunrpc/xprtsock.c > @@ -68,8 +68,6 @@ 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) > - > #define XS_TCP_LINGER_TO (15U * HZ) > static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO; > > @@ -159,8 +157,6 @@ static struct ctl_table sunrpc_table[] = { > { }, > }; > > -#endif > - > /* > * Wait duration for a reply from the RPC portmapper. > */ > @@ -3114,10 +3110,8 @@ static struct xprt_class xs_bc_tcp_transport = { > */ > int init_socket_xprt(void) > { > -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) > if (!sunrpc_table_header) > sunrpc_table_header = register_sysctl_table(sunrpc_table); > -#endif > > xprt_register_transport(&xs_local_transport); > xprt_register_transport(&xs_udp_transport); > @@ -3133,12 +3127,10 @@ int init_socket_xprt(void) > */ > void cleanup_socket_xprt(void) > { > -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) > if (sunrpc_table_header) { > unregister_sysctl_table(sunrpc_table_header); > sunrpc_table_header = NULL; > } > -#endif > > xprt_unregister_transport(&xs_local_transport); > xprt_unregister_transport(&xs_udp_transport); ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-28 21:39 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-11-28 15:05 [PATCH v2 0/1] SUNRPC: Allow /proc entries without CONFIG_SUNRPC_DEBUG Thomas Preston 2018-11-28 15:05 ` [PATCH v2 1/1] SUNRPC: allow " Thomas Preston 2018-11-28 21:38 ` Schumaker, Anna
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox