HomeFreeBSD

Add a VM flag to prevent reclaim on a failed contig allocation

Description

Add a VM flag to prevent reclaim on a failed contig allocation

If a M_WAITOK contig alloc fails, the VM subsystem will try to
reclaim contiguous memory twice before actually failing the
request. On a system with 64GB of RAM I've observed this take
400-500ms before it finally gives up, and I believe that this
will only be worse on systems with even more memory.

In certain contexts this delay is extremely harmful, so add a flag
that will skip reclaim for allocation requests to allow those
paths to opt-out of doing an expensive reclaim.

Sponsored by: Dell Inc
Differential Revision: https://reviews.freebsd.org/D28422
Reviewed by: markj, kib

(cherry picked from commit 660344ca44c63bfe4a16c3e57d0f6dbcbb5e083e)

Details

Provenance
rstoneAuthored on Jan 29 2021, 9:13 PM
markjCommitted on Nov 3 2021, 5:35 PM
Reviewer
markj
Differential Revision
D28422: Add a VM flag to prevent reclaim on a failed contig allocation
Parents
rG009b4d719039: vlapic: Schedule callouts on the local CPU
Branches
Unknown
Tags
Unknown