Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_domainset.c
Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | vm_domainset_iter_page(struct vm_domainset_iter *di, struct vm_object *obj, | ||||
/* If we visited all domains and this was a NOWAIT we return error. */ | /* If we visited all domains and this was a NOWAIT we return error. */ | ||||
if ((di->di_flags & (VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL)) == 0) | if ((di->di_flags & (VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL)) == 0) | ||||
return (ENOMEM); | return (ENOMEM); | ||||
/* Wait for one of the domains to accumulate some free pages. */ | /* Wait for one of the domains to accumulate some free pages. */ | ||||
if (obj != NULL) | if (obj != NULL) | ||||
VM_OBJECT_WUNLOCK(obj); | VM_OBJECT_WUNLOCK(obj); | ||||
vm_wait_doms(&di->di_domain->ds_mask); | vm_wait_doms(&di->di_domain->ds_mask, 0); | ||||
if (obj != NULL) | if (obj != NULL) | ||||
VM_OBJECT_WLOCK(obj); | VM_OBJECT_WLOCK(obj); | ||||
if ((di->di_flags & VM_ALLOC_WAITFAIL) != 0) | if ((di->di_flags & VM_ALLOC_WAITFAIL) != 0) | ||||
return (ENOMEM); | return (ENOMEM); | ||||
/* Restart the search. */ | /* Restart the search. */ | ||||
vm_domainset_iter_first(di, domain); | vm_domainset_iter_first(di, domain); | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | if (di->di_minskip) { | ||||
return (0); | return (0); | ||||
} | } | ||||
/* If we visited all domains and this was a NOWAIT we return error. */ | /* If we visited all domains and this was a NOWAIT we return error. */ | ||||
if ((di->di_flags & M_WAITOK) == 0) | if ((di->di_flags & M_WAITOK) == 0) | ||||
return (ENOMEM); | return (ENOMEM); | ||||
/* Wait for one of the domains to accumulate some free pages. */ | /* Wait for one of the domains to accumulate some free pages. */ | ||||
vm_wait_doms(&di->di_domain->ds_mask); | vm_wait_doms(&di->di_domain->ds_mask, 0); | ||||
/* Restart the search. */ | /* Restart the search. */ | ||||
vm_domainset_iter_first(di, domain); | vm_domainset_iter_first(di, domain); | ||||
return (0); | return (0); | ||||
} | } | ||||
#else /* !NUMA */ | #else /* !NUMA */ | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |