From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ravi Kerur Subject: [PATCH] Implement rte_memcmp with AVX/SSE instructions. Date: Wed, 22 Apr 2015 08:33:47 -0700 Message-ID: <1429716828-19012-1-git-send-email-rkerur@gmail.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Background: After preliminary discussion with John (Zhihong) and Tim from Intel it was decided that it would be beneficial to use AVX/SSE instructions for memcmp similar to memcpy being implemeneted. In addition, we decided to use librte_hash as a test candidate to test both functionality and performance. Currently memcmp in librte_hash is used for key comparisons whose length can vary and max key length is defined to 64 bytes. Similarly strncmp is used to compare names whose max lengh is 32 bytes. When memcmp and strncmp is replaced with rte_memcmp test results show minor improvements in "hash_perf" tests with a decrease of "1s" out of total "1m 3s" run time. Similarly when key_length is increased to 128 bytes, "hash_perf" shows decrease of "4s" out of total "1m 49s" run time with rte_memcmp. Test was conducted on Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, Ubuntu 14.04, x86_64, 16GB DDR3 system. Plan is to engage the team and get feedback to further improvise performace. Ravi Kerur (1): Implement memcmp using AVX/SSE instructio app/test/test_hash.c | 2 +- app/test/test_hash_perf.c | 302 +++++++------ .../common/include/arch/ppc_64/rte_memcmp.h | 62 +++ .../common/include/arch/x86/rte_memcmp.h | 479 +++++++++++++++++++++ lib/librte_eal/common/include/generic/rte_memcmp.h | 119 +++++ lib/librte_hash/rte_fbk_hash.c | 7 +- lib/librte_hash/rte_hash.c | 15 +- lib/librte_hash/rte_hash.h | 2 +- 8 files changed, 857 insertions(+), 131 deletions(-) create mode 100644 lib/librte_eal/common/include/arch/ppc_64/rte_memcmp.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_memcmp.h create mode 100644 lib/librte_eal/common/include/generic/rte_memcmp.h -- 1.9.1