diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2018-11-13 02:26:52 +0300 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2018-12-20 19:53:23 +0300 |
commit | be85f93ae2df32dea0b20908316f1d894c3e0f64 (patch) | |
tree | 83da6e27e6ab8e949115a5a690af009c69912da3 /include/linux/raid | |
parent | 0437de4fa09fe59b57d12b785e4afb73b0f34c05 (diff) | |
download | linux-be85f93ae2df32dea0b20908316f1d894c3e0f64.tar.xz |
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>
Diffstat (limited to 'include/linux/raid')
-rw-r--r-- | include/linux/raid/pq.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index d7c99161bba2..605cf46c17bd 100644 --- a/include/linux/raid/pq.h +++ b/include/linux/raid/pq.h @@ -70,6 +70,9 @@ extern const char raid6_empty_zero_page[PAGE_SIZE]; #define MODULE_DESCRIPTION(desc) #define subsys_initcall(x) #define module_exit(x) + +#define IS_ENABLED(x) (x) +#define CONFIG_RAID6_PQ_BENCHMARK 1 #endif /* __KERNEL__ */ /* Routine choices */ |