The buddy allocator currently uses the listq linkage in struct vm_page,
but we'd like to use plinks.q instead. However, pages are lazily
dequeued and we currently rely on vm_page_alloc* to call
vm_page_dequeue() to complete the removal.
Make dequeuing slightly less lazy without losing the benefits of
batching dequeues in the common case: ensure that freed pages are
dequeued before they are entered in the physical memory allocator. In
the common case, pages get freed to the per-CPU caches or to a
reservation, rather than directly to the buddy allocator, and those
mechanisms don't require overwriting plinks, so we still have some
opportunity to batch.
Add vm_page_dequeue() in the appropriate places, and remove some
existing calls in places where we know the page came from the buddy
allocator and thus isn't present on the page queues (note that
vm_page_alloc_check() verifies this). This requires a small
pessimization in vm_reserv_depopulate().