HomeFreeBSD

Make swapoff reliable.

Description

Make swapoff reliable.

The swap_pager_swapoff() function uses trylock for the object lock
before pagein, which means that either i/o to md(4) over swap, or
intensive page faults over swap pager objects might prevent swapoff()
from making any progress. Then the retry < 100 check fails and machine
panics.

If trylock fails, acquire the object lock in the blockable way and
restart the hash bucket walk. Keep retries logic for now.

Reported and tested by: pho
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D7688

Details

Provenance
kibAuthored on
Reviewer
alc
Differential Revision
D7688: Make swapoff reliable.
Parents
rS305128: Also handle instruction traps. We might hit these when the page we are
Branches
Unknown
Tags
Unknown