DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Cc: pablo.de.lara.guarch@intel.com, dev@dpdk.org,
	yipeng1.wang@intel.com, gavin.hu@arm.com,
	dharmik.thakkar@arm.com, nd@arm.com
Subject: Re: [dpdk-dev] [PATCH v5 4/5] hash: add lock-free read-write concurrency
Date: Tue, 23 Oct 2018 12:52:51 +0100	[thread overview]
Message-ID: <20181023115251.GD18800@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <1540268524-126673-5-git-send-email-honnappa.nagarahalli@arm.com>

On Mon, Oct 22, 2018 at 11:22:03PM -0500, Honnappa Nagarahalli wrote:
> Add lock-free read-write concurrency. This is achieved by the
> following changes.
> 
> 1) Add memory ordering to avoid race conditions. The only race
> condition that can occur is -  using the key store element
> before the key write is completed. Hence, while inserting the element
> the release memory order is used. Any other race condition is caught
> by the key comparison. Memory orderings are added only where needed.
> For ex: reads in the writer's context do not need memory ordering
> as there is a single writer.
> 
> key_idx in the bucket entry and pdata in the key store element are
> used for synchronisation. key_idx is used to release an inserted
> entry in the bucket to the reader. Use of pdata for synchronisation
> is required due to updation of an existing entry where-in only
> the pdata is updated without updating key_idx.
> 
> 2) Reader-writer concurrency issue, caused by moving the keys
> to their alternative locations during key insert, is solved
> by introducing a global counter(tbl_chng_cnt) indicating a
> change in table.
> 
> 3) Add the flag to enable reader-writer concurrency during
> run time.
> 
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
> Reviewed-by: Steve Capper <steve.capper@arm.com>
> Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

  reply	other threads:[~2018-10-23 11:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23  4:21 [dpdk-dev] [PATCH v5 0/5] Address reader-writer concurrency in rte_hash Honnappa Nagarahalli
2018-10-23  4:22 ` [dpdk-dev] [PATCH v5 1/5] hash: separate multi-writer from rw-concurrency Honnappa Nagarahalli
2018-10-23 10:25   ` Bruce Richardson
2018-10-23  4:22 ` [dpdk-dev] [PATCH v5 2/5] hash: support do not free on delete Honnappa Nagarahalli
2018-10-23 10:30   ` Bruce Richardson
2018-10-23  4:22 ` [dpdk-dev] [PATCH v5 3/5] hash: fix key store element alignment Honnappa Nagarahalli
2018-10-23 10:31   ` Bruce Richardson
2018-10-23  4:22 ` [dpdk-dev] [PATCH v5 4/5] hash: add lock-free read-write concurrency Honnappa Nagarahalli
2018-10-23 11:52   ` Bruce Richardson [this message]
2018-10-23  4:22 ` [dpdk-dev] [PATCH v5 5/5] test/hash: read-write lock-free concurrency test Honnappa Nagarahalli
2018-10-23 11:54   ` Bruce Richardson
2018-10-23 14:15     ` Honnappa Nagarahalli
2018-10-23 14:20       ` Bruce Richardson
2018-10-23 15:52         ` Honnappa Nagarahalli
2018-10-23 11:56   ` Bruce Richardson

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=20181023115251.GD18800@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dharmik.thakkar@arm.com \
    --cc=gavin.hu@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=nd@arm.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=yipeng1.wang@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).