Changeset View
Changeset View
Standalone View
Standalone View
vm/vm_domainset.c
Context not available. | |||||
pindex += (((uintptr_t)obj) / sizeof(*obj)); | pindex += (((uintptr_t)obj) / sizeof(*obj)); | ||||
di->di_offset = pindex; | di->di_offset = pindex; | ||||
} | } | ||||
/* Skip zones below min on the first pass. */ | |||||
kib: zones or domains ? | |||||
di->di_minskip = true; | |||||
Not Done Inline ActionsShould this assignment be conditional on the VM_ALLOC_CLASS_MASK being VM_ALLOC_NORMAL? alc: Should this assignment be conditional on the VM_ALLOC_CLASS_MASK being VM_ALLOC_NORMAL? | |||||
Not Done Inline ActionsI think it should. markj: I think it should. | |||||
} | } | ||||
static void | static void | ||||
Context not available. | |||||
*req = (di->di_flags & ~(VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL)) | | *req = (di->di_flags & ~(VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL)) | | ||||
VM_ALLOC_NOWAIT; | VM_ALLOC_NOWAIT; | ||||
vm_domainset_iter_first(di, domain); | vm_domainset_iter_first(di, domain); | ||||
if (DOMAINSET_ISSET(*domain, &vm_min_domains)) | |||||
vm_domainset_iter_page(di, domain, req); | |||||
} | } | ||||
int | int | ||||
Context not available. | |||||
return (ENOMEM); | return (ENOMEM); | ||||
/* If there are more domains to visit we run the iterator. */ | /* If there are more domains to visit we run the iterator. */ | ||||
if (--di->di_n != 0) { | while (--di->di_n != 0) { | ||||
vm_domainset_iter_next(di, domain); | vm_domainset_iter_next(di, domain); | ||||
if (!di->di_minskip || | |||||
!DOMAINSET_ISSET(*domain, &vm_min_domains)) | |||||
return (0); | |||||
} | |||||
if (di->di_minskip) { | |||||
di->di_minskip = false; | |||||
vm_domainset_iter_first(di, domain); | |||||
return (0); | return (0); | ||||
} | } | ||||
Context not available. | |||||
di->di_flags = *flags; | di->di_flags = *flags; | ||||
*flags = (di->di_flags & ~M_WAITOK) | M_NOWAIT; | *flags = (di->di_flags & ~M_WAITOK) | M_NOWAIT; | ||||
vm_domainset_iter_first(di, domain); | vm_domainset_iter_first(di, domain); | ||||
if (DOMAINSET_ISSET(*domain, &vm_min_domains)) | |||||
vm_domainset_iter_malloc(di, domain, flags); | |||||
} | } | ||||
int | int | ||||
Context not available. | |||||
{ | { | ||||
/* If there are more domains to visit we run the iterator. */ | /* If there are more domains to visit we run the iterator. */ | ||||
if (--di->di_n != 0) { | while (--di->di_n != 0) { | ||||
vm_domainset_iter_next(di, domain); | vm_domainset_iter_next(di, domain); | ||||
if (!di->di_minskip || | |||||
!DOMAINSET_ISSET(*domain, &vm_min_domains)) | |||||
return (0); | |||||
} | |||||
/* If we skipped zones below min start the search from the beginning. */ | |||||
Not Done Inline Actionszones kib: zones | |||||
if (di->di_minskip) { | |||||
di->di_minskip = false; | |||||
vm_domainset_iter_first(di, domain); | |||||
return (0); | return (0); | ||||
} | } | ||||
Context not available. |
zones or domains ?