Page MenuHomeFreeBSD

Skip SWAPBLK_NONEs with swap_pager_find_least() in swap_pager_copy().
AbandonedPublic

Authored by ota_j.email.ne.jp on Nov 6 2019, 5:36 AM.
Tags
None
Referenced Files
F153199116: D22256.id64099.diff
Sun, Apr 19, 6:27 PM
F153199049: D22256.id64099.diff
Sun, Apr 19, 6:27 PM
F153190011: D22256.id63991.diff
Sun, Apr 19, 5:09 PM
Unknown Object (File)
Thu, Apr 16, 9:11 AM
Unknown Object (File)
Mon, Apr 13, 3:33 AM
Unknown Object (File)
Sat, Apr 11, 5:43 PM
Unknown Object (File)
Sun, Apr 5, 6:25 AM
Unknown Object (File)
Sat, Apr 4, 1:23 AM
Subscribers

Details

Reviewers
kib
dougm
alc
Summary

About 85% to 90% of them are SWAPBLK_NONE based on my experiments.
This will improve searching swblks by a factor of 2.5 to 10 by skipping
despite the cost of double lookups for non-SWAPBLK_NONE ones.

Test Plan

Regression after tapping into swap space.
I use 'make buildworld -j <high#>' to case page in/out.
I have test/experimental code with rate printf.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27416
Build 25660: arc lint + arc unit

Event Timeline

Created swp_pager_meta_find_least private API to find and delete in a single
operation. swap_pager_find_least calls it for look up.

With this approach, we don't have any penalty for worst cases unlike the
first revision while expected performance gain doubled - 5 ~ 20 times faster
lookups.

Fixed spaces/style.

I need to test this 2nd version, more.

Correct swblk index and exclude swp_pager_swblk_free_empty() changes.