Changeset View
Changeset View
Standalone View
Standalone View
vm/vm_page.c
Context not available. | |||||
} | } | ||||
/* | /* | ||||
* vm_page_ps_is_valid: | * Returns true if all of the specified predicates are true for the entire | ||||
* | * (super)page and false otherwise. | ||||
* Returns TRUE if the entire (super)page is valid and FALSE otherwise. | |||||
*/ | */ | ||||
boolean_t | bool | ||||
vm_page_ps_is_valid(vm_page_t m) | vm_page_ps_test(vm_page_t m, int flags, vm_page_t skip_m) | ||||
{ | { | ||||
int i, npages; | int i, npages; | ||||
Context not available. | |||||
* occupy adjacent entries in vm_page_array[]. | * occupy adjacent entries in vm_page_array[]. | ||||
*/ | */ | ||||
for (i = 0; i < npages; i++) { | for (i = 0; i < npages; i++) { | ||||
if (m[i].valid != VM_PAGE_BITS_ALL) | if (&m[i] == skip_m) | ||||
return (FALSE); | continue; | ||||
if ((flags & PS_NONE_BUSY) != 0 && vm_page_busied(&m[i])) | |||||
return (false); | |||||
if ((flags & PS_ALL_DIRTY) != 0) { | |||||
/* | |||||
* Calling vm_page_test_dirty() or pmap_is_modified() | |||||
* might stop this case from spuriously returning | |||||
* "false". However, that would require a write lock | |||||
* on the object containing "m[i]". | |||||
*/ | |||||
if (m[i].dirty != VM_PAGE_BITS_ALL) | |||||
return (false); | |||||
} | |||||
if ((flags & PS_ALL_VALID) != 0 && | |||||
m[i].valid != VM_PAGE_BITS_ALL) | |||||
return (false); | |||||
} | } | ||||
return (TRUE); | return (true); | ||||
} | } | ||||
/* | /* | ||||
Context not available. |