Replace the swap extent(9) usage by a blist data structure.
authorsemarie <semarie@openbsd.org>
Fri, 29 Jul 2022 17:47:11 +0000 (17:47 +0000)
committersemarie <semarie@openbsd.org>
Fri, 29 Jul 2022 17:47:11 +0000 (17:47 +0000)
commit02de433d8c4801712cfa33b1092e7f2c411d534e
tree57269609abb54dd3b61179e8b87f987d2ac66f69
parentf942c791086abf2997c7e1a44c092ad6ca50947a
Replace the swap extent(9) usage by a blist data structure.

It makes uvm_swap_free() faster: extents have a cost of O(n*n) which doesn't
really scale with gigabytes of swap.

Based on initial work from mpi@
The blist implementation comes from DragonFlyBSD.

The diff adds also a ddb(4) 'show swap' command to show the blist and help
debugging, and fix some off-by-one in size printed during hibernate.

ok mpi@
19 files changed:
regress/sys/uvm/blist/Makefile [new file with mode: 0644]
regress/sys/uvm/blist/test-1.in [new file with mode: 0644]
regress/sys/uvm/blist/test-1.out [new file with mode: 0644]
regress/sys/uvm/blist/test-2.in [new file with mode: 0644]
regress/sys/uvm/blist/test-2.out [new file with mode: 0644]
regress/sys/uvm/blist/test-3.in [new file with mode: 0644]
regress/sys/uvm/blist/test-3.out [new file with mode: 0644]
regress/sys/uvm/blist/test-4.in [new file with mode: 0644]
regress/sys/uvm/blist/test-4.out [new file with mode: 0644]
regress/sys/uvm/blist/test-5.in [new file with mode: 0644]
regress/sys/uvm/blist/test-5.out [new file with mode: 0644]
share/man/man4/ddb.4
sys/conf/files
sys/ddb/db_command.c
sys/ddb/db_interface.h
sys/kern/subr_blist.c [new file with mode: 0644]
sys/kern/subr_hibernate.c
sys/sys/blist.h [new file with mode: 0644]
sys/uvm/uvm_swap.c