Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/cxgbe/tom/t4_cpl_io.c
Show First 20 Lines • Show All 1,904 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
} | } | ||||
static void | static void | ||||
aiotx_free_pgs(struct mbuf *m) | aiotx_free_pgs(struct mbuf *m) | ||||
{ | { | ||||
struct mbuf_ext_pgs *ext_pgs; | struct mbuf_ext_pgs *ext_pgs; | ||||
struct kaiocb *job; | struct kaiocb *job; | ||||
struct mtx *mtx; | |||||
vm_page_t pg; | vm_page_t pg; | ||||
MBUF_EXT_PGS_ASSERT(m); | MBUF_EXT_PGS_ASSERT(m); | ||||
ext_pgs = m->m_ext.ext_pgs; | ext_pgs = m->m_ext.ext_pgs; | ||||
job = m->m_ext.ext_arg1; | job = m->m_ext.ext_arg1; | ||||
#ifdef VERBOSE_TRACES | #ifdef VERBOSE_TRACES | ||||
CTR3(KTR_CXGBE, "%s: completed %d bytes for tid %d", __func__, | CTR3(KTR_CXGBE, "%s: completed %d bytes for tid %d", __func__, | ||||
m->m_len, jobtotid(job)); | m->m_len, jobtotid(job)); | ||||
#endif | #endif | ||||
mtx = NULL; | |||||
for (int i = 0; i < ext_pgs->npgs; i++) { | for (int i = 0; i < ext_pgs->npgs; i++) { | ||||
pg = PHYS_TO_VM_PAGE(ext_pgs->pa[i]); | pg = PHYS_TO_VM_PAGE(ext_pgs->pa[i]); | ||||
vm_page_change_lock(pg, &mtx); | |||||
vm_page_unwire(pg, PQ_ACTIVE); | vm_page_unwire(pg, PQ_ACTIVE); | ||||
} | } | ||||
if (mtx != NULL) | |||||
mtx_unlock(mtx); | |||||
aiotx_free_job(job); | aiotx_free_job(job); | ||||
} | } | ||||
/* | /* | ||||
* Allocate a chain of unmapped mbufs describing the next 'len' bytes | * Allocate a chain of unmapped mbufs describing the next 'len' bytes | ||||
* of an AIO job. | * of an AIO job. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 358 Lines • Show Last 20 Lines |