MCPcopy Create free account
hub / github.com/F-Stack/f-stack / default_phys_pager_getpages

Function default_phys_pager_getpages

freebsd/vm/phys_pager.c:175–197  ·  view source on GitHub ↗

* Fill as many pages as vm_fault has allocated for us. */

Source from the content-addressed store, hash-verified

173 * Fill as many pages as vm_fault has allocated for us.
174 */
175static int
176default_phys_pager_getpages(vm_object_t object, vm_page_t *m, int count,
177 int *rbehind, int *rahead)
178{
179 int i;
180
181 for (i = 0; i < count; i++) {
182 if (vm_page_none_valid(m[i])) {
183 if ((m[i]->flags & PG_ZERO) == 0)
184 pmap_zero_page(m[i]);
185 vm_page_valid(m[i]);
186 }
187 KASSERT(vm_page_all_valid(m[i]),
188 ("phys_pager_getpages: partially valid page %p", m[i]));
189 KASSERT(m[i]->dirty == 0,
190 ("phys_pager_getpages: dirty page %p", m[i]));
191 }
192 if (rbehind)
193 *rbehind = 0;
194 if (rahead)
195 *rahead = 0;
196 return (VM_PAGER_OK);
197}
198
199static int
200phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind,

Callers

nothing calls this directly

Calls 4

vm_page_none_validFunction · 0.85
vm_page_validFunction · 0.85
vm_page_all_validFunction · 0.85
pmap_zero_pageFunction · 0.50

Tested by

no test coverage detected