From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 8D2D7A00E6 for ; Mon, 15 Apr 2019 23:26:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4DE091B3FD; Mon, 15 Apr 2019 23:26:37 +0200 (CEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id D789D1B3FB for ; Mon, 15 Apr 2019 23:26:35 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id y3so9190577pgk.12 for ; Mon, 15 Apr 2019 14:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MQ+lv1/PiM0RHJwQFwwhVxv4M/G2hsEa7MKOIBtum/c=; b=QUVP0coODg07CW3Phtj226AyPqBGCQonMlGawMOe84rMIDhBuSME/Q31DW5f9Om3DK WnjqQYJ2mu2I5Hos21WXiUCQpaffHFYWovDjr0jjORUpZTZND55+HUIC4rkJsTQDRvJG 9KZc7kG36uHqunRCRty9SGUu/PxPtlK0MUZghM9NxKg9jcUYMkTG/7lbYcLL30JvbS4W teRyzhjQ6R7I5eOFKIMONXAjYYJA5GVdAumHK2i9rDjHqYUhcZwfHh+svIXFTzMxfNC5 KUPzK6EmPu1REw7s1Fx7kOW/pJMYSSns9prHQScjbgizAYvT2azDIEtGybX5Cy35k827 tKcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MQ+lv1/PiM0RHJwQFwwhVxv4M/G2hsEa7MKOIBtum/c=; b=O7NHMIRF4uuaGF8Q9pKLkALcVeIntMJNXD6kRrrvdt7Pj/jEkt1b10YEnMHVYZ7xxn DPLCWCjE2sRnNVIS1wB/eT8bm0DaS2wGq5TFBzcLXdrHLgCrORI1HJ98g70yckPyyn8C c/pJ5lETpP6qvRhv2Q1RUFK/HAcW1ltDwnT9bjNVSFFB3Rqu+hrH/m8vzihbl9IYdw4r C8svmtEEljTFNErU5IGO39Y+Sez7wqv7NMwVhvcKhvW/IZS9ENOqMuQviFlGwPInect7 Ewqss2cb8k4zNxmz9eOPI3EhfwIphbdJbJGtCHE35Y2eZmAVxF7W08Fwu+epdzLC9xo8 THWQ== X-Gm-Message-State: APjAAAUdqSRrSzp6pJfxA82slD0NuP/4kyUAx5YE5ELfgbL6XdMdWUIr comSQhD1nGgciw/c2wIN0FMjjw== X-Google-Smtp-Source: APXvYqz3cpaMFBEY4f27vyA/xhVEi4gVD8/CMkL/G/e2IED/riBtIRcvzQ6A3/BftlpdesbyuuIoVg== X-Received: by 2002:a63:525f:: with SMTP id s31mr72230026pgl.172.1555363594834; Mon, 15 Apr 2019 14:26:34 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id a80sm99561956pfj.61.2019.04.15.14.26.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Apr 2019 14:26:34 -0700 (PDT) Date: Mon, 15 Apr 2019 14:26:31 -0700 From: Stephen Hemminger To: "Ananyev, Konstantin" Cc: Honnappa Nagarahalli , "paulmck@linux.ibm.com" , "Kovacevic, Marko" , "dev@dpdk.org" , "Gavin Hu (Arm Technology China)" , Dharmik Thakkar , Malvika Gupta , nd Message-ID: <20190415142631.4c250248@shemminger-XPS-13-9360> In-Reply-To: <2601191342CEEE43887BDE71AB9772580148A98064@irsmsx105.ger.corp.intel.com> References: <20181122033055.3431-1-honnappa.nagarahalli@arm.com> <20190412202039.46902-1-honnappa.nagarahalli@arm.com> <20190412202039.46902-2-honnappa.nagarahalli@arm.com> <20190412150650.3709358e@shemminger-XPS-13-9360> <20190412160629.670eacd1@shemminger-XPS-13-9360> <2601191342CEEE43887BDE71AB9772580148A97E53@irsmsx105.ger.corp.intel.com> <20190415083834.31b38ed3@shemminger-XPS-13-9360> <2601191342CEEE43887BDE71AB9772580148A98064@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 1/3] rcu: add RCU library supporting QSBR mechanism 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190415212631.m5tQ09ZqyIMSLghnTGhDOQAqpUtB_erRjRfw08zdkGY@z> On Mon, 15 Apr 2019 17:39:07 +0000 "Ananyev, Konstantin" wrote: > > -----Original Message----- > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > Sent: Monday, April 15, 2019 4:39 PM > > To: Ananyev, Konstantin > > Cc: Honnappa Nagarahalli ; paulmck@linux.ibm.com; Kovacevic, Marko > > ; dev@dpdk.org; Gavin Hu (Arm Technology China) ; Dharmik Thakkar > > ; Malvika Gupta ; nd > > Subject: Re: [PATCH v5 1/3] rcu: add RCU library supporting QSBR mechanism > > > > On Mon, 15 Apr 2019 12:24:47 +0000 > > "Ananyev, Konstantin" wrote: > > > > > > -----Original Message----- > > > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > > > Sent: Saturday, April 13, 2019 12:06 AM > > > > To: Honnappa Nagarahalli > > > > Cc: Ananyev, Konstantin ; paulmck@linux.ibm.com; Kovacevic, Marko ; > > > > dev@dpdk.org; Gavin Hu (Arm Technology China) ; Dharmik Thakkar ; Malvika > > Gupta > > > > ; nd > > > > Subject: Re: [PATCH v5 1/3] rcu: add RCU library supporting QSBR mechanism > > > > > > > > On Fri, 12 Apr 2019 22:24:45 +0000 > > > > Honnappa Nagarahalli wrote: > > > > > > > > > > > > > > > > On Fri, 12 Apr 2019 15:20:37 -0500 > > > > > > Honnappa Nagarahalli wrote: > > > > > > > > > > > > > Add RCU library supporting quiescent state based memory reclamation > > > > > > method. > > > > > > > This library helps identify the quiescent state of the reader threads > > > > > > > so that the writers can free the memory associated with the lock less > > > > > > > data structures. > > > > > > > > > > > > > > Signed-off-by: Honnappa Nagarahalli > > > > > > > Reviewed-by: Steve Capper > > > > > > > Reviewed-by: Gavin Hu > > > > > > > Reviewed-by: Ola Liljedahl > > > > > > > Acked-by: Konstantin Ananyev > > > > > > > > > > > > After evaluating long term API/ABI issues, I think you need to get rid of almost > > > > > > all use of inline and visible structures. Yes it might be marginally slower, but > > > > > > you thank me the first time you have to fix something. > > > > > > > > > > > Agree, I was planning on another version to address this (I am yet to take a look at your patch addressing the ABI). > > > > > The structure visibility definitely needs to be addressed. > > > > > For the inline functions, is the plan to convert all the inline functions in DPDK? If yes, I think we need to consider the performance > > > > difference. May be consider L3-fwd application, change all the inline functions in its path and run a test? > > > > > > > > Every function that is not in the direct datapath should not be inline. > > > > Exceptions or things like rx/tx burst, ring enqueue/dequeue, and packet alloc/free > > > > > > Plus synchronization routines: spin/rwlock/barrier, etc. > > > I think rcu should be one of such exceptions - it is just another synchronization mechanism after all > > > (just a bit more sophisticated). > > > Konstantin > > > > If you look at the other userspace RCU, you wil see that the only inlines > > are the rcu_read_lock,rcu_read_unlock and rcu_reference/rcu_assign_pointer. > > > > The synchronization logic is all real functions. > > In fact, I think urcu provides both flavors: > https://github.com/urcu/userspace-rcu/blob/master/include/urcu/static/urcu-qsbr.h > I still don't understand why we have to treat it differently then let say spin-lock/ticket-lock or rwlock. > If we gone all the way to create our own version of rcu, we probably want it to be as fast as possible > (I know that main speedup should come from the fact that readers don't have to wait for writer to finish, but still...) > > Konstantin > Having locking functions inline is already a problem in current releases. The implementation can not be improved without breaking ABI (or doing special workarounds like lock v2)