]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: Add flow control in runtime debugging
authorWei Lin Guay <wei.lin.guay@oracle.com>
Fri, 4 Dec 2015 15:50:13 +0000 (16:50 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 17 Apr 2016 21:49:14 +0000 (14:49 -0700)
Add RDS_RTD_FLOW_CNTRL feature flag in
rds_rt_debug_bitmap.

Orabug: 22306628

Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
net/rds/ib_send.c
net/rds/rds_rt_debug.h

index 2e2820937f726dca97178f7c8350613f007c4372..a17d5ccacf7f3dacafc61802bbf3e306f2477f9f 100644 (file)
@@ -414,8 +414,9 @@ try_again:
        posted = IB_GET_POST_CREDITS(oldval);
        avail = IB_GET_SEND_CREDITS(oldval);
 
-       rdsdebug("rds_ib_send_grab_credits(%u): credits=%u posted=%u\n",
-                       wanted, avail, posted);
+       rds_rtd(RDS_RTD_FLOW_CNTRL,
+               "rds_ib_send_grab_credits(%u): credits=%u posted=%u\n",
+               wanted, avail, posted);
 
        /* The last credit must be used to send a credit update. */
        if (avail && !posted)
@@ -458,10 +459,12 @@ void rds_ib_send_add_credits(struct rds_connection *conn, unsigned int credits)
        if (credits == 0)
                return;
 
-       rdsdebug("rds_ib_send_add_credits(%u): current=%u%s\n",
-                       credits,
-                       IB_GET_SEND_CREDITS(atomic_read(&ic->i_credits)),
-                       test_bit(RDS_LL_SEND_FULL, &conn->c_flags) ? ", ll_send_full" : "");
+       rds_rtd(RDS_RTD_FLOW_CNTRL,
+               "rds_ib_send_add_credits(%u): current=%u%s\n",
+               credits,
+               IB_GET_SEND_CREDITS(atomic_read(&ic->i_credits)),
+               test_bit(RDS_LL_SEND_FULL, &conn->c_flags) ?
+               ", ll_send_full" : "");
 
        atomic_add(IB_SET_SEND_CREDITS(credits), &ic->i_credits);
        if (test_and_clear_bit(RDS_LL_SEND_FULL, &conn->c_flags))
@@ -493,6 +496,8 @@ void rds_ib_advertise_credits(struct rds_connection *conn, unsigned int posted)
         * credits and has to throttle.
         * For the time being, 16 seems to be a good compromise.
         */
+       rds_rtd(RDS_RTD_FLOW_CNTRL, "ic->i_credits %u\n",
+               IB_GET_POST_CREDITS(atomic_read(&ic->i_credits)));
        if (IB_GET_POST_CREDITS(atomic_read(&ic->i_credits)) >= 16)
                set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags);
 }
index 80afccd6bdd7cb7a11cb9b22a2c572d8c10f9477..a4b7ef0b300aabd8c9530d7a6ec0186080738484 100644 (file)
@@ -20,6 +20,7 @@ enum {
 
        RDS_RTD_SND                     = 1 << 14,      /* 0x4000 */
        RDS_RTD_SND_EXT                 = 1 << 15,      /* 0x8000 */
+       RDS_RTD_FLOW_CNTRL              = 1 << 16,      /* 0x10000 */
 
        /* bit 20 ~ 31 are module specific bits */
        RDS_RTD_CORE                    = 1 << 20,      /* 0x100000   */