Lines Matching defs:kwq
790 /* need kwq with no buffers */
791 rq->kwq = kzalloc_node(sizeof(*rq->kwq), GFP_KERNEL, node);
792 if (!rq->kwq)
794 rq->kwq->curr_wq = rq->wq->wq;
796 /* need kwq with buffers */
797 rq->kwq =
799 if (!rq->kwq)
801 rq->kwq->curr_wq = rq->kwq->wq;
804 spin_lock_init(&rq->kwq->p_lock);
805 spin_lock_init(&rq->kwq->c_lock);
1325 if (qp->r_rq.kwq) {
1329 struct rvt_krwq *kwq = NULL;
1331 spin_lock(&qp->r_rq.kwq->c_lock);
1338 kwq = qp->r_rq.kwq;
1339 head = kwq->head;
1340 tail = kwq->tail;
1356 kwq->tail = tail;
1357 spin_unlock(&qp->r_rq.kwq->c_lock);
1697 kvfree(qp->r_rq.kwq);
1784 struct rvt_krwq *wq = qp->r_rq.kwq;
1805 spin_lock_irqsave(&qp->r_rq.kwq->p_lock, flags);
1810 spin_unlock_irqrestore(&qp->r_rq.kwq->p_lock, flags);
1838 spin_unlock_irqrestore(&qp->r_rq.kwq->p_lock, flags);
2220 spin_lock_irqsave(&srq->rq.kwq->p_lock, flags);
2221 wq = srq->rq.kwq;
2226 spin_unlock_irqrestore(&srq->rq.kwq->p_lock, flags);
2241 spin_unlock_irqrestore(&srq->rq.kwq->p_lock, flags);
2327 head = rq->kwq->head;
2346 struct rvt_krwq *kwq = NULL;
2368 spin_lock_irqsave(&rq->kwq->c_lock, flags);
2373 kwq = rq->kwq;
2378 tail = kwq->tail;
2385 if (kwq->count < RVT_RWQ_COUNT_THRESHOLD) {
2387 kwq->count = rvt_get_rq_count(rq, head, tail);
2389 if (unlikely(kwq->count == 0)) {
2406 kwq->tail = tail;
2413 kwq->count--;
2421 if (kwq->count < srq->limit) {
2422 kwq->count =
2425 if (kwq->count < srq->limit) {
2429 spin_unlock_irqrestore(&rq->kwq->c_lock, flags);
2439 spin_unlock_irqrestore(&rq->kwq->c_lock, flags);