Page MenuHomeFreeBSD

Allow swap_pager_putpages() to allocate one block at a time.
ClosedPublic

Authored by markj on Feb 19 2020, 8:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 15, 8:05 PM
Unknown Object (File)
Wed, Jan 14, 8:19 AM
Unknown Object (File)
Thu, Jan 8, 2:37 PM
Unknown Object (File)
Tue, Jan 6, 7:23 AM
Unknown Object (File)
Sun, Dec 28, 4:02 PM
Unknown Object (File)
Sat, Dec 27, 11:04 AM
Unknown Object (File)
Nov 27 2025, 8:46 AM
Unknown Object (File)
Nov 20 2025, 4:15 PM
Subscribers

Details

Summary

Alan points out that the minimum allocation size of 4 blocks is an old
policy that came with the "new" swap pager in r42957. Since then the
blist allocator has gotten better at minimizing fragmentation; for
example, with r349777 it can return a range that spans multiple leaves.
When swap space is close to being exhaused, the minimum of 4 blocks most
likely exacerbates things. Reduce it to 1.

Test Plan

Peter reported no problems.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj edited the test plan for this revision. (Show Details)
markj added reviewers: alc, dougm, kib, jeff.
This revision is now accepted and ready to land.Feb 20 2020, 1:39 PM

This change makes the second argument to swp_pager_getswapspace redundant. A future change might as well eliminate it.

This change makes the second argument to swp_pager_getswapspace redundant. A future change might as well eliminate it.

Indeed. I didn't bother since that change doesn't really simplify swp_pager_getswapspace() at all, but it seems reasonable to me.