knfsd: add RDMA debug class to rpc_debug bitfield
Subsystems (3)
RFC PATCH 9/15 knfsd: add RDMA debug class to rpc_debug bitfield
Add a bit to the rpc_debug bit field for RDMA transport debug messages and sysctl definitions for configuration and statistics files in /proc/sys/sunrpc/svc_rdma.
---
include/linux/sunrpc/debug.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
include/linux/sunrpc/debug.h +15 -0
@@ -24,6 +24,7 @@ #define RPCDBG_SVCSOCK 0x0100#define RPCDBG_SVCDSP 0x0200#define RPCDBG_MISC 0x0400#define RPCDBG_CACHE 0x0800 +#define RPCDBG_RDMA 0x1000#define RPCDBG_ALL 0x7fff#ifdef __KERNEL__
@@ -93,6 +94,20 @@ enum {CTL_RDMA_MAXINLINEWRITE ,CTL_RDMA_WRITEPADDING ,CTL_RDMA_MEMREG , +CTL_SVCRDMA , +CTL_RDMA_MAX_REQUESTS , +CTL_RDMA_MAX_REQ_SIZE , +CTL_RDMA_ORD , +CTL_RDMA_READ_THROTTLE , +CTL_RDMA_STAT_RECV , +CTL_RDMA_STAT_READ , +CTL_RDMA_STAT_WRITE , +CTL_RDMA_STAT_SQ_STARVE , +CTL_RDMA_STAT_RQ_STARVE , +CTL_RDMA_STAT_RQ_POLL , +CTL_RDMA_STAT_RQ_PROD , +CTL_RDMA_STAT_SQ_POLL , +CTL_RDMA_STAT_SQ_PROD };#endif /* _LINUX_SUNRPC_DEBUG_H_ */
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Hi Tom-
On the client side, I added a generic debug flag for transports, not a specific flag for sockets. Would you consider doing the same here?
Quoted 46 lines · Tom Tucker
Add a bit to the
rpc_debugbit field for RDMA transport debug messages and sysctl definitions for configuration and statistics files in/proc/sys/sunrpc/svc_rdma.Signed-off-by Tom Tucker <[email protected]>---
include/linux/sunrpc/debug.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)include/linux/sunrpc/debug.h +15
-1@@ -24,6 +24,7 @@ #define RPCDBG_SVCSOCK 0x0100#define RPCDBG_SVCDSP 0x0200#define RPCDBG_MISC 0x0400#define RPCDBG_CACHE 0x0800 +#define RPCDBG_RDMA 0x1000#define RPCDBG_ALL 0x7fff#ifdef __KERNEL__@@ -93,6 +94,20 @@ enum {CTL_RDMA_MAXINLINEWRITE ,CTL_RDMA_WRITEPADDING ,CTL_RDMA_MEMREG , +CTL_SVCRDMA , +CTL_RDMA_MAX_REQUESTS , +CTL_RDMA_MAX_REQ_SIZE , +CTL_RDMA_ORD , +CTL_RDMA_READ_THROTTLE , +CTL_RDMA_STAT_RECV , +CTL_RDMA_STAT_READ , +CTL_RDMA_STAT_WRITE , +CTL_RDMA_STAT_SQ_STARVE , +CTL_RDMA_STAT_RQ_STARVE , +CTL_RDMA_STAT_RQ_POLL , +CTL_RDMA_STAT_RQ_PROD , +CTL_RDMA_STAT_SQ_POLL , +CTL_RDMA_STAT_SQ_PROD };#endif /* _LINUX_SUNRPC_DEBUG_H_ */ -------------------------------------------------------------------------
Quoted 7 lines
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
url:http://oss.oracle.com/~cel/
version:2.1
end:vcard
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 4 lines · Chuck Lever
Hi Tom-
On the client side, I added a generic debug flag for transports, not a specific flag for sockets. Would you consider doing the same here?
Right. That's what I should do here too.
Thanks,
Quoted 47 lines
Quoted 45 lines · Tom Tucker
Add a bit to the
rpc_debugbit field for RDMA transport debug messages and sysctl definitions for configuration and statistics files in/proc/sys/sunrpc/svc_rdma.Signed-off-by Tom Tucker <[email protected]>---
include/linux/sunrpc/debug.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)include/linux/sunrpc/debug.h +15
-0@@ -24,6 +24,7 @@ #define RPCDBG_SVCSOCK 0x0100#define RPCDBG_SVCDSP 0x0200#define RPCDBG_MISC 0x0400#define RPCDBG_CACHE 0x0800 +#define RPCDBG_RDMA 0x1000#define RPCDBG_ALL 0x7fff#ifdef __KERNEL__@@ -93,6 +94,20 @@ enum {CTL_RDMA_MAXINLINEWRITE ,CTL_RDMA_WRITEPADDING ,CTL_RDMA_MEMREG , +CTL_SVCRDMA , +CTL_RDMA_MAX_REQUESTS , +CTL_RDMA_MAX_REQ_SIZE , +CTL_RDMA_ORD , +CTL_RDMA_READ_THROTTLE , +CTL_RDMA_STAT_RECV , +CTL_RDMA_STAT_READ , +CTL_RDMA_STAT_WRITE , +CTL_RDMA_STAT_SQ_STARVE , +CTL_RDMA_STAT_RQ_STARVE , +CTL_RDMA_STAT_RQ_POLL , +CTL_RDMA_STAT_RQ_PROD , +CTL_RDMA_STAT_SQ_POLL , +CTL_RDMA_STAT_SQ_PROD };#endif /* _LINUX_SUNRPC_DEBUG_H_ */
Quoted 9 lines
Quoted 8 lines
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 16 lines · Tom Tucker
Add a bit to the
rpc_debugbit field for RDMA transport debug messages and sysctl definitions for configuration and statistics files in/proc/sys/sunrpc/svc_rdma.Signed-off-by Tom Tucker <[email protected]>---
include/linux/sunrpc/debug.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)include/linux/sunrpc/debug.h +0
-0
include/linux/sunrpc/debug.h #define RPCDBG_SVCSOCK 0x0100 · line 28
Quoted 5 lines
include/linux/sunrpc/debug.h +1
-0@@ -24,6 +24,7 @@ #define RPCDBG_SVCSOCK 0x0100#define RPCDBG_SVCDSP 0x0200#define RPCDBG_MISC 0x0400#define RPCDBG_CACHE 0x0800 +#define RPCDBG_RDMA 0x1000#define RPCDBG_ALL 0x7fff
Fine. Did you update the rpc_debug program in nfs-utils, which also knows about these debug bits?
Quoted 12 lines
include/linux/sunrpc/debug.h +7
-0#ifdef __KERNEL__@@ -93,6 +94,20 @@ enum {CTL_RDMA_MAXINLINEWRITE ,CTL_RDMA_WRITEPADDING ,CTL_RDMA_MEMREG , +CTL_SVCRDMA , +CTL_RDMA_MAX_REQUESTS , +CTL_RDMA_MAX_REQ_SIZE , +CTL_RDMA_ORD , +CTL_RDMA_READ_THROTTLE , +CTL_RDMA_STAT_RECV , + CTL_RDMA_STAT_READ,
include/linux/sunrpc/debug.h enum { · line 113
Quoted 10 lines
include/linux/sunrpc/debug.h +7
-0+CTL_RDMA_STAT_WRITE , +CTL_RDMA_STAT_SQ_STARVE , +CTL_RDMA_STAT_RQ_STARVE , +CTL_RDMA_STAT_RQ_POLL , +CTL_RDMA_STAT_RQ_PROD , +CTL_RDMA_STAT_SQ_POLL , +CTL_RDMA_STAT_SQ_PROD };#endif /* _LINUX_SUNRPC_DEBUG_H_ */
This is fine, but one tiny nit: you have the makings of two patches here. This hunk belongs with the patch that uses the new defines and registers the sysctls.
Greg.
Signature · 12 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. Apparently, I'm Bedevere. Which MPHG character are you? I don't speak for SGI. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
BTW, Chuck Lever also pointed out that we should probably have a generic RPCDBG_XPRT debug flag instead of RPCDBG_RDMA. I think he's right. I think this should be part of the transport patchset that you're working on. Do you agree?
Tom
Quoted 47 lines · Greg Banks
Quoted 16 lines · Tom Tucker
Add a bit to the
rpc_debugbit field for RDMA transport debug messages and sysctl definitions for configuration and statistics files in/proc/sys/sunrpc/svc_rdma.Signed-off-by Tom Tucker <[email protected]>---
include/linux/sunrpc/debug.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)include/linux/sunrpc/debug.h +0
-0include/linux/sunrpc/debug.h #define RPCDBG_SVCSOCK 0x0100 · line 28
Quoted 5 lines
include/linux/sunrpc/debug.h +1
-0@@ -24,6 +24,7 @@ #define RPCDBG_SVCSOCK 0x0100#define RPCDBG_SVCDSP 0x0200#define RPCDBG_MISC 0x0400#define RPCDBG_CACHE 0x0800 +#define RPCDBG_RDMA 0x1000#define RPCDBG_ALL 0x7fffFine. Did you update the
rpc_debugprogram in nfs-utils, which also knows about these debug bits?Quoted 21 lines
include/linux/sunrpc/debug.h +14
-0#ifdef __KERNEL__@@ -93,6 +94,20 @@ enum {CTL_RDMA_MAXINLINEWRITE ,CTL_RDMA_WRITEPADDING ,CTL_RDMA_MEMREG , +CTL_SVCRDMA , +CTL_RDMA_MAX_REQUESTS , +CTL_RDMA_MAX_REQ_SIZE , +CTL_RDMA_ORD , +CTL_RDMA_READ_THROTTLE , +CTL_RDMA_STAT_RECV , +CTL_RDMA_STAT_READ , +CTL_RDMA_STAT_WRITE , +CTL_RDMA_STAT_SQ_STARVE , +CTL_RDMA_STAT_RQ_STARVE , +CTL_RDMA_STAT_RQ_POLL , +CTL_RDMA_STAT_RQ_PROD , +CTL_RDMA_STAT_SQ_POLL , +CTL_RDMA_STAT_SQ_PROD };
Quoted 7 lines
include/linux/sunrpc/debug.h enum { · line 113
Quoted 1 line
include/linux/sunrpc/debug.h +0
-0#endif /* _LINUX_SUNRPC_DEBUG_H_ */ This is fine, but one tiny nit: you have the makings of two patches here. This hunk belongs with the patch that uses the new defines and registers the sysctls.
Greg.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 3 lines · Tom Tucker
BTW, Chuck Lever also pointed out that we should probably have a generic
RPCDBG_XPRTdebug flag instead ofRPCDBG_RDMA.
So he did. Serves me right for not reading all my email before replying.
Quoted 3 lines
I think he's right. I think
this should be part of the transport patchset that you're working on. Do you agree?
I'm a little confused as to precisely what is suggested.
Currently we have an existing RPCDBG_SVCSOCK which enables dprintks in both the generic transport code and in the sockets-specific code too; this is hard to separate because all the code is intermingled in the one file svcsock.c.
If the suggestion is to have separate bits for the sockets-specific and the generic code, then the two painful alternatives seem to be
a) splitting the sockets and generic code into separate .c files, or
b) changing half the dprintk()s in svcsock.c to dfprintks().
I wasn't planning to do either of those anytime soon; either would be a significant change.
I think the ideal case would be a total of 3 debug bits: one for the generic transport code, one for the sockets transport-specific code and one for the RDMA transport-specific code. Getting there isn't easy.
However given that the new svc_rdma* code is large and in separate files, giving it it's own RPCDBG_RDMA bit, as you've already done, is easy and useful and a step in the right direction.
In any case I'm happy to do whatever is necessary in the transport patchset, but I'd appreciate Neil's guidance on which approach he'd prefer before I go in with the scalpel. Neil?
Greg.
Signature · 12 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. Apparently, I'm Bedevere. Which MPHG character are you? I don't speak for SGI. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 4 lines · On Monday May 21, [email protected] wrote:
In any case I'm happy to do whatever is necessary in the transport patchset, but I'd appreciate Neil's guidance on which approach he'd prefer before I go in with the scalpel. Neil?
I cannot immediately see the value in having different debug bits for the socket transport code and the RDMA transport code. The key question is "When would you want to see the debugging from one, but not from the other", and I cannot see when that would be. Almost certainly if you are testing one transport, you will not be using the other, so it will not contribute any noise.
So I suspect we should simply
#define RPCDBG_FACILITY RPCDBG_SVCSOCK
in any server-RDMA specific files, and see how we go. If we find we need another bit later, then we will know exactly why and be able to make an informed decisions based on that knowledge.
Ofcouse if client and server share much code, that could be awkward. Do they?
NeilBrown
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 11 lines · Neil Brown
Quoted 3 lines · On Monday May 21, [email protected] wrote:
In any case I'm happy to do whatever is necessary in the transport patchset, but I'd appreciate Neil's guidance on which approach he'd prefer before I go in with the scalpel. Neil?
I cannot immediately see the value in having different debug bits for the socket transport code and the RDMA transport code. The key question is "When would you want to see the debugging from one, but not from the other", and I cannot see when that would be. Almost certainly if you are testing one transport, you will not be using the other, so it will not contribute any noise.
That's how I did it in the client transport switch. One bit enables debug messages for all transports.
Quoted 2 lines
So I suspect we should simply
#defineRPCDBG_FACILITYRPCDBG_SVCSOCK
That's expedient, but I suggest you rename the flag to something less specific to sockets.
Quoted 1 line
in any server-RDMA specific files, and see how we go.
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
url:http://oss.oracle.com/~cel/
version:2.1
end:vcard
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 13 lines · Chuck Lever
Quoted 11 lines · Neil Brown
Quoted 3 lines · On Monday May 21, [email protected] wrote:
In any case I'm happy to do whatever is necessary in the transport patchset, but I'd appreciate Neil's guidance on which approach he'd prefer before I go in with the scalpel. Neil?
I cannot immediately see the value in having different debug bits for the socket transport code and the RDMA transport code. The key question is "When would you want to see the debugging from one, but not from the other", and I cannot see when that would be. Almost certainly if you are testing one transport, you will not be using the other, so it will not contribute any noise.
Quoted 8 lines
That's how I did it in the client transport switch. One bit enables debug messages for all transports.
Quoted 2 lines
So I suspect we should simply
#defineRPCDBG_FACILITYRPCDBG_SVCSOCKThat's expedient, but I suggest you rename the flag to something less specific to sockets.
Aah, I see now. That's very easy. How's this?
Rename RPCDBG_SVCSOCK to RPCDBG_SVCXPRT to reflect its new more generic nature.
---
include/linux/sunrpc/debug.h | 2 +- net/sunrpc/svcsock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/sunrpc/debug.h +1 -1
@@ -20,7 +20,7 @@#define RPCDBG_PMAP 0x0020#define RPCDBG_SCHED 0x0040#define RPCDBG_TRANS 0x0080 -#define RPCDBG_SVCSOCK 0x0100 +#define RPCDBG_SVCXPRT 0x0100#define RPCDBG_SVCDSP 0x0200#define RPCDBG_MISC 0x0400#define RPCDBG_CACHE 0x0800
net/sunrpc/svcsock.c +1 -1
@@ -73,7 +73,7 @@* */ -#define RPCDBG_FACILITY RPCDBG_SVCSOCK +#define RPCDBG_FACILITY RPCDBG_SVCXPRT static struct svc_sock *svc_setup_socket(struct svc_serv *, struct socket *,
Greg.
Signature · 12 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. Apparently, I'm Bedevere. Which MPHG character are you? I don't speak for SGI. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Yes, that's basically it.
Quoted 59 lines · Greg Banks
Quoted 11 lines · Chuck Lever
Quoted 10 lines · Neil Brown
Quoted 3 lines · On Monday May 21, [email protected] wrote:
In any case I'm happy to do whatever is necessary in the transport patchset, but I'd appreciate Neil's guidance on which approach he'd prefer before I go in with the scalpel. Neil?
I cannot immediately see the value in having different debug bits for the socket transport code and the RDMA transport code. The key question is "When would you want to see the debugging from one, but not from the other", and I cannot see when that would be. Almost certainly if you are testing one transport, you will not be using the other, so it will not contribute any noise.
Quoted 5 lines
That's how I did it in the client transport switch. One bit enables debug messages for all transports.
Quoted 2 lines
So I suspect we should simply
#defineRPCDBG_FACILITYRPCDBG_SVCSOCKThat's expedient, but I suggest you rename the flag to something less specific to sockets.
Aah, I see now. That's very easy. How's this?
Rename
RPCDBG_SVCSOCKtoRPCDBG_SVCXPRTto reflect its new more generic nature.Signed-off-by Greg Banks <[email protected]>---
include/linux/sunrpc/debug.h | 2 +- net/sunrpc/svcsock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Index:
linux/include/linux/sunrpc/debug.h
===================================================================include/linux/sunrpc/debug.h +1
-1@@ -20,7 +20,7 @@#define RPCDBG_PMAP 0x0020#define RPCDBG_SCHED 0x0040#define RPCDBG_TRANS 0x0080 -#define RPCDBG_SVCSOCK 0x0100 +#define RPCDBG_SVCXPRT 0x0100#define RPCDBG_SVCDSP 0x0200#define RPCDBG_MISC 0x0400#define RPCDBG_CACHE 0x0800Index:
linux/net/sunrpc/svcsock.c
===================================================================net/sunrpc/svcsock.c +1
-1@@ -73,7 +73,7 @@* */ -#define RPCDBG_FACILITY RPCDBG_SVCSOCK +#define RPCDBG_FACILITY RPCDBG_SVCXPRT static struct svc_sock *svc_setup_socket(struct svc_serv *, struct socket *,
Quoted 1 line
Greg.
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
url:http://oss.oracle.com/~cel/
version:2.1
end:vcard
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs