-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a parameter to swp_pager_meta_build, for the benefit of swp_pager_meta_transfer. swp_pager_meta_transfer calls swp_pager_xfer_source, which may look up the same trie entry twice - first, by calling sw_pager_meta_lookup, and then as the first step in swp_pager_meta_build. A boolean parameter to swp_pager_meta_build tells that function not to replace a previously assigned swapblk with a new one, and setting it in this call makes the first meta_lookup call unnecessary. swp_pager_meta_transfer calls swp_pager_xfer_source, which may release and reacquire the source object write lock, because the call to swp_pager_meta_build may acquire and then release the destination object write block. But it probably doesn't, so fiddling with the source object write block was probably unnecessary. This boolean parameter to swp_pager_meta_build tells it to return immediately if memory allocation problems are about to require a lock release/reacquisitiion, so that the caller can release/reacquire the source object write lock only if truly necessary, around a second call the swp_pager_meta_build with that boolean parameter not set. This should make manipulation of the source object write lock rarer. Reviewed by: alc, kib (previous version) Tested by: pho Differential Revision: https://reviews.freebsd.org/D45781
- Loading branch information
Showing
1 changed file
with
58 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters