opnsense-src/tests/sys/sys
Doug Moore b1290f4746 vm_reserv: use enhanced bitstring for popmaps
vm_reserv.c uses its own bitstring implemenation for popmaps. Using
the bitstring_t type from a standard header eliminates the code
duplication, allows some bit-at-a-time operations to be replaced with
more efficient bitstring range operations, and, in
vm_reserv_test_contig, allows bit_ffc_area_at to more efficiently
search for a big-enough set of consecutive zero-bits.

Make bitstring changes improve the vm_reserv code.  Define a bit_ntest
method to test whether a range of bits is all set, or all clear.
Define bit_ff_at and bit_ff_area_at to implement the ffs and ffc
versions with a parameter to choose between set- and clear- bits.
Improve the area_at implementation.  Modify the bit_nset and
bit_nclear implementations to allow code optimization in the cases
when start or end are multiples of _BITSTR_BITS.

Add a few new cases to bitstring_test.

Discussed with:	alc
Reviewed by:	markj
Tested by:	pho (earlier version)
Differential Revision:	https://reviews.freebsd.org/D33312

(cherry picked from commit 84e2ae64c5)
2022-07-11 00:54:06 -05:00
..
arb_test.c tests/sys/sys: Raise WARNS 2021-10-01 10:06:41 -04:00
bitset_test.c sys/bitset.h: reduce visibility of BIT_* macros 2022-01-14 18:17:30 +02:00
bitstring_test.c vm_reserv: use enhanced bitstring for popmaps 2022-07-11 00:54:06 -05:00
Makefile Fix overflow errors in sbttous and sbttoms 2022-05-23 13:11:27 -06:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
qmath_test.c Revert r357246 2020-01-29 22:37:01 +00:00
rb_test.c tests/sys/sys: Raise WARNS 2021-10-01 10:06:41 -04:00
splay_test.c tests/sys/sys: Raise WARNS 2021-10-01 10:06:41 -04:00
time_test.c Fix overflow errors in sbttous and sbttoms 2022-05-23 13:11:27 -06:00