lib/raid6: add option to skip algo benchmarking 20/250220/1
authorDaniel Verkamp <dverkamp@chromium.org>
Mon, 12 Nov 2018 23:26:52 +0000 (15:26 -0800)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 22 Dec 2020 07:29:52 +0000 (16:29 +0900)
commitc36dd28ce193905f18e2436cd8ecdd304a1c39c3
treee79dc3d5ec5d88775f2dfb9636c8977c06fdc232
parent382f7afd9e60a9be2b4aced1e23bbbaf6ab1ea97
lib/raid6: add option to skip algo benchmarking

This is helpful for systems where fast startup time is important.
It is especially nice to avoid benchmarking RAID functions that are
never used (for example, BTRFS selects RAID6_PQ even if the parity RAID
mode is not in use).

This saves 250+ milliseconds of boot time on modern x86 and ARM systems
with a dozen or more available implementations.

The new option is defaulted to 'y' to match the previous behavior of
always benchmarking on init.

Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Signed-off-by: Shaohua Li <shli@fb.com>
[sw0312.kim: cherry-pick mainline commit be85f93ae2df to skip unnecessary raid6 benchmark during booting]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I70256f5cbfb61c0033a16d2eb57e10e0dd1e6768
include/linux/raid/pq.h
lib/Kconfig
lib/raid6/algos.c