kernel-fxtec-pro1x/lib/raid6
Markus Stockhausen fe5cbc6e06 md/raid6 algorithms: delta syndrome functions
v3: s-o-b comment, explanation of performance and descision for
the start/stop implementation

Implementing rmw functionality for RAID6 requires optimized syndrome
calculation. Up to now we can only generate a complete syndrome. The
target P/Q pages are always overwritten. With this patch we provide
a framework for inplace P/Q modification. In the first place simply
fill those functions with NULL values.

xor_syndrome() has two additional parameters: start & stop. These
will indicate the first and last page that are changing during a
rmw run. That makes it possible to avoid several unneccessary loops
and speed up calculation. The caller needs to implement the following
logic to make the functions work.

1) xor_syndrome(disks, start, stop, ...): "Remove" all data of source
blocks inside P/Q between (and including) start and end.

2) modify any block with start <= block <= stop

3) xor_syndrome(disks, start, stop, ...): "Reinsert" all data of
source blocks into P/Q between (and including) start and end.

Pages between start and stop that won't be changed should be filled
with a pointer to the kernel zero page. The reasons for not taking NULL
pages are:

1) Algorithms cross the whole source data line by line. Thus avoid
additional branches.

2) Having a NULL page avoids calculating the XOR P parity but still
need calulation steps for the Q parity. Depending on the algorithm
unrolling that might be only a difference of 2 instructions per loop.

The benchmark numbers of the gen_syndrome() functions are displayed in
the kernel log. Do the same for the xor_syndrome() functions. This
will help to analyze performance problems and give an rough estimate
how well the algorithm works. The choice of the fastest algorithm will
still depend on the gen_syndrome() performance.

With the start/stop page implementation the speed can vary a lot in real
life. E.g. a change of page 0 & page 15 on a stripe will be harder to
compute than the case where page 0 & page 1 are XOR candidates. To be not
to enthusiatic about the expected speeds we will run a worse case test
that simulates a change on the upper half of the stripe. So we do:

1) calculation of P/Q for the upper pages

2) continuation of Q for the lower (empty) pages

Signed-off-by: Markus Stockhausen <stockhausen@collogia.de>
Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-22 08:00:41 +10:00
..
test md update for v3.12 2013-09-10 13:03:41 -07:00
.gitignore lib/raid6: add ARM-NEON accelerated syndrome calculation 2013-07-08 22:09:18 +01:00
algos.c md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
altivec.uc md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
avx2.c md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
int.uc md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
Makefile md update for v3.12 2013-09-10 13:03:41 -07:00
mktables.c lib/raid6: Add SSSE3 optimized recovery functions 2012-05-22 13:54:18 +10:00
mmx.c md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
neon.c md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
neon.uc lib/raid6: add ARM-NEON accelerated syndrome calculation 2013-07-08 22:09:18 +01:00
recov.c lib/raid6: fix sparse warnings in recovery functions 2012-05-28 14:10:22 +10:00
recov_avx2.c x86/raid6: correctly check for assembler capabilities 2015-02-04 08:35:51 +11:00
recov_ssse3.c x86/raid6: correctly check for assembler capabilities 2015-02-04 08:35:51 +11:00
sse1.c md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
sse2.c md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
tilegx.uc md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
unroll.awk Merge branch 'async' of macbook:git/btrfs-unstable 2010-08-09 10:36:44 +01:00
x86.h lib/raid6: Add AVX2 optimized recovery functions 2012-12-13 16:42:01 +11:00