diff options
| author | Xavier Hernandez <xhernandez@datalab.es> | 2015-12-01 11:50:54 +0100 | 
|---|---|---|
| committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-09-08 10:08:25 -0700 | 
| commit | 593b7a83f7408e59ab7b3ef7dfc4fe4096d6e3cd (patch) | |
| tree | 1a60ff784e7759c5dddb2352c5526f16e8696013 /tests | |
| parent | 8a6236e4cfc7bf86e881e5c770a19040a6060ad0 (diff) | |
cluster/ec: Add support for hardware acceleration
This patch implements functionalities for fast encoding/decoding
using hardware support. Currently optimized x86_64, SSE and AVX is
added.
Additionally this patch implements a caching mecanism for inverse
matrices to reduce computation time, as well as a new method for
computing the inverse that takes quadratic time instead of cubic.
Finally some unnecessary memory copies have been eliminated to
further increase performance.
Change-Id: I26c75f26fb4201bd22b51335448ea4357235065a
BUG: 1289922
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/12837
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basic/ec/ec-cpu-extensions.t | 61 | 
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/basic/ec/ec-cpu-extensions.t b/tests/basic/ec/ec-cpu-extensions.t new file mode 100644 index 00000000000..a599a316925 --- /dev/null +++ b/tests/basic/ec/ec-cpu-extensions.t @@ -0,0 +1,61 @@ +#!/bin/bash + +DISPERSE=6 +REDUNDANCY=2 + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +TESTS_EXPECTED_IN_LOOP=96 + +function check_contents +{ +    local src=$1 +    local cs=$2 + +    TEST cp $src $M0/file +    TEST [ -f $M0/file ] + +    for ext in none x64 sse avx; do +        EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 +        TEST $CLI volume set $V0 disperse.cpu-extensions $ext +        TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0 +        EXPECT_WITHIN $CHILD_UP_TIMEOUT "$DISPERSE" ec_child_up_count $V0 0 + +        EXPECT "$cs" echo $(sha1sum $M0/file | awk '{ print $1 }') +    done + +    TEST rm -f $M0/file +} + +cleanup + +tmp=`mktemp -p ${LOGDIR} -d -t ${0##*/}.XXXXXX` +if [ ! -d $tmp ]; then +    exit 1 +fi + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume create $V0 redundancy $REDUNDANCY $H0:$B0/${V0}{1..$DISPERSE} +TEST $CLI volume set $V0 performance.flush-behind off +EXPECT 'Created' volinfo_field $V0 'Status' +TEST $CLI volume start $V0 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field $V0 'Status' + +TEST dd if=/dev/urandom of=$tmp/file bs=1048576 count=1 +cs_file=$(sha1sum $tmp/file | awk '{ print $1 }') + +for ext in none x64 sse avx; do +    TEST $CLI volume set $V0 disperse.cpu-extensions $ext +    TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0 +    EXPECT_WITHIN $CHILD_UP_TIMEOUT "$DISPERSE" ec_child_up_count $V0 0 + +    check_contents $tmp/file $cs_file + +    EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 +done + +TEST rm -rf $tmp + +cleanup  | 
