From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v4 2/4] hash: add extendable bucket feature Date: Wed, 3 Oct 2018 08:08:46 -0700 Message-ID: <20181003080846.453881fa@xeon-e3> References: <1537993618-92630-1-git-send-email-yipeng1.wang@intel.com> <1538155426-145177-1-git-send-email-yipeng1.wang@intel.com> <1538155426-145177-3-git-send-email-yipeng1.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Honnappa Nagarahalli , "Richardson, Bruce" , "Ananyev, Konstantin" , "dev@dpdk.org" , "Gobriel, Sameh" , nd To: "Wang, Yipeng1" Return-path: Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id DED9D4CA5 for ; Wed, 3 Oct 2018 17:08:49 +0200 (CEST) Received: by mail-pf1-f194.google.com with SMTP id c25-v6so1517311pfe.6 for ; Wed, 03 Oct 2018 08:08:49 -0700 (PDT) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 2 Oct 2018 23:39:51 +0000 "Wang, Yipeng1" wrote: > >> + if (last_bkt->key_idx[i] != EMPTY_SLOT) { > >> + cur_bkt->key_idx[pos] = last_bkt->key_idx[i]; > >> + cur_bkt->sig_current[pos] = last_bkt->sig_current[i]; > >> + cur_bkt->sig_alt[pos] = last_bkt->sig_alt[i]; > >> + last_bkt->sig_current[i] = NULL_SIGNATURE; > >> + last_bkt->sig_alt[i] = NULL_SIGNATURE; > >> + last_bkt->key_idx[i] = EMPTY_SLOT; > >> + return; > >In lock-free algorithm, this will require the global counter increment. > > > [Wang, Yipeng] I agree. Similar to your protect for cuckoo displacement, protecting the copy part