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
F166935562: D23763.id68715.diff
Mon, Aug 17, 9:11 PM
F166935490: D23763.id68559.diff
Mon, Aug 17, 9:10 PM
F166935423: D23763.diff
Mon, Aug 17, 9:09 PM
Unknown Object (File)
Thu, Aug 13, 6:00 PM
Unknown Object (File)
Wed, Aug 12, 2:45 PM
Unknown Object (File)
Tue, Aug 11, 3:45 PM
Unknown Object (File)
Mon, Aug 10, 6:28 PM
Unknown Object (File)
Sat, Aug 8, 10:11 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29502
Build 27372: arc lint + arc unit

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.