diff options
author | jhb <jhb@FreeBSD.org> | 2013-05-03 18:58:37 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2013-05-03 18:58:37 +0000 |
commit | 383aea5677ae9f4489314b23087ca08e6ab7b483 (patch) | |
tree | f09075bfa2ce6aafe7c3a4224e11e14d322ac0ff /lib/libc/stdlib/tsearch.c | |
parent | be8e188ab1a3122943edf546404c841afa811033 (diff) | |
download | FreeBSD-src-383aea5677ae9f4489314b23087ca08e6ab7b483.zip FreeBSD-src-383aea5677ae9f4489314b23087ca08e6ab7b483.tar.gz |
Fix two bugs in the current NUMA-aware allocation code:
- vm_phys_alloc_freelist_pages() can be called by vm_page_alloc_freelist()
to allocate a page from a specific freelist. In the NUMA case it did not
properly map the public VM_FREELIST_* constants to the correct backing
freelists, nor did it try all NUMA domains for allocations from
VM_FREELIST_DEFAULT.
- vm_phys_alloc_pages() did not pin the thread and each call to
vm_phys_alloc_freelist_pages() fetched the current domain to choose
which freelist to use. If a thread migrated domains during the loop
in vm_phys_alloc_pages() it could skip one of the freelists. If the
other freelists were out of memory then it is possible that
vm_phys_alloc_pages() would fail to allocate a page even though pages
were available resulting in a panic in vm_page_alloc().
Reviewed by: alc
MFC after: 1 week
Diffstat (limited to 'lib/libc/stdlib/tsearch.c')
0 files changed, 0 insertions, 0 deletions