HomeFreeBSD

Update the checks in vm_page_zone_import().

Description

Update the checks in vm_page_zone_import().

  • Remove the cnt == 1 check. UMA passes cnt == 1 when it has disabled per-CPU caching. In this case we might as well just allocate a single page and return it to the caller, since the caller is going to do exactly that anyway if the UMA cache allocation attempt fails.
  • Don't replenish caches if the domain is severely short on free pages. With large buckets we may otherwise quickly exacerbate a situation where the page daemon is failing to keep up.
  • Don't replenish caches if the calling thread belongs to the page daemon, which should avoid creating extra memory pressure when it is trying to free memory. Virtually all such allocations while occur in the context of laundering, where the laundry thread must allocate slabs for various swap and I/O-related UMA zones.

Reviewed by: kib
Discussed with: alc, jeff
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22394

Details

Provenance
markjAuthored on
Reviewer
kib
Differential Revision
D22394: Update the checks in vm_page_zone_import().
Parents
rS355002: Revise the page cache size policy.
Branches
Unknown
Tags
Unknown