mirror of
https://github.com/opnsense/src.git
synced 2026-05-27 03:33:51 -04:00
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
|
||
|---|---|---|
| .. | ||
| acl | ||
| aio | ||
| audit | ||
| auditpipe | ||
| capsicum | ||
| cddl | ||
| common | ||
| devrandom | ||
| fifo | ||
| file | ||
| fs | ||
| geom | ||
| kern | ||
| kqueue | ||
| mac | ||
| mqueue | ||
| net | ||
| netgraph | ||
| netinet | ||
| netinet6 | ||
| netipsec | ||
| netmap | ||
| netpfil | ||
| opencrypto | ||
| pjdfstest | ||
| posixshm | ||
| sys | ||
| vfs | ||
| vm | ||
| vmm | ||
| Makefile | ||
| Makefile.depend | ||
| Makefile.inc | ||