Page MenuHomeFreeBSD

Check swblk size if a swap device has enoush space before calling blist_alloc
Needs ReviewPublic

Authored by ota_j.email.ne.jp on Jan 17 2020, 3:07 AM.

Details

Reviewers
dougm
kib
Summary

This reduces and short-cuts number of blist_alloc calls when
multiple swap devices are used especially sizes of them are different.

Test Plan

Have at least 2 deices with differnet sizes.

Then, trigger enough swapping ascivities like make builddworld -j 50 or
dd if=/dev/zero of=/mnt/swapfs/zero bs=1M count=large

We can use dtrace to find the call counts but buildkernel results look to depend on other factors...
i.e.
fbt::blist_alloc:entry{ @count["blist_alloc calls"] = count(); }

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 28715
Build 26730: arc lint + arc unit