HomeFreeBSD

vm_page: Handle VM_ALLOC_NORECLAIM in the contiguous page allocator

Description

vm_page: Handle VM_ALLOC_NORECLAIM in the contiguous page allocator

We added _NORECLAIM to request that kmem_alloc_contig_pages() not spend
time scanning physical memory for candidates to reclaim. In some
situations the scanning can induce large amounts of undesirable latency,
and it's less important that the request be satisfied than it is that we
not spend many milliseconds scanning.

The problem extends to vm_reserv_reclaim_contig(), which unlike
vm_reserv_reclaim() may have to scan the entire list of partially
populated reservations. Use VM_ALLOC_NORECLAIM to request that this
scan not be executed.[1]

As a side effect, this fixes a regression in 02fb0585e7b3 ("vm_page:
Drop handling of VM_ALLOC_NOOBJ in vm_page_alloc_contig_domain()")
where VM_ALLOC_CONTIG was not included in VPAC_FLAGS or VPANC_FLAGS even
though it is not masked by kmem_alloc_contig_pages().[2]

Reported by: gallatin [1], glebius [2]
Reviewed by: alc, glebius, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32899

Details

Provenance
markjAuthored on Nov 11 2021, 7:26 PM
Reviewer
alc
Differential Revision
D32899: vm_page: Handle VM_ALLOC_NORECLAIM in the contiguous page allocator
Parents
rG4042b356a00e: bsdinstall: Fix mirror selection
Branches
Unknown
Tags
Unknown