In the current UADK framework, the hardware acceleration function and the software acceleration function are merged to ensure that the software function of instruction acceleration and the hardware function of hardware offload can run at the same time, thus providing users with stronger performance
Under the heterogeneous scheduling mode enabled in the current scheduler, the test performance data is as follows:
Alg Mode(1KB) Performance(MB/s) CPU sync async sync async sm4-ecb init1(HW) 454 1322 100% 200.00% init2(HW+CE) 1445.1 1864 100% 195.00% increase 218.30% 41.00% 0.00% -2.50% sm3 init1(HW) 153.1 1481 99% 199.80% init2(HW+CE) 431.5 508 100% 199.80% increase 181.84% -65.70% 0.91% 0.00% ------------------------------------------------------------------------ Alg Mode(8KB) Performance(MB/s) CPU sync async sync async sm4-ecb init1(HW) 1407.5 9092 100% 198.00% init2(HW+CE) 3626.8 6021 100% 199.80% increase 157.68% -33.78% 0.00% 0.91% sm3 init1(HW) 960.4 5161.1 100% 183.80% init2(HW+CE) 549.6 530.1 100% 199.80% increase -42.77% -89.73% -0.40% 8.71% -----------------------------------------------------------------------
Without increasing the CPU usage, the performance improvement of the synchronous mode is very huge. In the asynchronous mode, the performance is reduced because the CPU is used for soft calculations, which can be solved by creating dedicated calculation threads later.
Longfang Liu (8): uadk: synchronize internal development code uadk: synchronous interface layer code uadk_tools: synchronous test tool code uadk: new heterogeneous scheduling framework uadk: added heterogeneous computing scheduler uadk: added heterogeneous computing mode uadk: add heterogeneous computing capabilities to UADK driver uadk_tools: enable UADK Tools to support heterogeneous computing
Makefile.am | 139 +--- drv/hash_mb/hash_mb.c | 91 ++- drv/hash_mb/hash_mb.h | 3 + drv/hisi_comp.c | 47 +- drv/hisi_dae.c | 32 +- drv/hisi_hpre.c | 358 ++++---- drv/hisi_qm_udrv.c | 93 +-- drv/hisi_qm_udrv.h | 11 +- drv/hisi_sec.c | 223 ++--- drv/isa_ce_sm3.c | 62 +- drv/isa_ce_sm3.h | 3 + drv/isa_ce_sm4.c | 69 +- drv/isa_ce_sm4.h | 5 +- include/drv/wd_comp_drv.h | 3 +- include/drv/wd_digest_drv.h | 3 +- include/wd.h | 21 +- include/wd_aead.h | 1 + include/wd_alg.h | 50 +- include/wd_alg_common.h | 67 +- include/wd_comp.h | 3 +- include/wd_dh.h | 8 +- include/wd_digest.h | 9 +- include/wd_ecc.h | 2 + include/wd_rsa.h | 5 + include/wd_sched.h | 4 + include/wd_util.h | 51 +- uadk_mk.sh | 9 + uadk_tool/Makefile.am | 18 +- uadk_tool/benchmark/hpre_protocol_data.h | 2 +- uadk_tool/benchmark/hpre_uadk_benchmark.c | 40 +- uadk_tool/benchmark/hpre_wd_benchmark.c | 11 +- uadk_tool/benchmark/sec_soft_benchmark.c | 4 - uadk_tool/benchmark/sec_uadk_benchmark.c | 360 +------- uadk_tool/benchmark/sec_wd_benchmark.c | 11 +- uadk_tool/benchmark/trng_wd_benchmark.c | 3 +- uadk_tool/benchmark/uadk_benchmark.c | 32 +- uadk_tool/benchmark/zip_uadk_benchmark.c | 37 +- uadk_tool/benchmark/zip_wd_benchmark.c | 3 +- uadk_tool/uadk_tool.c | 2 +- wd.c | 12 +- wd_aead.c | 38 +- wd_agg.c | 13 +- wd_alg.c | 2 +- wd_cipher.c | 168 ++-- wd_comp.c | 109 +-- wd_dh.c | 32 +- wd_digest.c | 160 ++-- wd_ecc.c | 35 +- wd_mempool.c | 11 +- wd_rsa.c | 88 +- wd_sched.c | 664 ++++++++++++++- wd_util.c | 954 ++++++++++++++++------ wd_zlibwrapper.c | 30 +- 53 files changed, 2470 insertions(+), 1741 deletions(-) create mode 100755 uadk_mk.sh