Print this page
XXXX introduce drv_sectohz

*** 131,141 **** ASSERT(rds_dpool.pool_nbusy == 0); RDS_DPRINTF2("rds_free_recv_caches", "Data Pool has " "pending buffers: %d", rds_dpool.pool_nbusy); while (rds_dpool.pool_nbusy != 0) { mutex_exit(&rds_dpool.pool_lock); ! delay(drv_usectohz(1000000)); mutex_enter(&rds_dpool.pool_lock); } hcap = statep->rds_hcalistp; while (hcap != NULL) { --- 131,141 ---- ASSERT(rds_dpool.pool_nbusy == 0); RDS_DPRINTF2("rds_free_recv_caches", "Data Pool has " "pending buffers: %d", rds_dpool.pool_nbusy); while (rds_dpool.pool_nbusy != 0) { mutex_exit(&rds_dpool.pool_lock); ! delay(drv_sectohz(1)); mutex_enter(&rds_dpool.pool_lock); } hcap = statep->rds_hcalistp; while (hcap != NULL) {
*** 813,823 **** if (wait) { /* wait until the RQ is empty */ while (recvqp->qp_level != 0) { /* wait one second and try again */ mutex_exit(&recvqp->qp_lock); ! delay(drv_usectohz(1000000)); mutex_enter(&recvqp->qp_lock); } } else if (recvqp->qp_level != 0) { ret = B_FALSE; } --- 813,823 ---- if (wait) { /* wait until the RQ is empty */ while (recvqp->qp_level != 0) { /* wait one second and try again */ mutex_exit(&recvqp->qp_lock); ! delay(drv_sectohz(1)); mutex_enter(&recvqp->qp_lock); } } else if (recvqp->qp_level != 0) { ret = B_FALSE; }
*** 856,872 **** "Send Pool contains: %d", ep, spool->pool_nbusy); if (wait) { while (spool->pool_nbusy != 0) { if (rds_no_interrupts) { /* wait one second and try again */ ! delay(drv_usectohz(1000000)); rds_poll_send_completions(ep->ep_sendcq, ep, B_TRUE); } else { /* wait one second and try again */ mutex_exit(&spool->pool_lock); ! delay(drv_usectohz(1000000)); mutex_enter(&spool->pool_lock); } } if ((wait == 2) && (ep->ep_type == RDS_EP_TYPE_DATA)) { --- 856,872 ---- "Send Pool contains: %d", ep, spool->pool_nbusy); if (wait) { while (spool->pool_nbusy != 0) { if (rds_no_interrupts) { /* wait one second and try again */ ! delay(drv_sectohz(1)); rds_poll_send_completions(ep->ep_sendcq, ep, B_TRUE); } else { /* wait one second and try again */ mutex_exit(&spool->pool_lock); ! delay(drv_sectohz(1)); mutex_enter(&spool->pool_lock); } } if ((wait == 2) && (ep->ep_type == RDS_EP_TYPE_DATA)) {
*** 885,895 **** while (bp != ackbp) { RDS_DPRINTF2("rds_is_sendq_empty", "EP(%p) BP(0x%p/0x%p) last " "sent/acknowledged", ep, bp, ackbp); mutex_exit(&spool->pool_lock); ! delay(drv_usectohz(1000000)); mutex_enter(&spool->pool_lock); bp = spool->pool_tailp; ackbp = *(rds_buf_t **)ep->ep_ack_addr; if (ackbp == prev_ackbp) { --- 885,895 ---- while (bp != ackbp) { RDS_DPRINTF2("rds_is_sendq_empty", "EP(%p) BP(0x%p/0x%p) last " "sent/acknowledged", ep, bp, ackbp); mutex_exit(&spool->pool_lock); ! delay(drv_sectohz(1)); mutex_enter(&spool->pool_lock); bp = spool->pool_tailp; ackbp = *(rds_buf_t **)ep->ep_ack_addr; if (ackbp == prev_ackbp) {
*** 912,928 **** "Outstanding RDMA Acks: %d", ep, ep->ep_rdmacnt); if (wait) { while (ep->ep_rdmacnt != 0) { if (rds_no_interrupts) { /* wait one second and try again */ ! delay(drv_usectohz(1000000)); rds_poll_send_completions(ep->ep_sendcq, ep, B_FALSE); } else { /* wait one second and try again */ mutex_exit(&ep->ep_lock); ! delay(drv_usectohz(1000000)); mutex_enter(&ep->ep_lock); } } } else if (ep->ep_rdmacnt != 0) { ret1 = B_FALSE; --- 912,928 ---- "Outstanding RDMA Acks: %d", ep, ep->ep_rdmacnt); if (wait) { while (ep->ep_rdmacnt != 0) { if (rds_no_interrupts) { /* wait one second and try again */ ! delay(drv_sectohz(1)); rds_poll_send_completions(ep->ep_sendcq, ep, B_FALSE); } else { /* wait one second and try again */ mutex_exit(&ep->ep_lock); ! delay(drv_sectohz(1)); mutex_enter(&ep->ep_lock); } } } else if (ep->ep_rdmacnt != 0) { ret1 = B_FALSE;