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)
Dec 20 2023, 7:33 AM
Unknown Object (File)
Dec 12 2023, 12:43 AM
Unknown Object (File)
Sep 22 2023, 10:44 PM
Unknown Object (File)
Aug 28 2023, 3:18 PM
Unknown Object (File)
Aug 2 2023, 4:56 PM
Unknown Object (File)
Aug 2 2023, 4:55 PM
Unknown Object (File)
Aug 2 2023, 4:54 PM
Unknown Object (File)
Aug 2 2023, 3:11 AM
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.