HomeFreeBSD

Avoid waiting on physical allocations that can't possibly be satisfied

Description

Avoid waiting on physical allocations that can't possibly be satisfied

  • Change vm_page_reclaim_contig[_domain] to return an errno instead of a boolean. 0 indicates a successful reclaim, ENOMEM indicates lack of available memory to reclaim, with any other error (currently only ERANGE) indicating that reclamation is impossible for the specified address range. Change all callers to only follow up with vm_page_wait* in the ENOMEM case.
  • Introduce vm_domainset_iter_ignore(), which marks the specified domain as unavailable for further use by the iterator. Use this function to ignore domains that can't possibly satisfy a physical allocation request. Since WAITOK allocations run the iterators repeatedly, this avoids the possibility of infinitely spinning in domain iteration if no available domain can satisfy the allocation request.

PR: 274252
Reported by: kevans
Tested by: kevans
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D42706

Details

Provenance
jahAuthored on Nov 20 2023, 11:23 PM
Reviewer
markj
Differential Revision
D42706: Avoid waiting on physical allocations that can't possibly be satisfied
Parents
rG1a3ee6002f3e: acpi_lid: Remove duplicate events
Branches
Unknown
Tags
Unknown