Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_phys.c
Show First 20 Lines • Show All 643 Lines • ▼ Show 20 Lines | for (i = 0; i < vm_ndomains; i++) | ||||
DOMAINSET_SET(i, &all_domains); | DOMAINSET_SET(i, &all_domains); | ||||
#else | #else | ||||
(void)ndomains; | (void)ndomains; | ||||
(void)affinity; | (void)affinity; | ||||
(void)locality; | (void)locality; | ||||
#endif | #endif | ||||
} | } | ||||
int | |||||
_vm_phys_domain(vm_paddr_t pa) | |||||
{ | |||||
#ifdef NUMA | |||||
int i; | |||||
if (vm_ndomains == 1) | |||||
return (0); | |||||
for (i = 0; mem_affinity[i].end != 0; i++) | |||||
if (mem_affinity[i].start <= pa && | |||||
mem_affinity[i].end >= pa) | |||||
return (mem_affinity[i].domain); | |||||
return (-1); | |||||
#else | |||||
return (0); | |||||
#endif | |||||
} | |||||
/* | /* | ||||
* Split a contiguous, power of two-sized set of physical pages. | * Split a contiguous, power of two-sized set of physical pages. | ||||
* | * | ||||
* When this function is called by a page allocation function, the caller | * When this function is called by a page allocation function, the caller | ||||
* should request insertion at the head unless the order [order, oind) queues | * should request insertion at the head unless the order [order, oind) queues | ||||
* are known to be empty. The objective being to reduce the likelihood of | * are known to be empty. The objective being to reduce the likelihood of | ||||
* long-term fragmentation by promoting contemporaneous allocation and | * long-term fragmentation by promoting contemporaneous allocation and | ||||
* (hopefully) deallocation. | * (hopefully) deallocation. | ||||
▲ Show 20 Lines • Show All 1,110 Lines • Show Last 20 Lines |