From: Bruce Richardson <bruce.richardson@intel.com>
To: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Cc: dev@dpdk.org, Byron Marohn <byron.marohn@intel.com>,
Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3 2/4] hash: reorganize bucket structure
Date: Wed, 28 Sep 2016 10:05:23 +0100 [thread overview]
Message-ID: <20160928090523.GB47356@bricha3-MOBL3> (raw)
In-Reply-To: <1473190444-120795-3-git-send-email-pablo.de.lara.guarch@intel.com>
On Tue, Sep 06, 2016 at 08:34:02PM +0100, Pablo de Lara wrote:
> From: Byron Marohn <byron.marohn@intel.com>
>
> Move current signatures of all entries together in the bucket
> and same with all alternative signatures, instead of having
> current and alternative signatures together per entry in the bucket.
> This will be benefitial in the next commits, where a vectorized
> comparison will be performed, achieving better performance.
>
> Signed-off-by: Byron Marohn <byron.marohn@intel.com>
> Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
> ---
> lib/librte_hash/rte_cuckoo_hash.c | 43 ++++++++++++++++++-----------------
> lib/librte_hash/rte_cuckoo_hash.h | 17 ++++----------
> lib/librte_hash/rte_cuckoo_hash_x86.h | 20 ++++++++--------
> 3 files changed, 37 insertions(+), 43 deletions(-)
>
<snip>
> --- a/lib/librte_hash/rte_cuckoo_hash.h
> +++ b/lib/librte_hash/rte_cuckoo_hash.h
> @@ -151,17 +151,6 @@ struct lcore_cache {
> void *objs[LCORE_CACHE_SIZE]; /**< Cache objects */
> } __rte_cache_aligned;
>
> -/* Structure storing both primary and secondary hashes */
> -struct rte_hash_signatures {
> - union {
> - struct {
> - hash_sig_t current;
> - hash_sig_t alt;
> - };
> - uint64_t sig;
> - };
> -};
> -
> /* Structure that stores key-value pair */
> struct rte_hash_key {
> union {
> @@ -174,10 +163,14 @@ struct rte_hash_key {
>
> /** Bucket structure */
> struct rte_hash_bucket {
> - struct rte_hash_signatures signatures[RTE_HASH_BUCKET_ENTRIES];
> + hash_sig_t sig_current[RTE_HASH_BUCKET_ENTRIES];
> +
> /* Includes dummy key index that always contains index 0 */
> uint32_t key_idx[RTE_HASH_BUCKET_ENTRIES + 1];
> +
> uint8_t flag[RTE_HASH_BUCKET_ENTRIES];
> +
> + hash_sig_t sig_alt[RTE_HASH_BUCKET_ENTRIES];
> } __rte_cache_aligned;
>
Is there a reason why sig_current and sig_alt fields cannot be beside each
other in the structure. It looks strange having them separate by other fields?
/Bruce
next prev parent reply other threads:[~2016-09-28 9:05 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-26 21:34 [dpdk-dev] [PATCH 0/3] Cuckoo hash lookup enhancements Pablo de Lara
2016-08-26 21:34 ` [dpdk-dev] [PATCH 1/3] hash: reorganize bucket structure Pablo de Lara
2016-08-26 21:34 ` [dpdk-dev] [PATCH 2/3] hash: add vectorized comparison Pablo de Lara
2016-08-27 8:57 ` Thomas Monjalon
2016-09-02 17:05 ` De Lara Guarch, Pablo
2016-08-26 21:34 ` [dpdk-dev] [PATCH 3/3] hash: modify lookup bulk pipeline Pablo de Lara
2016-09-02 22:56 ` [dpdk-dev] [PATCH v2 0/4] Cuckoo hash lookup enhancements Pablo de Lara
2016-09-02 22:56 ` [dpdk-dev] [PATCH v2 1/4] hash: reorder hash structure Pablo de Lara
2016-09-02 22:56 ` [dpdk-dev] [PATCH v2 2/4] hash: reorganize bucket structure Pablo de Lara
2016-09-02 22:56 ` [dpdk-dev] [PATCH v2 3/4] hash: add vectorized comparison Pablo de Lara
2016-09-02 22:56 ` [dpdk-dev] [PATCH v2 4/4] hash: modify lookup bulk pipeline Pablo de Lara
2016-09-06 19:33 ` [dpdk-dev] [PATCH v3 0/4] Cuckoo hash lookup enhancements Pablo de Lara
2016-09-30 7:38 ` [dpdk-dev] [PATCH v4 0/4] Cuckoo hash enhancements Pablo de Lara
2016-09-30 7:38 ` [dpdk-dev] [PATCH v4 1/4] hash: reorder hash structure Pablo de Lara
2016-09-30 7:38 ` [dpdk-dev] [PATCH v4 2/4] hash: reorganize bucket structure Pablo de Lara
2016-09-30 7:38 ` [dpdk-dev] [PATCH v4 3/4] hash: add vectorized comparison Pablo de Lara
2016-09-30 7:38 ` [dpdk-dev] [PATCH v4 4/4] hash: modify lookup bulk pipeline Pablo de Lara
2016-09-30 19:53 ` [dpdk-dev] [PATCH v4 0/4] Cuckoo hash enhancements Gobriel, Sameh
2016-10-03 9:59 ` Bruce Richardson
2016-10-04 6:50 ` De Lara Guarch, Pablo
2016-10-04 7:17 ` De Lara Guarch, Pablo
2016-10-04 9:47 ` Bruce Richardson
2016-10-04 23:25 ` [dpdk-dev] [PATCH v5 " Pablo de Lara
2016-10-04 23:25 ` [dpdk-dev] [PATCH v5 1/4] hash: reorder hash structure Pablo de Lara
2016-10-04 23:25 ` [dpdk-dev] [PATCH v5 2/4] hash: reorganize bucket structure Pablo de Lara
2016-10-04 23:25 ` [dpdk-dev] [PATCH v5 3/4] hash: add vectorized comparison Pablo de Lara
2016-10-04 23:25 ` [dpdk-dev] [PATCH v5 4/4] hash: modify lookup bulk pipeline Pablo de Lara
2016-10-05 10:12 ` [dpdk-dev] [PATCH v5 0/4] Cuckoo hash enhancements Thomas Monjalon
2016-09-06 19:34 ` [dpdk-dev] [PATCH v3 0/4] Cuckoo hash lookup enhancements Pablo de Lara
2016-09-06 19:34 ` [dpdk-dev] [PATCH v3 1/4] hash: reorder hash structure Pablo de Lara
2016-09-28 9:02 ` Bruce Richardson
2016-09-29 1:33 ` De Lara Guarch, Pablo
2016-09-06 19:34 ` [dpdk-dev] [PATCH v3 2/4] hash: reorganize bucket structure Pablo de Lara
2016-09-28 9:05 ` Bruce Richardson [this message]
2016-09-29 1:40 ` De Lara Guarch, Pablo
2016-09-06 19:34 ` [dpdk-dev] [PATCH v3 3/4] hash: add vectorized comparison Pablo de Lara
2016-09-06 19:34 ` [dpdk-dev] [PATCH v3 4/4] hash: modify lookup bulk pipeline Pablo de Lara
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=20160928090523.GB47356@bricha3-MOBL3 \
--to=bruce.richardson@intel.com \
--cc=byron.marohn@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=saikrishna.edupuganti@intel.com \
/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).