(I created this review mainly to facilitate discussion, I'm not
formally proposing it for inclusion yet. It's based on Jeff's numa
branch, not head/.)
This is another page allocation routine. It returns runs of pages
contiguous in the pindex space, with the intention of reducing the
frequency of lock acquisitions. When VM_ALLOC_{NOWAIT,WAITFAIL} are
specified, the returned run may be shorter than the one requested.
The new vm_phys_alloc_npages() is used to allocate pages from the
physical memory allocator when allocation from per-CPU caches or the
reservation system fail.
Some existing subroutines are changed. vm_reserv_reclaim_inactive() now
returns the number of pages freed by the break. vm_domain_available()
now returns the number of pages that may be allocated according to the
request type. vm_reserv_extend() and vm_reserv_alloc_page() now
optionally return a run of pages contiguous both in the pindex and the
physical address space.
vm_page_grab_pages() now uses vm_page_alloc_pages_after(), as do a
couple of routines which allocate readahead and readbehind pages before
performing a read from disk.
Some possible optimizations:
- Batched insertion of the run into the object radix tree.