A loop in vm_reserv_extend_contig checks bits one-by-one to ensure that all are zero. This change makes the checking up to 64 bits at a time. Other loops populate the reservation one item at a time. This change allows populating a range of pages at once.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
$ cc -c -O0 -pipe -fno-strict-aliasing -g -nostdinc -I. -I../../.. -I../../../contrib/ck/include -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.vm_reserv.o -MTvm_reserv.o -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -Werror ../../../vm/vm_reserv.c ../../../vm/vm_reserv.c:181:34: error: & has lower precedence than ==; == will be evaluated first [-Werror,-Wparentheses] i < end / NBPOPMAP && mask & popmap[i] == 0; ^~~~~~~~~~~~~~~~ ../../../vm/vm_reserv.c:181:34: note: place parentheses around the '==' expression to silence this warning i < end / NBPOPMAP && mask & popmap[i] == 0; ^ ( ) ../../../vm/vm_reserv.c:181:34: note: place parentheses around the & expression to evaluate it first i < end / NBPOPMAP && mask & popmap[i] == 0; ^ ( ) ../../../vm/vm_reserv.c:188:15: error: & has lower precedence than ==; == will be evaluated first [-Werror,-Wparentheses] return (mask & popmap[i] == 0); ^~~~~~~~~~~~~~~~ ../../../vm/vm_reserv.c:188:15: note: place parentheses around the '==' expression to silence this warning return (mask & popmap[i] == 0); ^ ( ) ../../../vm/vm_reserv.c:188:15: note: place parentheses around the & expression to evaluate it first return (mask & popmap[i] == 0); ^ ( ) 2 errors generated. $
Comment Actions
With D20299.57518.diff I see
$ cc -c -O0 -pipe -fno-strict-aliasing -g -nostdinc -I. -I../../.. -I../../../contrib/ck/include -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.vm_reserv.o -MTvm_reserv.o -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -Werror ../../../vm/vm_reserv.c ../../../vm/vm_reserv.c:677:11: error: & has lower precedence than ==; == will be evaluated first [-Werror,-Wparentheses] (pa & (alignment - 1) == 0) && ^~~~~~~~~~~~~~~~~~~~~~ ../../../vm/vm_reserv.c:677:11: note: place parentheses around the '==' expression to silence this warning (pa & (alignment - 1) == 0) && ^ ( ) ../../../vm/vm_reserv.c:677:11: note: place parentheses around the & expression to evaluate it first (pa & (alignment - 1) == 0) && ^ ( ) 1 error generated. $