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)
Jan 15 2025, 1:39 AM
Unknown Object (File)
Jan 13 2025, 3:41 PM
Unknown Object (File)
Dec 3 2024, 6:49 PM
Unknown Object (File)
Dec 3 2024, 6:49 PM
Unknown Object (File)
Dec 3 2024, 6:49 PM
Unknown Object (File)
Dec 3 2024, 6:29 PM
Unknown Object (File)
Oct 4 2024, 1:27 AM
Unknown Object (File)
Sep 23 2024, 7:41 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.