From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 9693F2F42; Tue, 13 Nov 2018 17:40:05 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 354AC22709; Tue, 13 Nov 2018 11:40:05 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 13 Nov 2018 11:40:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=6bH/PVh745dgbFSD2nClO24lSQbIMz26zERPRF5gGC8=; b=OjkRmfAE9Lpj 1ikf/gZAuYja7OnscWIfqvNDpq+BP+oOBPhMwW1PID+7MCrncBc64YBCBirWPXbg /Fi8eJk5Eb8XkfhgwVzqspIvtU60qJA7mD3Kwc0eoQhuWjI/p8AtDVILbnQhzTxZ zHrMu779TuaYWKCkS7B/MWXjB1OeiQ4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=6bH/PVh745dgbFSD2nClO24lSQbIMz26zERPRF5gG C8=; b=nPkueWusf8CDugosgjldvmWdDEoKYC5IgRXu64q9ulbDhUz6hEKFZTDJW pvm+2/ivXBBbOh4Fu5Rav9CJYR9YPEFlWinLIKbApT0ig2SJYxtOGYLOwxF+KRCB Ec4IEyIt2aNEPJX7Wb+wLH6E37GAYtOfW+E/YJgXvNIW9Otcj6P759+M2ihJsw3d 2tL1XLpGJcIMs2v1GoNp8uUR0K0c0VUZFyqHzKbeVD0I2alMh2mlkubhTFcqZ8Hg xZDgnMIrzx1XnoHH9f9eq+re1j3owyYKos+BrgIDY27Gu2L4oC8c+uarweQxQOEQ CNJ/SQOF2QHrRd6Hof/DxrestbxHA== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A9192E49CB; Tue, 13 Nov 2018 11:40:03 -0500 (EST) From: Thomas Monjalon To: Honnappa Nagarahalli , Bruce Richardson , Yipeng Wang Cc: stable@dpdk.org, "dev@dpdk.org" , nd Date: Tue, 13 Nov 2018 17:40:02 +0100 Message-ID: <2853815.6en7p1Z5Aa@xps> In-Reply-To: References: <20181105173913.61225-1-bruce.richardson@intel.com> <20181112104719.62568-3-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2 2/4] hash: add local cache for TSX region X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2018 16:40:05 -0000 12/11/2018 19:34, Honnappa Nagarahalli: > > > > From: Yipeng Wang > > > > This patch adds back the local cache when TSX support is turned on. > > > > When TSX is turned on, free key-data slot ring would be contended by various > > TSX regions. The purpose of this commit is to reduce possible memory > > collisions during key insertion. > > > > Signed-off-by: Yipeng Wang > > Acked-by: Bruce Richardson > > --- > > lib/librte_hash/rte_cuckoo_hash.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/lib/librte_hash/rte_cuckoo_hash.c > > b/lib/librte_hash/rte_cuckoo_hash.c > > index 76f5dc8..5d5f9f1 100644 > > --- a/lib/librte_hash/rte_cuckoo_hash.c > > +++ b/lib/librte_hash/rte_cuckoo_hash.c > > @@ -180,8 +180,10 @@ struct rte_hash * > > } > > > > /* Check extra flags field to check extra options. */ > > - if (params->extra_flag & > > RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT) > > + if (params->extra_flag & > > RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT) { > > + use_local_cache = 1; > Do you see the issue even in the case of single writer? Enabling this flag creates local caches on all the data plane cores. This increases the memory usage for the single writer use case. Then there is 'writers on the control plane' use case, the requirement on hash_add rate is comparatively lower when compared to 'writers on the data plane'. The writers also are not pinned to any core as well. In this use case, I am not sure how much having a local cache matters. > > Enabling this flag effectively changes the free slot allocation from a ring to a stack data structure. Does it indicate that for single writer use case with TSX, the free slot (global) data structure should be a stack (rather than a ring)? Is it blocking this patchset from entering in 18.11? If I understand well, there are some fixes for 18.11.