diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2014-08-04 20:50:31 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-12 02:56:31 -0700 |
commit | 449c046bf6b039b2ba86be34677056686f7bc5ce (patch) | |
tree | 748acd55f8e47b3ae2b2b6ec0507aa2b5ad52c1b /xlators/cluster/ec/src/ec-method.h | |
parent | 444ffda19e2052b5fc78f7dc020de161ebee8563 (diff) |
ec: Removed SSE2 dependency
This patch implements the Galois Field multiplications using pure C
code without any assembler support. This makes the ec xlator portable
to other architectures.
In the future it will be possible to use an optimized implementation
of the multiplications using architecture dependent facilities (it
will be automatically detected and configured). To allow bricks with
different machine word sizes to be able to work seamlessly in the
same volume, the minimum fragment length to be stored in any brick
has been fixed to 512 bytes. Otherwise, different implementations
will corrupt the data (SSE2 used 128 bytes, while new implementation
would have used 64).
This patch also removes the '-msse2' option added on patch
http://review.gluster.org/8396/
This is a backport of http://review.gluster.org/8413/
Change-Id: Iaf6e4ef3dcfda6c68f48f16ca46fc4fb61a215f4
BUG: 1140845
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8701
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-method.h')
-rw-r--r-- | xlators/cluster/ec/src/ec-method.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xlators/cluster/ec/src/ec-method.h b/xlators/cluster/ec/src/ec-method.h index 64e724ff3f0..57e81a51027 100644 --- a/xlators/cluster/ec/src/ec-method.h +++ b/xlators/cluster/ec/src/ec-method.h @@ -25,13 +25,10 @@ #define EC_METHOD_MAX_FRAGMENTS 16 -#define EC_METHOD_WORD_SIZE 16 +#define EC_METHOD_WORD_SIZE 64 -#define EC_BUFFER_ALIGN_SIZE EC_METHOD_WORD_SIZE - -#define EC_METHOD_BITS EC_GF_BITS -#define EC_METHOD_SIZE (1 << (EC_METHOD_BITS)) -#define EC_METHOD_CHUNK_SIZE (EC_METHOD_WORD_SIZE * EC_METHOD_BITS) +#define EC_METHOD_CHUNK_SIZE (EC_METHOD_WORD_SIZE * EC_GF_BITS) +#define EC_METHOD_WIDTH (EC_METHOD_WORD_SIZE / EC_GF_WORD_SIZE) void ec_method_initialize(void); size_t ec_method_encode(size_t size, uint32_t columns, uint32_t row, |