DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wang, Yipeng1" <yipeng1.wang@intel.com>
To: "Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	"'dev@dpdk.org'" <dev@dpdk.org>
Cc: wangyunjian <wangyunjian@huawei.com>,
	xudingke <xudingke@huawei.com>,
	"'stable@dpdk.org'" <stable@dpdk.org>, nd <nd@arm.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH] lib/librte_hash: add rte_hash_del_key_fixed without compact
Date: Thu, 14 May 2020 17:44:29 +0000	[thread overview]
Message-ID: <MW3PR11MB4684D64379E0D2862284F88BC3BC0@MW3PR11MB4684.namprd11.prod.outlook.com> (raw)
In-Reply-To: <40280F65B1B0B44E8089ED31C01616EBA49C65F4@dggeml529-mbx.china.huawei.com>

> -----Original Message-----
> From: Lilijun (Jerry) <jerry.lilijun@huawei.com>
> Sent: Tuesday, May 12, 2020 6:28 PM
> To: Wang, Yipeng1 <yipeng1.wang@intel.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; 'dev@dpdk.org' <dev@dpdk.org>
> Cc: wangyunjian <wangyunjian@huawei.com>; xudingke
> <xudingke@huawei.com>; 'stable@dpdk.org' <stable@dpdk.org>; nd
> <nd@arm.com>; nd <nd@arm.com>
> Subject: 答复: [dpdk-dev] [PATCH] lib/librte_hash: add
> rte_hash_del_key_fixed without compact

<...>

> > [Yipeng]
> > Could you tell me more on the use case? Since insertion would also
> > invalidate the Iterator, do you insert keys only to new table during resizing?
> >
> [Lilijun (Jerry)]
> Yes, Insert only to new table. Because the resize process need take a write
> lock and the old table's key insertion are prevented by the lock now.
> Do you mean the key insertion may change other key's position by cuckoo
> hash algorithm and invalidate the iterator?
> That maybe a new question I haven't met yet.

[Wang, Yipeng] 
For cuckoo algorithm, if the table is relatively full, new inserted key could move other keys around in the table.
For example, when I insert A, A could move B to B's alternative bucket to make
space for A, that’s where the name "cuckoo" comes from. 😊
So if you insert keys into table, the iterators should be invalidated too. But as you said you only insert keys
to new table while you iterate only the old table right?

  reply	other threads:[~2020-05-14 17:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  2:28 Lilijun (Jerry)
2020-04-28 20:46 ` Honnappa Nagarahalli
2020-04-29  1:07   ` [dpdk-dev] 答复: " Lilijun (Jerry)
2020-05-05 23:17     ` [dpdk-dev] " Honnappa Nagarahalli
2020-05-06  1:09       ` [dpdk-dev] 答复: " Lilijun (Jerry)
2020-05-12 23:41         ` [dpdk-dev] " Wang, Yipeng1
2020-05-13  1:28           ` [dpdk-dev] 答复: " Lilijun (Jerry)
2020-05-14 17:44             ` Wang, Yipeng1 [this message]
2021-03-24 21:33             ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-03-24 23:25               ` Wang, Yipeng1
2021-03-25  8:04                 ` Thomas Monjalon
2020-05-13 19:27         ` [dpdk-dev] " Honnappa Nagarahalli
2020-05-14  0:55           ` [dpdk-dev] 答复: " Lilijun (Jerry)
2020-05-14  1:21             ` [dpdk-dev] " Honnappa Nagarahalli
2020-05-14  1:51               ` [dpdk-dev] 答复: " Lilijun (Jerry)

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=MW3PR11MB4684D64379E0D2862284F88BC3BC0@MW3PR11MB4684.namprd11.prod.outlook.com \
    --to=yipeng1.wang@intel.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=nd@arm.com \
    --cc=stable@dpdk.org \
    --cc=wangyunjian@huawei.com \
    --cc=xudingke@huawei.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).