Lines Matching +full:scatter +full:- +full:gather

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
33 * a scatter/gather list of physical address ranges.
86 * The scatter/gather list must only include page-aligned in sg_pager_alloc()
91 for (i = 0; i < sg->sg_nseg; i++) { in sg_pager_alloc()
92 if ((sg->sg_segs[i].ss_paddr % PAGE_SIZE) != 0 || in sg_pager_alloc()
93 (sg->sg_segs[i].ss_len % PAGE_SIZE) != 0) in sg_pager_alloc()
95 npages += sg->sg_segs[i].ss_len / PAGE_SIZE; in sg_pager_alloc()
99 * The scatter/gather list has a fixed size. Refuse requests in sg_pager_alloc()
110 * scatter/gather list. It is ok for our purposes to have in sg_pager_alloc()
111 * multiple VM objects associated with the same scatter/gather in sg_pager_alloc()
112 * list because scatter/gather lists are static. This is also in sg_pager_alloc()
113 * simpler than ensuring a unique object per scatter/gather in sg_pager_alloc()
117 object->handle = sglist_hold(sg); in sg_pager_alloc()
118 TAILQ_INIT(&object->un_pager.sgp.sgp_pglist); in sg_pager_alloc()
131 while ((m = TAILQ_FIRST(&object->un_pager.sgp.sgp_pglist)) != 0) { in sg_pager_dealloc()
134 TAILQ_REMOVE(&object->un_pager.sgp.sgp_pglist, m, plinks.q); in sg_pager_dealloc()
138 sg = object->handle; in sg_pager_dealloc()
140 object->handle = NULL; in sg_pager_dealloc()
141 object->type = OBJT_DEAD; in sg_pager_dealloc()
159 sg = object->handle; in sg_pager_getpages()
160 memattr = object->memattr; in sg_pager_getpages()
161 offset = m[0]->pindex; in sg_pager_getpages()
166 * page is found since '0' can be a valid page-aligned physical in sg_pager_getpages()
171 for (i = 0; i < sg->sg_nseg; i++) { in sg_pager_getpages()
172 if (space + sg->sg_segs[i].ss_len <= (offset * PAGE_SIZE)) { in sg_pager_getpages()
173 space += sg->sg_segs[i].ss_len; in sg_pager_getpages()
176 paddr = sg->sg_segs[i].ss_paddr + offset * PAGE_SIZE - space; in sg_pager_getpages()
190 KASSERT(!(m[0]->flags & PG_FICTITIOUS), in sg_pager_getpages()
196 TAILQ_INSERT_TAIL(&object->un_pager.sgp.sgp_pglist, page, plinks.q); in sg_pager_getpages()