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

Function vm_swapout_object_deactivate_page

freebsd/vm/vm_swapout.c:174–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172static void vm_thread_swapout(struct thread *td);
173
174static void
175vm_swapout_object_deactivate_page(pmap_t pmap, vm_page_t m, bool unmap)
176{
177
178 /*
179 * Ignore unreclaimable wired pages. Repeat the check after busying
180 * since a busy holder may wire the page.
181 */
182 if (vm_page_wired(m) || !vm_page_tryxbusy(m))
183 return;
184
185 if (vm_page_wired(m) || !pmap_page_exists_quick(pmap, m)) {
186 vm_page_xunbusy(m);
187 return;
188 }
189 if (!pmap_is_referenced(m)) {
190 if (!vm_page_active(m))
191 (void)vm_page_try_remove_all(m);
192 else if (unmap && vm_page_try_remove_all(m))
193 vm_page_deactivate(m);
194 }
195 vm_page_xunbusy(m);
196}
197
198/*
199 * vm_swapout_object_deactivate

Callers 1

Calls 7

vm_page_wiredFunction · 0.85
vm_page_tryxbusyFunction · 0.85
vm_page_activeFunction · 0.85
vm_page_try_remove_allFunction · 0.85
vm_page_deactivateFunction · 0.85
pmap_page_exists_quickFunction · 0.50
pmap_is_referencedFunction · 0.50

Tested by

no test coverage detected