From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 1D9667EE3 for ; Thu, 12 Jul 2018 22:30:25 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BB36E21F24; Thu, 12 Jul 2018 16:30:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 12 Jul 2018 16:30:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=JphYwIysXgGxofMtpBvLpdsL1u YiKg09PpIPkLGqOhg=; b=l8cwE29NG1hirBzQDMcuK5I2Si17RYIiBo1WIgJNGN VqMQ5auPcSWrpdnhVTIn8ycnPJWDbg6uXAKQ0+Jx0iEdpaSF6xNo7HpNUh2Zmep+ KleE89J7dNoelIjUXQd+ISUmbMcazkr4Ieb3BdkAX3Fm/ciWzYk7EvhCZg/38lNo 8= 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-sender:x-me-sender:x-sasl-enc; s=fm3; bh=JphYwI ysXgGxofMtpBvLpdsL1uYiKg09PpIPkLGqOhg=; b=BlbaXcsqA9XzzY2dWGMKNL iBfop4JMbiknyK6nNhSZtXg2lYo9dAbIFc11rV8UwXw4Q7M4mPJC3cxh81HMIH+P lLIluQVLD4IsDwKF+mu55/nAsAprK/vgEJ944wWIZJgCqLuYAuZzfjVvVAAz2Evd ERs4FIXpSjqUDwo3PZK5utZdJnXsJVYzDqMYzZDSvuC8g92bwW9e7BYYalUcxFJh eZKbeggGSkO7Kso1J9Ef6bvfpV8I3TwK9WRjkwz+Oh2/RaJImTGgCoKAYWBFYb3R kWj4eghlU98RfOmP18fdwU5bpszfyUeLZ9JpkJS8OjrJu9wRrarjHuSpLNzekTFQ == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 6629A10261; Thu, 12 Jul 2018 16:30:22 -0400 (EDT) From: Thomas Monjalon To: "Wang, Yipeng1" , Stephen Hemminger Cc: dev@dpdk.org, "De Lara Guarch, Pablo" , "Richardson, Bruce" , "honnappa.nagarahalli@arm.com" , "vguvva@caviumnetworks.com" , "brijesh.s.singh@gmail.com" , "Wang, Ren" , "Gobriel, Sameh" , "Tai, Charlie" Date: Thu, 12 Jul 2018 22:30:21 +0200 Message-ID: <4478633.7AMRLkzmKO@xps> In-Reply-To: References: <1528455078-328182-1-git-send-email-yipeng1.wang@intel.com> <20180711134907.01d8eaf0@xeon-e3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5 5/8] hash: add read and write concurrency support 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: Thu, 12 Jul 2018 20:30:25 -0000 12/07/2018 03:22, Wang, Yipeng1: > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > > For small windows, reader-writer locks are slower than a spin lock > > because there are more cache bounces. > > Hi, Stephen, > > You are correct and we understand that spinlock might be slightly faster than counter based rwlock in this case. However, the counter based rwlock is the exception path when TSX fails. > > If performance of this exception path is a big concern, a more optimal read-write lock scheme (e.g. TLRW) should be introduced into rte_rwlock in the future. Something like this? eal/rwlocks: Try read/write and relock write to read locks added https://patches.dpdk.org/patch/40254/