• Home
  • Raw
  • Download

Lines Matching refs:npages

86 			       unsigned start, unsigned npages);
743 if (unlikely(queued < datalen && pageidx == iovec->npages && in user_sdma_txadd()
935 static u32 sdma_cache_evict(struct hfi1_user_sdma_pkt_q *pq, u32 npages) in sdma_cache_evict() argument
940 evict_data.target = npages; in sdma_cache_evict()
948 int npages) in pin_sdma_pages() argument
954 pages = kcalloc(npages, sizeof(*pages), GFP_KERNEL); in pin_sdma_pages()
957 memcpy(pages, node->pages, node->npages * sizeof(*pages)); in pin_sdma_pages()
959 npages -= node->npages; in pin_sdma_pages()
962 atomic_read(&pq->n_locked), npages)) { in pin_sdma_pages()
963 cleared = sdma_cache_evict(pq, npages); in pin_sdma_pages()
964 if (cleared >= npages) in pin_sdma_pages()
969 (node->npages * PAGE_SIZE)), npages, 0, in pin_sdma_pages()
970 pages + node->npages); in pin_sdma_pages()
975 if (pinned != npages) { in pin_sdma_pages()
976 unpin_vector_pages(pq->mm, pages, node->npages, pinned); in pin_sdma_pages()
988 if (node->npages) { in unpin_sdma_pages()
989 unpin_vector_pages(node->pq->mm, node->pages, 0, node->npages); in unpin_sdma_pages()
990 atomic_sub(node->npages, &node->pq->n_locked); in unpin_sdma_pages()
997 int ret = 0, pinned, npages; in pin_vector_pages() local
1014 iovec->npages = node->npages; in pin_vector_pages()
1031 npages = num_user_pages((unsigned long)iov->iov_base, iov->iov_len); in pin_vector_pages()
1032 if (node->npages < npages) { in pin_vector_pages()
1033 pinned = pin_sdma_pages(req, iovec, node, npages); in pin_vector_pages()
1038 node->npages += pinned; in pin_vector_pages()
1039 npages = node->npages; in pin_vector_pages()
1042 iovec->npages = npages; in pin_vector_pages()
1058 unsigned start, unsigned npages) in unpin_vector_pages() argument
1060 hfi1_release_user_pages(mm, pages + start, npages, false); in unpin_vector_pages()
1496 evict_data->cleared += node->npages; in sdma_rb_evict()