Lines Matching refs: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);
1326 if (qp->r_rq.kwq) {
1330 struct rvt_krwq *kwq = NULL;
1332 spin_lock(&qp->r_rq.kwq->c_lock);
1339 kwq = qp->r_rq.kwq;
1340 head = kwq->head;
1341 tail = kwq->tail;
1357 kwq->tail = tail;
1358 spin_unlock(&qp->r_rq.kwq->c_lock);
1698 kvfree(qp->r_rq.kwq);
1785 struct rvt_krwq *wq = qp->r_rq.kwq;
1806 spin_lock_irqsave(&qp->r_rq.kwq->p_lock, flags);
1811 spin_unlock_irqrestore(&qp->r_rq.kwq->p_lock, flags);
1839 spin_unlock_irqrestore(&qp->r_rq.kwq->p_lock, flags);
2221 spin_lock_irqsave(&srq->rq.kwq->p_lock, flags);
2222 wq = srq->rq.kwq;
2227 spin_unlock_irqrestore(&srq->rq.kwq->p_lock, flags);
2242 spin_unlock_irqrestore(&srq->rq.kwq->p_lock, flags);
2328 head = rq->kwq->head;
2347 struct rvt_krwq *kwq = NULL;
2369 spin_lock_irqsave(&rq->kwq->c_lock, flags);
2374 kwq = rq->kwq;
2379 tail = kwq->tail;
2386 if (kwq->count < RVT_RWQ_COUNT_THRESHOLD) {
2388 kwq->count = rvt_get_rq_count(rq, head, tail);
2390 if (unlikely(kwq->count == 0)) {
2407 kwq->tail = tail;
2414 kwq->count--;
2422 if (kwq->count < srq->limit) {
2423 kwq->count =
2426 if (kwq->count < srq->limit) {
2430 spin_unlock_irqrestore(&rq->kwq->c_lock, flags);
2440 spin_unlock_irqrestore(&rq->kwq->c_lock, flags);