SUNRPC: Allow /proc entries without CONFIG_SUNRPC_DEBUG
Subsystems (3)
cover SUNRPC: Allow /proc entries without CONFIG_SUNRPC_DEBUG
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.
Many thanks,
Thomas
Ben Dooks (1):
SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG
net/sunrpc/Kconfig | 7 +++++++ net/sunrpc/xprtsock.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/1 SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG
From: Ben Dooks <[email protected]>
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/proc/sys/sunrpc/tcp_fin_timeout
--- net/sunrpc/Kconfig | 7 +++++++ net/sunrpc/xprtsock.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-)
net/sunrpc/Kconfig +7 -0
@@ -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. + config SUNRPC_XPRT_RDMA tristate "RPC-over-RDMA transport" depends on SUNRPC && INFINIBAND && INFINIBAND_ADDR_TRANS
net/sunrpc/xprtsock.c +3 -3
@@ -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 ;
Signature · 1 line
2.11.0
Re: [PATCH 1/1] SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG
Hi Thomas,
Quoted 6 lines · Thomas Preston
From: Ben Dooks <[email protected]>
If we want
/proc/sys/sunrpcthe current kernel also drags in other debug features which we don't really want. Add the option for the entries by addingCONFIG_SUNRPC_DEBUG.
Quoted 6 lines
/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?
Quoted 14 lines
/proc/sys/sunrpc/tcp_fin_timeoutSigned-off-by Ben Dooks <[email protected]>Signed-off-by Thomas Preston <[email protected]>--- net/sunrpc/Kconfig | 7 +++++++ net/sunrpc/xprtsock.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-)net/sunrpc/Kconfig +0
-0
net/sunrpc/Kconfig config SUNRPC_DEBUG · line 56
Quoted 9 lines
net/sunrpc/Kconfig +6
-0@@ -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
Quoted 36 lines
net/sunrpc/Kconfig +1
-0+ config SUNRPC_XPRT_RDMA tristate "RPC-over-RDMA transport" depends on SUNRPC && INFINIBAND && INFINIBAND_ADDR_TRANSnet/sunrpc/xprtsock.c +1
-1@@ -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;net/sunrpc/xprtsock.c +2
-2@@ -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 ;