Date: Tue, 03 Nov 2015 21:21:34 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 204121] numa(4) is broken Message-ID: <bug-204121-8-YkmCqVyLJ0@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-204121-8@https.bugs.freebsd.org/bugzilla/> References: <bug-204121-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204121 --- Comment #2 from Adrian Chadd <adrian@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-204121-8-YkmCqVyLJ0>