HomeFreeBSD

Do not let vm_daemon run unbounded.

Description

Do not let vm_daemon run unbounded.

On a load where single anonymous object consumes almost all memory on
the large system, swapout code executes the iteration over the
corresponding object page queue for long time, owning the map and
object locks. This blocks pagedaemon which tries to lock the object,
and blocks other threads in the process in vm_fault() waiting for the
map lock.

Handle the issue by terminating the deactivation loop if we executed
too long and by yielding at the top level in vm_daemon.

Reported by: peterj, pho
Reviewed by: alc
Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D13671

Details

Provenance
kibAuthored on
Reviewer
alc
Differential Revision
D13671: Collection of fixes for OOM handling of some corner cases.
Parents
rS327467: Be less verbose and more precise.
Branches
Unknown
Tags
Unknown