DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ravi Kerur <rkerur@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] Implement rte_memcmp with AVX/SSE instructions.
Date: Wed, 22 Apr 2015 08:33:47 -0700	[thread overview]
Message-ID: <1429716828-19012-1-git-send-email-rkerur@gmail.com> (raw)

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

             reply	other threads:[~2015-04-22 15:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 15:33 Ravi Kerur [this message]
2015-04-22 15:33 ` [dpdk-dev] [PATCH] Implement memcmp using AVX/SSE instructio Ravi Kerur
2015-04-23  7:24   ` Pawel Wodkowski
2015-04-23  8:11     ` Bruce Richardson
2015-04-23  8:21       ` Luke Gorrie
2015-04-23  9:23       ` Ananyev, Konstantin
2015-04-23 13:53         ` Ravi Kerur
2015-04-23 14:00           ` Bruce Richardson
2015-04-23 22:26             ` Ravi Kerur
2015-05-05 21:56               ` Ravi Kerur
2015-04-23 13:43     ` Ravi Kerur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429716828-19012-1-git-send-email-rkerur@gmail.com \
    --to=rkerur@gmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).