mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
0437de4fa0
commit
be85f93ae2
3 changed files with 16 additions and 0 deletions
|
@ -163,6 +163,11 @@ static inline const struct raid6_calls *raid6_choose_gen(
|
|||
if ((*algo)->valid && !(*algo)->valid())
|
||||
continue;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_RAID6_PQ_BENCHMARK)) {
|
||||
best = *algo;
|
||||
break;
|
||||
}
|
||||
|
||||
perf = 0;
|
||||
|
||||
preempt_disable();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue