[Bug 204121] numa(4) is broken
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Nov 3 21:21:34 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204121
--- Comment #2 from Adrian Chadd <adrian at freebsd.org> ---
This is a long-standing VM issue that earlier first-touch page allocation (in
freebsd-8?) would also hit.
I had a local modification in my NUMA branch that handled the case of the page
allocation failing.
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 3b58fb7..9bd4adc 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1625,6 +1625,7 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int
req)
* vm_page_cache().
*/
mtx_lock_flags(&vm_page_queue_free_mtx, MTX_RECURSE);
+ m = NULL;
if (vm_cnt.v_free_count + vm_cnt.v_cache_count > vm_cnt.v_free_reserved
||
(req_class == VM_ALLOC_SYSTEM &&
vm_cnt.v_free_count + vm_cnt.v_cache_count >
vm_cnt.v_interrupt_free_min) ||
@@ -1669,7 +1670,19 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex,
int req)
}
#endif
}
- } else {
+ }
+
+ /*
+ * Can't allocate or attempted to and couldn't allocate a page
+ * given the current VM policy. Give up.
+ *
+ * Note - yes, this is one of the current shortcomings of the
+ * VM domain design - there's a global set of vm_cnt counters,
+ * and it's quite possible things will get unhappy with this.
+ * However without it'll kernel panic below - the code didn't
+ * check m == NULL here and would continue.
+ */
+ if (m == NULL) {
/*
* Not allocatable, give up.
*/
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list