RDS/IW+IB: Set the RDS_LL_SEND_FULL bit when we're throttled.
authorSteve Wise <swise@opengridcomputing.com>
Thu, 9 Apr 2009 14:09:38 +0000 (14:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Apr 2009 00:21:16 +0000 (17:21 -0700)
The RDS_LL_SEND_FULL bit should be set when we stop transmitted due to
flow control.  Otherwise the send worker will keep trying as opposed to
sleeping until we unthrottle.  Saves CPU.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib_send.c
net/rds/iw_send.c

index cb6c52cb1c4c1aa47a085e2d71bdf1b61cf2dfa7..fa684b7fc748092346810b45fa6056242c78e094 100644 (file)
@@ -506,7 +506,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
                        flow_controlled++;
                }
                if (work_alloc == 0) {
-                       rds_ib_ring_unalloc(&ic->i_send_ring, work_alloc);
+                       set_bit(RDS_LL_SEND_FULL, &conn->c_flags);
                        rds_ib_stats_inc(s_ib_tx_throttle);
                        ret = -ENOMEM;
                        goto out;
index 22dd38ffd6080843afd8ddc3987ff2a4490369eb..626290bc7e97aa729fd4f7d77eb439248436fe37 100644 (file)
@@ -549,7 +549,7 @@ int rds_iw_xmit(struct rds_connection *conn, struct rds_message *rm,
                        flow_controlled++;
                }
                if (work_alloc == 0) {
-                       rds_iw_ring_unalloc(&ic->i_send_ring, work_alloc);
+                       set_bit(RDS_LL_SEND_FULL, &conn->c_flags);
                        rds_iw_stats_inc(s_iw_tx_throttle);
                        ret = -ENOMEM;
                        goto out;