HomeFreeBSD

Fix locking in vm_reserv_reclaim_contig().

Description

Fix locking in vm_reserv_reclaim_contig().

We were not properly handling the case where the trylock of the
reservaton fails, in which case we could leak reservation lock.

Introduce a marker reservation to implement precise scanning in
vm_reserv_reclaim_contig(). Before, a race could result in early
termination of the scan in rare situations. Use the marker's lock to
serialize scans of the partpop queue so that a global marker structure
can be used. Modify vm_reserv_reclaim_inactive() to handle the presence
of a marker while minimizing the hold time of domain-global locks.

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

Details

Committed
markjFri, Nov 22, 4:28 PM
Reviewer
alc
Differential Revision
D22392: Fix locking in vm_reserv_reclaim_contig().
Parents
rS355000: Fix typos in the cpuset_{get,set}domain() man page.
Branches
Unknown
Tags
Unknown