]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ib/rds: runtime debuggability enhancement
authorQing Huang <qing.huang@oracle.com>
Wed, 15 Jul 2015 01:36:43 +0000 (18:36 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 13 Oct 2015 15:43:25 +0000 (08:43 -0700)
commitdf7707e8c14e29a96e076fb08eabc7d9a9f39194
treeb2db98897a49dc41305f04156ca54707afc4d94c
parentd109c1c0637711d6a42ca90ba1fb2bce18b4fe71
ib/rds: runtime debuggability enhancement

This patch provides the ability to dynamically turn on or off various
types of debug/diag prints inside the RDS module.

The run-time debug prints are controlled by a rds module parameter,
rds_rt_debug_bitmap.

Here is the definition for different bits. We have implemented feature
related bits, such as Connection Management, Active Bonding, Error prints,
Send, Recv.

in net/rds/rds_rt_debug.h
...
enum {
        /* bit 0 ~ 19 are feature related bits */
        RDS_RTD_ERR                     = 1 << 0,       /* 0x1    */
        RDS_RTD_ERR_EXT                 = 1 << 1,       /* 0x2    */

        RDS_RTD_CM                      = 1 << 3,       /* 0x8    */
        RDS_RTD_CM_EXT                  = 1 << 4,       /* 0x10   */
        RDS_RTD_CM_EXT_P                = 1 << 5,       /* 0x20   */

        RDS_RTD_ACT_BND                 = 1 << 7,       /* 0x80   */
        RDS_RTD_ACT_BND_EXT             = 1 << 8,       /* 0x100  */

        RDS_RTD_RCV                     = 1 << 11,      /* 0x800  */
        RDS_RTD_RCV_EXT                 = 1 << 12,      /* 0x1000 */

        RDS_RTD_SND                     = 1 << 14,      /* 0x4000 */
        RDS_RTD_SND_EXT                 = 1 << 15,      /* 0x8000 */
...

In general, *EXTRA bits mean that you will get extra information but
possible flood prints as well. But every bit can be controlled by users
so users can decide how much information they want to see/collect. The
current embedded printk level used for this patch is KERN_INFO. Most
likely all the msgs will only go to /var/log/messages without showing up
on console if we use the default settings for /proc/sys/kernel/printk and
/etc/rsyslog.conf in ol6 environment.

E.g if we want to turn on RDS_RTD_ERR and RDS_RTD_CM bits. What we can
do is

echo 0x9 > /sys/module/rds/parameters/rds_rt_debug_bitmap

To turn on RDS_RTD_ERR(0x1), RDS_RTD_CM(0x8), and RDS_RTD_RCV(0x800) bits

echo 0x809 > /sys/module/rds/parameters/rds_rt_debug_bitmap

Performance penalty: with all the debug flag bits set to 0, there
should be no porformance impact in a kernel with this patch.

Orabug 21314268

Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Qing Huang <qing.huang@oracle.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
net/rds/Makefile
net/rds/connection.c
net/rds/ib.c
net/rds/ib_cm.c
net/rds/rdma_transport.c
net/rds/rds.h
net/rds/rds_rt_debug.c [new file with mode: 0644]
net/rds/rds_rt_debug.h [new file with mode: 0644]
net/rds/recv.c
net/rds/send.c
net/rds/threads.c