From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by dpdk.org (Postfix) with ESMTP id 6BB3F5A67 for ; Wed, 22 Apr 2015 17:33:55 +0200 (CEST) Received: by pacyx8 with SMTP id yx8so275889764pac.1 for ; Wed, 22 Apr 2015 08:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=vwYIF0mxiUhtxG7sjJntPHi1hFWK5weWFlTt4/mLTxs=; b=bP/kMz7MS3BxVUBJRf2bUxRTEec3sEgZe+2VrILeeQwwDKMUpNcY3GV+YURhFlEDRS pgzFvMe2saz1G8SEloCAJKUU06Mv9IR/QSlpTPY6VPVHpFpr9Je7Yc+qSgRB4ywZ5Atk mugaRT0f/YIXF4Egw0h3FA2XHYOIFuexbu9DglwYgzN2w4MmDNHJLUAl7YHiT/BcbbpZ nU/3Q2NAVUR6fddutHG+ClI/1HnAM5nQbwwq8gnoa0TTKITjDjDtGepT+tH39qQGXOZO 3iwtb1fN1p7WpFs4lfpn/Q+eSvN30I0e70pG56K1iU71Gc+N81JReI0FpyLRQk9kK2EA T2MA== X-Received: by 10.66.184.48 with SMTP id er16mr47352659pac.91.1429716834800; Wed, 22 Apr 2015 08:33:54 -0700 (PDT) Received: from user-PC.hsd1.ca.comcast.net (c-98-234-176-9.hsd1.ca.comcast.net. [98.234.176.9]) by mx.google.com with ESMTPSA id eo5sm5386869pbb.51.2015.04.22.08.33.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Apr 2015 08:33:54 -0700 (PDT) From: Ravi Kerur To: dev@dpdk.org Date: Wed, 22 Apr 2015 08:33:47 -0700 Message-Id: <1429716828-19012-1-git-send-email-rkerur@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] Implement rte_memcmp with AVX/SSE instructions. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 15:33:55 -0000 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