]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vm_page: Add a new page allocator interface for unnamed pages
authorMark Johnston <markj@FreeBSD.org>
Wed, 20 Oct 2021 00:22:12 +0000 (20:22 -0400)
committerMark Johnston <markj@FreeBSD.org>
Wed, 20 Oct 2021 01:22:55 +0000 (21:22 -0400)
commitb498f71bc56af0069d9a4685b8385ee613a00727
tree2e9a5d4644fb861d2a2b9c9188c4d2ebdfe88c70
parenta23e6a1078d6d6c361481ab4f835449f177edac3
vm_page: Add a new page allocator interface for unnamed pages

The diff adds vm_page_alloc_noobj() and vm_page_alloc_noobj_domain().
These mostly correspond to vm_page_alloc() and vm_page_alloc_domain()
when no VM object is specified, with the exception that they handle
VM_ALLOC_ZERO by zeroing the page, rather than by preserving PG_ZERO.

This simplifies callers and will permit simplification of the
vm_page_alloc_domain() definition.

Since the new allocator variant is similar to vm_page_alloc_freelist(),
implement both of them using a common backend allocator function.  No
functional change intended.

Reviewed by: alc, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31985
sys/vm/vm_page.c
sys/vm/vm_page.h