Date: Sat, 6 Nov 2004 07:17:50 +0000 (UTC) From: David Schultz <das@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/vm swap_pager.c Message-ID: <200411060717.iA67HoHA071579@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
das 2004-11-06 07:17:50 UTC
FreeBSD src repository
Modified files:
sys/vm swap_pager.c
Log:
Fix the last known race in swapoff(), which could lead to a spurious panic:
swapoff: failed to locate %d swap blocks
The race occurred because putpages() can block between the time it
allocates swap space and the time it updates the swap metadata to
associate that space with a vm_object, so swapoff() would complain
about the temporary inconsistency. I hoped to fix this by making
swp_pager_getswapspace() and swp_pager_meta_build() a single atomic
operation, but that proved to be inconvenient. With this change,
swapoff() simply doesn't attempt to be so clever about detecting when
all the pageout activity to the target device should have drained.
Revision Changes Path
1.264 +14 -21 src/sys/vm/swap_pager.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411060717.iA67HoHA071579>
