Lines Matching defs:spool
398 rds_bufpool_t *spool;
404 spool = &ep->ep_sndpool;
406 ASSERT(spool->pool_memp == NULL);
418 spool->pool_nbuffers = MaxDataSendBuffers;
419 spool->pool_nbusy = 0;
420 spool->pool_nfree = MaxDataSendBuffers;
425 spool->pool_nbuffers = MaxCtrlSendBuffers;
426 spool->pool_nbusy = 0;
427 spool->pool_nfree = MaxCtrlSendBuffers;
431 nbuf = spool->pool_nbuffers;
494 spool->pool_memp = memp;
495 spool->pool_memsize = memsize;
496 spool->pool_bufmemp = bufmemp;
497 spool->pool_sqpoll_pending = B_FALSE;
522 spool->pool_headp = &bp[0];
523 spool->pool_tailp = &bp[nbuf - 1];
530 *(uintptr_t *)ep->ep_ack_addr = (uintptr_t)spool->pool_tailp;
546 spool->pool_headp = &bp[0];
547 spool->pool_tailp = &bp[nbuf - 1];
563 rds_bufpool_t *spool;
568 spool = &ep->ep_sndpool;
569 ASSERT(spool->pool_memp != NULL);
603 mem_attr.mr_vaddr = (ib_vaddr_t)(uintptr_t)spool->pool_memp;
604 mem_attr.mr_len = spool->pool_memsize;
644 bp = spool->pool_headp;
848 rds_bufpool_t *spool;
853 spool = &ep->ep_sndpool;
854 mutex_enter(&spool->pool_lock);
856 "Send Pool contains: %d", ep, spool->pool_nbusy);
858 while (spool->pool_nbusy != 0) {
866 mutex_exit(&spool->pool_lock);
868 mutex_enter(&spool->pool_lock);
880 bp = spool->pool_tailp;
889 mutex_exit(&spool->pool_lock);
891 mutex_enter(&spool->pool_lock);
893 bp = spool->pool_tailp;
904 } else if (spool->pool_nbusy != 0) {
907 mutex_exit(&spool->pool_lock);
940 rds_bufpool_t *spool;
948 spool = &ep->ep_sndpool;
949 mutex_enter(&spool->pool_lock);
952 if ((spool->pool_sqpoll_pending == B_FALSE) &&
953 (spool->pool_nbusy >
954 (spool->pool_nbuffers * rds_poll_percent_full)/100)) {
955 spool->pool_sqpoll_pending = B_TRUE;
956 mutex_exit(&spool->pool_lock);
958 mutex_enter(&spool->pool_lock);
959 spool->pool_sqpoll_pending = B_FALSE;
963 if (spool->pool_nfree < nbuf) {
965 spool->pool_cv_count += nbuf;
966 ret = cv_reltimedwait_sig(&spool->pool_cv, &spool->pool_lock,
968 /* ret = cv_wait_sig(&spool->pool_cv, &spool->pool_lock); */
971 spool->pool_cv_count -= nbuf;
972 mutex_exit(&spool->pool_lock);
976 spool->pool_cv_count -= nbuf;
980 if (spool->pool_nfree > nbuf) {
981 bp = spool->pool_headp;
999 mutex_exit(&spool->pool_lock);
1017 spool->pool_headp = bp1->buf_nextp;
1019 if (spool->pool_headp == NULL)
1020 spool->pool_tailp = NULL;
1021 spool->pool_nfree -= nbuf;
1022 spool->pool_nbusy += nbuf;
1024 mutex_exit(&spool->pool_lock);
1038 rds_bufpool_t *spool;
1057 spool = &ep->ep_sndpool;
1061 mutex_enter(&spool->pool_lock);
1064 if (spool->pool_nfree) {
1065 spool->pool_tailp->buf_nextp = headp;
1067 spool->pool_headp = headp;
1069 spool->pool_tailp = tailp;
1071 spool->pool_nfree += nbuf;
1072 spool->pool_nbusy -= nbuf;
1074 if ((spool->pool_cv_count > 0) &&
1075 (spool->pool_nfree > RDS_MIN_BUF_TO_WAKE_THREADS)) {
1076 if (spool->pool_nfree >= spool->pool_cv_count)
1077 cv_broadcast(&spool->pool_cv);
1079 cv_signal(&spool->pool_cv);
1083 mutex_exit(&spool->pool_lock);