cmake: use ExternalProjects to build isa-l and isa-l_crypto libraries#59513
cmake: use ExternalProjects to build isa-l and isa-l_crypto libraries#59513
Conversation
28b960a to
acc151b
Compare
instead of building isa-l_crypto source files directly into the ceph_crypto_isal plugin, use a cmake ExternalProject to build the library with make and expose the static library as cmake target ISAL::Crypto Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
7937f72 to
926ef93
Compare
|
@jamiepryde i ended up doing this for the ec plugin too builds were successful in https://shaman.ceph.com/builds/ceph/wip-isal-ext/ |
|
Looks good to me @cbodley |
|
i created https://tracker.ceph.com/issues/67943 to track reef/squid backports |
|
(cc @rzarzynski since you were the default assignee on https://bugzilla.redhat.com/show_bug.cgi?id=2310433) |
|
passed rgw qa in https://pulpito.ceph.com/cbodley-2024-09-06_13:43:33-rgw-wip-isal-ext-distro-default-smithi/ (qa/suites/rgw/crypt exercises the ceph_crypto_isal plugin) |
mkogan1
left a comment
There was a problem hiding this comment.
To test, a relatively new machine which CPU supports vaes capability is required:
❯ lscpu | grep vaes
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilitie
like:
❯ lscpu
...
Model name: Intel(R) Xeon(R) Silver 4416+
...
verified by runing on an vstart env with -o plugin_crypto_accelerator=crypto_isal -o rgw_crypt_default_encryption_key=4YSmvJtBv0aZ7geVgAsdpRnLBEwWSWlMIGnRS8a9TSA=
and monitored the avx512 instruction:
❯ nm lib/libceph_crypto_isal.so | grep avx512
0000000000012dc0 t aes_cbc_dec_128_vaes_avx512
0000000000013e41 t aes_cbc_dec_192_vaes_avx512
00000000000150b0 t aes_cbc_dec_256_vaes_avx512
using the tool: https://www.intel.com/content/www/us/en/developer/articles/tool/software-development-emulator.html -- Intel® Software Development Emulator (Intel® SDE)
with the command:
sudo ./sde64 -mix -attach-pid $(pidof radosgw)
to exercise the aes_cbc_dec_..._vaes_avx512 instructions an S3 GET operation is performed (b/c ..._dec_...)
after stopping RGW, searching the sde64 output file for aes_cbc_dec_..._vaes_avx512 instructions:
grep -i 'aes_cbc_dec_..._vaes_avx512' ./sde-mix-out.txt
…
0: 1857917952 55.777 55.777 1373184 7fff0ea2f0b0 aes_cbc_dec_256_vaes_avx512 IMG: /home/ceph/src-git/ceph--up--main/build/lib/libceph_crypto_isal.so
# $dynamic-counts-for-function: aes_cbc_dec_256_vaes_avx512 IMG: /home/ceph/src-git/ceph--up--main/build/lib/libceph_crypto_isal.so at [0x7fff0ea2f0b0, 0x7fff0ea30510) 55.777%
BLOCK: 0 PC: 00007fff0ea2f13a ICOUNT: 1828749312 EXECUTIONS: 22577152 #BYTES: 498 %: 53.8 cumltv%: 53.8 FN: aes_cbc_dec_256_vaes_avx512 IMG: /home/ceph/src-git/ceph--up--main/build/lib/libceph_crypto_isal.so OFFSET: 1513a
BLOCK: 3 PC: 00007fff0ea2f12d ICOUNT: 47976448 EXECUTIONS: 23988224 #BYTES: 13 %: 1.41 cumltv%: 63.4 FN: aes_cbc_dec_256_vaes_avx512 IMG: /home/ceph/src-git/ceph--up--main/build/lib/libceph_crypto_isal.so OFFSET: 1512d
BLOCK: 5 PC: 00007fff0ea2f0be ICOUNT: 22577152 EXECUTIONS: 1411072 #BYTES: 111 %: 0.665 cumltv%: 64.7 FN: aes_cbc_dec_256_vaes_avx512 IMG: /home/ceph/src-git/ceph--up--main/build/lib/libceph_crypto_isal.so OFFSET: 150be
…
With this PR the aes_cbc_dec_256_vaes_avx512 instructions are present, before this PR they are NOT present.
|
hey @SrinivasaBharath, any updates on testing here? |
Rados approved. https://tracker.ceph.com/projects/rados/wiki/MAIN#httpstrackercephcomissues68124 |

instead of building isa-l source files directly into the
ec_isaandceph_crypto_isalplugins, use cmake ExternalProjects to build the libraries with their own makefiles, and expose the static libraries as cmake targetsISAL::ISALandISAL::Cryptoas pointed out in #59494, the current cmake scripts don't include any of the avx512 sources. after switching to ExternalProjects, i've confirmed that the resulting plugins do contain avx512 symbols:
Fixes: https://tracker.ceph.com/issues/67943
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e