From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 5/8] hash: add read and write concurrency support Date: Thu, 12 Jul 2018 22:30:21 +0200 Message-ID: <4478633.7AMRLkzmKO@xps> References: <1528455078-328182-1-git-send-email-yipeng1.wang@intel.com> <20180711134907.01d8eaf0@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit 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" To: "Wang, Yipeng1" , Stephen Hemminger 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) 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" 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/