Whamcloud - gitweb
LU-9201 libcfs: reduce libcfs checksum speed test time 23/25923/2
authorAndreas Dilger <andreas.dilger@intel.com>
Thu, 9 Mar 2017 23:21:44 +0000 (16:21 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 16 Mar 2017 21:39:24 +0000 (21:39 +0000)
commitf470f3a166b3d471e2a3282864af35fa9d83c859
treefd9a4518e9c17a36f31099c75855bfbc71854b96
parentbc49f2b84d4403583b485ab9736cf6a9464977d4
LU-9201 libcfs: reduce libcfs checksum speed test time

Loading the libcfs module is getting increasingly slow due to
multiple checksum types being speed tested at startup (8 different
checksums * 1s per checksum).

Reduce the number of checksum algorithms checked at module load
time to the ones that are actually need the speed (i.e. the bulk
data checksums), and reduce the amount of time taken to compute the
checksum.  The other checksum types typically do not need the speed,
but rather are selected by the configuration.

Precompute the checksum speeds and supported types for the OST so
they are not recomputed for each new client that connects.

This reduces the module load time from 8.0s to 0.76s in my testing.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I4b4ea109633585f61201a661c54ce4229c3ebbe5
Reviewed-on: https://review.whamcloud.com/25923
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/libcfs_crypto.h
libcfs/libcfs/linux/linux-crypto-crc32pclmul.c
libcfs/libcfs/linux/linux-crypto.c
lustre/include/lustre/lustre_idl.h
lustre/include/obd_cksum.h
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_obd.c