Skip to content

Commit eb4609a

Browse files
authored
Merge pull request ceph#59206 from ygtzf/bugfix-compress-use-isal
compressor: compressor_zlib_isal did not take effect in compression Reviewed-by: Igor Fedotov <[email protected]>
2 parents 86d08c2 + b31fbab commit eb4609a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/compressor/zlib/ZlibCompressor.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ UadkAccel ZlibCompressor::uadk_accel;
6969
ZlibCompressor::ZlibCompressor(CephContext *cct, bool isal)
7070
: Compressor(COMP_ALG_ZLIB, "zlib"), isal_enabled(isal), cct(cct)
7171
{
72+
73+
#if !(__x86_64__ && defined(HAVE_NASM_X64_AVX2)) || defined(__aarch64__)
74+
if (isal_enabled) {
75+
derr << "WARN: ISA-L enabled (compressor_zlib_isal=true) but not supported"
76+
<< dendl;
77+
}
78+
#endif
79+
7280
#ifdef HAVE_QATZIP
7381
if (cct->_conf->qat_compressor_enabled && qat_accel.init("zlib"))
7482
qat_enabled = true;

src/include/config-h.in.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@
250250
/* we have a recent nasm and are x86_64 */
251251
#cmakedefine HAVE_NASM_X64
252252

253+
/* nasm can also build the isa-l:avx2 */
254+
#cmakedefine HAVE_NASM_X64_AVX2
255+
253256
/* nasm can also build the isa-l:avx512 */
254257
#cmakedefine HAVE_NASM_X64_AVX512
255258

0 commit comments

Comments
 (0)