Page MenuHomeFreeBSD

[libkvm] kvm_geswapinfo() to stop subtracting vm.dmmax size from swap device sizes.
Needs ReviewPublic

Authored by ota_j.email.ne.jp on Jun 17 2019, 6:07 PM.

Details

Summary

PR 238670 - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238670

vm.dmmax size is nothing to do with each of swap device sizes.

Removal of vm.dmmax resulted stale static functions and thus removed together to avoid non-referenced static function call error from compiler.

Test Plan

Create 1 MB swapfile for mdconfig and swapon.

dd if=/dev/zero of=1MB bs=1M count=1

1+0 records in
1+0 records out
1048576 bytes transferred in 0.035823 secs (29271150 bytes/sec)

mdconfig -a -t vnode -f 1MB

md0

  1. swapon /dev/md0
  2. swapctl -l

Device: 1024-blocks Used:
/dev/ada0s1b 2097144 0
/dev/md0 1016 0

  1. mount -t tmpfs tmpfs /mnt/tmp
  2. dd if=/dev/zero of=/mnt/tmp/fill bs=1M count=2000

2000+0 records in
2000+0 records out
2097152000 bytes transferred in 36.267636 secs (57824337 bytes/sec)

swapctl -l

Device: 1024-blocks Used:
/dev/ada0s1b 2097144 144220
/dev/md0 1016 1016

systat -swap

Disk 1K-blocks Used /0% /10 /20 /30 /40 /50 /60 /70 /80 /90 /100
ada0s1b 2097016 144216 XXXX
md0 1016 1016 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XX

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 24901
Build 23631: arc lint + arc unit

Event Timeline

ota_j.email.ne.jp edited the summary of this revision. (Show Details)Jun 17 2019, 6:11 PM
ota_j.email.ne.jp edited the test plan for this revision. (Show Details)
ota_j.email.ne.jp added a reviewer: dougm.
ota_j.email.ne.jp edited the summary of this revision. (Show Details)
dougm added a reviewer: alc.Jun 17 2019, 8:50 PM
linimon resigned from this revision.Jun 27 2019, 1:36 AM

This is not an area I understand well.