Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_page.c
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | |||||
vm_page_t vm_page_array; | vm_page_t vm_page_array; | ||||
long vm_page_array_size; | long vm_page_array_size; | ||||
long first_page; | long first_page; | ||||
static TAILQ_HEAD(, vm_page) excludelist_head; | static TAILQ_HEAD(, vm_page) excludelist_head; | ||||
static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); | static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); | ||||
SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD | | SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD | | ||||
CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", | CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", | ||||
"Blacklist pages"); | "Explicitly exclude pages"); | ||||
static uma_zone_t fakepg_zone; | static uma_zone_t fakepg_zone; | ||||
static void vm_page_alloc_check(vm_page_t m); | static void vm_page_alloc_check(vm_page_t m); | ||||
static bool _vm_page_busy_sleep(vm_object_t obj, vm_page_t m, | static bool _vm_page_busy_sleep(vm_object_t obj, vm_page_t m, | ||||
vm_pindex_t pindex, const char *wmesg, int allocflags, bool locked); | vm_pindex_t pindex, const char *wmesg, int allocflags, bool locked); | ||||
static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); | static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); | ||||
static void vm_page_enqueue(vm_page_t m, uint8_t queue); | static void vm_page_enqueue(vm_page_t m, uint8_t queue); | ||||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | vm_page_excludelist_next(char **list, char *end) | ||||
if (end == NULL) | if (end == NULL) | ||||
end = *list + strlen(*list); | end = *list + strlen(*list); | ||||
/* Ensure that strtoq() won't walk off the end */ | /* Ensure that strtoq() won't walk off the end */ | ||||
if (*end != '\0') { | if (*end != '\0') { | ||||
if (*end == '\n' || *end == ' ' || *end == ',') | if (*end == '\n' || *end == ' ' || *end == ',') | ||||
*end = '\0'; | *end = '\0'; | ||||
else { | else { | ||||
printf("Blacklist not terminated, skipping\n"); | printf("Excludelist not terminated, skipping\n"); | ||||
*list = NULL; | *list = NULL; | ||||
return (0); | return (0); | ||||
} | } | ||||
} | } | ||||
for (pos = *list; *pos != '\0'; pos = cp) { | for (pos = *list; *pos != '\0'; pos = cp) { | ||||
bad = strtoq(pos, &cp, 0); | bad = strtoq(pos, &cp, 0); | ||||
if (*cp == '\0' || *cp == ' ' || *cp == ',' || *cp == '\n') { | if (*cp == '\0' || *cp == ' ' || *cp == ',' || *cp == '\n') { | ||||
▲ Show 20 Lines • Show All 5,166 Lines • Show Last 20 Lines |