Page MenuHomeFreeBSD

swap_pager: use pctrie_reclaim_callback in meta_free_all
ClosedPublic

Authored by dougm on Thu, Jun 13, 4:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 16, 4:46 AM
Unknown Object (File)
Sat, Jun 15, 5:19 PM
Unknown Object (File)
Thu, Jun 13, 7:00 PM
Subscribers

Details

Summary

Replace the lookup-remove loop in swp_pager_meta_free_all with a call to SWAP_PCTRIE_RECLAIM_CALLBACK, to eliminate repeated trie searches.

Test Plan

A kernel modified with this patch was flogged enough for it to do some actual swapping, with no obvious ill effects.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dougm requested review of this revision.Thu, Jun 13, 4:54 PM
dougm created this revision.

So, the previous pindex tracking was totally unnecessary, we always tear down the whole tree, correct? From what I can tell, it looks like swp_pager_meta_build maintains a SWAP_META_PAGES alignment invariant for the keys, so we should never have been hopping over another entry anyway.

This revision is now accepted and ready to land.Thu, Jun 13, 6:00 PM

So, the previous pindex tracking was totally unnecessary, we always tear down the whole tree, correct? From what I can tell, it looks like swp_pager_meta_build maintains a SWAP_META_PAGES alignment invariant for the keys, so we should never have been hopping over another entry anyway.

Yes, I think that's right.

This revision was automatically updated to reflect the committed changes.