From: Andreas Peters Date: Thu, 25 Sep 2014 14:48:47 +0000 (+0200) Subject: erasure-code: [ISA] modify get_alignment function to imply a platform/compiler indepe... X-Git-Tag: v0.86~29^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f4909ae59e5ad733bc555098c6a0740aabf796b;p=ceph.git erasure-code: [ISA] modify get_alignment function to imply a platform/compiler independent alignment constraint of 32-byte aligned buffer addresses & length --- diff --git a/src/erasure-code/isa/ErasureCodeIsa.cc b/src/erasure-code/isa/ErasureCodeIsa.cc index 962ab81f04375..427c293125784 100644 --- a/src/erasure-code/isa/ErasureCodeIsa.cc +++ b/src/erasure-code/isa/ErasureCodeIsa.cc @@ -326,7 +326,7 @@ ErasureCodeIsaDefault::isa_decode(int *erasures, unsigned ErasureCodeIsaDefault::get_alignment() const { - return k * EC_ISA_VECTOR_OP_WORDSIZE; + return k * EC_ISA_ADDRESS_ALIGNMENT; } // ----------------------------------------------------------------------------- diff --git a/src/erasure-code/isa/README b/src/erasure-code/isa/README index dbbfa67f88d55..f5e9fe595e236 100644 --- a/src/erasure-code/isa/README +++ b/src/erasure-code/isa/README @@ -50,9 +50,10 @@ make ceph_erasure_code_benchmark Developer Notes =============== -The plugin requires 16*k byte aligned buffers. The encoding tables are computed only -once when the EC object is created. Decoding Tables have to be computed for -each decoding since the available data/coding sources may change between calls. +The plugin provides optimal performance for 32-byte aligned buffer start address and +k*32 byte aligned buffer length. The encoding tables are computed only once when the EC +object is created. Decoding Tables have to be computed for each decoding since the available +data/coding sources may change between calls. Decoding tables are cached in an LRU cache which is sufficiently large up to (12,4). For larger configurations the cache might expire the 'oldest' tables and decoding might diff --git a/src/erasure-code/isa/xor_op.h b/src/erasure-code/isa/xor_op.h index 62c2c358a11a4..6a918d3b12e18 100644 --- a/src/erasure-code/isa/xor_op.h +++ b/src/erasure-code/isa/xor_op.h @@ -26,6 +26,7 @@ // ------------------------------------------------------------------------- // ------------------------------------------------------------------------- +#define EC_ISA_ADDRESS_ALIGNMENT 32 #define EC_ISA_VECTOR_SSE2_WORDSIZE 64 #if __GNUC__ > 4 || \