mirror_zfs/module
Richard Yao 59493b63c1
Micro-optimize fletcher4 calculations
When processing abds, we execute 1 `kfpu_begin()`/`kfpu_end()` pair on
every page in the abd. This is wasteful and slows down checksum
performance versus what the benchmark claimed. We correct this by moving
those calls to the init and fini functions.

Also, we always check the buffer length against 0 before calling the
non-scalar checksum functions. This means that we do not need to execute
the loop condition for the first loop iteration. That allows us to
micro-optimize the checksum calculations by switching to do-while loops.

Note that we do not apply that micro-optimization to the scalar
implementation because there is no check in
`fletcher_4_incremental_native()`/`fletcher_4_incremental_byteswap()`
against 0 sized buffers being passed.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14247
2022-12-05 11:00:34 -08:00
..
avl Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
icp Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00
lua Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00
nvpair Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
os FreeBSD: zfs_register_callbacks() must implement error check correctly 2022-12-05 10:16:50 -08:00
unicode Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zcommon Micro-optimize fletcher4 calculations 2022-12-05 11:00:34 -08:00
zfs zio can deadlock during device removal 2022-12-02 17:46:29 -08:00
zstd zstd: Refactor prefetching for the decoding loop 2022-11-29 10:05:30 -08:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00
Makefile.bsd Cleanup dead spa_boot code 2022-09-13 16:40:10 -07:00
Makefile.in autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00