lib/raid6: add option to skip algo benchmarking 96/222796/2
authorDaniel Verkamp <dverkamp@chromium.org>
Mon, 12 Nov 2018 23:26:52 +0000 (15:26 -0800)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Mon, 20 Jan 2020 07:50:18 +0000 (16:50 +0900)
commit94ea1fa79dc8a315cd5233689105492214260919
treef7ad893c433b937182d6c71578ab9d4da885da63
parent7e22b943f2998868d089a5f2a37044b8755caead
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>
[jhoon20.kim: backport from mainline for the fast kernel startup]

Change-Id: I38c270c413d60de65f27cf9c95d44bb2e2d07ac2
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
include/linux/raid/pq.h
lib/Kconfig
lib/raid6/algos.c