6d3c78d9 markj Oct. 20, 2021, 1:22 a.m.
Document the new allocator variants and flesh out the description of
some details of the page allocator interface.

Reviewed by:	kib, alc
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32035
cgit
02fb0585 markj Oct. 20, 2021, 1:22 a.m.
As in vm_page_alloc_domain_after(), unconditionally preserve PG_ZERO.

Implement vm_page_alloc_noobj_contig_domain().

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32034
cgit
c40cf9bc markj Oct. 20, 2021, 1:22 a.m.
This makes the allocator simpler since it can assume object != NULL.
Also modify the function to unconditionally preserve PG_ZERO, so
VM_ALLOC_ZERO is effectively ignored (and still must be implemented by
the caller for now).

Reviewed by:	alc, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32033
cgit
84c39222 markj Oct. 20, 2021, 1:22 a.m.
Remove now-unneeded page zeroing.  No functional change intended.

Reviewed by:	alc, hselasky, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32006
cgit
92db9f3b markj Oct. 20, 2021, 1:22 a.m.
This is the same as vm_page_alloc_noobj(), but allocates physically
contiguous runs of memory.  For now it is implemented in terms of
vm_page_alloc_contig(), with the difference that
vm_page_alloc_noobj_contig() implements VM_ALLOC_ZERO by zeroing the
page.

Reviewed by:	alc, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32005
cgit
a4667e09 markj Oct. 20, 2021, 1:22 a.m.
Remove page zeroing code from consumers and stop specifying
VM_ALLOC_NOOBJ.  In a few places, also convert an allocation loop to
simply use VM_ALLOC_WAITOK.

Similarly, convert vm_page_alloc_domain() callers.

Note that callers are now responsible for assigning the pindex.

Reviewed by:	alc, hselasky, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31986
cgit
b498f71b markj Oct. 20, 2021, 1:22 a.m.
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
cgit
a23e6a10 markj Oct. 20, 2021, 1:22 a.m.
This way all of the vm_page_alloc_*() allocator functions are grouped
together.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
cgit
1c99af1e emaste Oct. 20, 2021, 12:10 a.m.
SRCS entries are kept in the same order and with the same line breaks
as upstream, to make comparison easier.

Reported by:	des
cgit
c7f38a2d kib Oct. 19, 2021, 9:25 p.m.
Using SA_*LOCKED constants breaks !INVARIANT builds

Reported by:	cy
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
cgit
49db81aa kib Oct. 19, 2021, 8:04 p.m.
When iterating over the process group members, skip zombies same as it
is done by pfind() for single-process operation.

Reviewed by:	emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32513
cgit
3692877a kib Oct. 19, 2021, 8:04 p.m.
Suggested by:	markj
Reviewed by:	emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32513
cgit
f5bb6e5a kib Oct. 19, 2021, 8:04 p.m.
for state control over TRACE, TRAPCAP, ASLR, PROTMAX, STACKGAP,
NO_NEWPRIVS, and WXMAP.

Reported by:	emaste
Reviewed by:	emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32513
cgit
1c4dbee5 kib Oct. 19, 2021, 8:04 p.m.
Reviewed by:	emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32513
cgit
32026f59 kib Oct. 19, 2021, 8:04 p.m.
and remove zeroing of it from specific functions.  This way it is
guaranteed that we do not leak kernel data.

Suggested by:	markj
Reviewed by:	emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32513
cgit