[PATCH 0/5] lib/raid6: allow skipping init-time benchmark

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a kernel with BTRFS built in, RAID6_PQ is always selected, which
means the init-time benchmarking is always performed.  This takes a
significant amount of time during boot, and it isn't particularly useful
if the RAID modes of BTRFS are not actually used.

This patch series adds a config option to skip the benchmarking and just
choose the first valid algorithm.  This seems like the least bad option;
suggestions for other less-hacky approaches are welcome!

The general approach was inspired by a patch from Clear Linux:
https://github.com/clearlinux-pkgs/linux-lts/blob/master/0115-raid6-add-Kconfig-option-to-skip-raid6-benchmarking.patch

However, instead of hard-coding a specific implementation of each
algorithm via config option, this patch set just sorts the lists of
algorithms so that they are in rough order of performance and then
chooses the first one.  This isn't perfect, as the performance of each
algorithm may vary depending on processor microarchitecture or other
implementation details, but it's good enough for our purposes (and the
default configuration still benchmarks all algorithms, so there is no
change in behavior unless the config is explicitly disabled).


Daniel Verkamp (2):
  lib/raid6: sort algos in rough performance order
  lib/raid6: add option to skip algo benchmarking

 include/linux/raid/pq.h |  8 +++-
 lib/Kconfig             |  8 ++++
 lib/raid6/algos.c       | 81 ++++++++++++++++++++++-------------------
 lib/raid6/test/Makefile |  3 ++
 4 files changed, 61 insertions(+), 39 deletions(-)

-- 
2.19.1.930.g4563a0d9d0-goog




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux