From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E806A00C2; Sat, 25 Apr 2020 19:17:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C16201C199; Sat, 25 Apr 2020 19:17:48 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id BDE9F1C198 for ; Sat, 25 Apr 2020 19:17:47 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 046675C0179; Sat, 25 Apr 2020 13:17:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sat, 25 Apr 2020 13:17:46 -0400 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=fm1; bh= ymOFVj8ildLz46aMu8fXS6JPQrtEDvLJPK3h65GIUYo=; b=hlKNlIWjnEYxBPk0 WjYfdhZnn/5/NrVj7IptNNBSpEVzSs/gCj7CskNuYNjDWrBSsd1MOaBd/IBImfC3 5t8lnFoJ2EY0jj/U2kKh6cJApHJ1m+E+8ZRPIUv3F5nHKw0oBjyGcrkZ+Ozi0k77 /fM6czsXtHe7F1M/gtjoJQXLpX3s/ZDuJjk9mXH4/En0Vh0Z8Czz/FuaEAhwmR9t GfMTmgWlVO/SKBCphXdMDJY9v0OEyGIv7xx9kYxHpa1OnVrQZ7xnux8GwKfD7R67 ue6ZmtWeAWR2YqWkRUZEmHX92XxQ0uxIGM1cTnNLtx+GXcgiKj2ovekxk1cjbWFZ lixeJA== 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=fm2; bh=ymOFVj8ildLz46aMu8fXS6JPQrtEDvLJPK3h65GIU Yo=; b=XnXg06OsmZokiaGG7GOh6qW1mHp2UwaaF6GIT5c6xfVEoB9JRqQtQeDwM ElAebACGnxgP5Kr+VJhIYe3k9Cwdp7DM/PxnY6KNWN7OIRrFiG5GUeBMYjVx35Oq 150NzzN8gPKVwc5R7u+mxt/YkTpxUBzOGsjh9G/nfYkdoOhbrASn1x7kvVpUxh9u HbFJrmy/Gh7Zk+tF7pqNk3Z1xuNTOcXr5EMIja8iMlNvbpqVBCYeo6lKczGnZCSS ctmyGZUFT58wRAaAVBewUX2YXuFKEh4UAVEYQ5izIrF85z2lo0JRUKWUFNq+Dcc2 pJQNJHtZegUL7hAKP1gzFXyUDiSgg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheeggdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucffoh hmrghinhephhhurghrmhdrtghomhenucfkphepjeejrddufeegrddvtdefrddukeegnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrg hssehmohhnjhgrlhhonhdrnhgvth 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 2982A3065D82; Sat, 25 Apr 2020 13:17:44 -0400 (EDT) From: Thomas Monjalon To: Phil Yang Cc: erik.g.carrillo@intel.com, rsanford@akamai.com, dev@dpdk.org, david.marchand@redhat.com, Honnappa.Nagarahalli@arm.com, Gavin.Hu@arm.com, nd@arm.com Date: Sat, 25 Apr 2020 19:17:43 +0200 Message-ID: <1873559.ZhSLo9btvA@thomas> In-Reply-To: <1587713042-527-1-git-send-email-phil.yang@arm.com> References: <1587398752-9345-1-git-send-email-phil.yang@arm.com> <1587713042-527-1-git-send-email-phil.yang@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status update 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" 24/04/2020 09:24, Phil Yang: > Volatile has no ordering semantics. The rte_timer structure defines > timer status as a volatile variable and uses the rte_r/wmb barrier > to guarantee inter-thread visibility. > > This patch optimized the volatile operation with c11 atomic operations > and one-way barrier to save the performance penalty. According to the > timer_perf_autotest benchmarking results, this patch can uplift 10%~16% > timer appending performance, 3%~20% timer resetting performance and 45% > timer callbacks scheduling performance on aarch64 and no loss in > performance for x86. > > Suggested-by: Honnappa Nagarahalli > Signed-off-by: Phil Yang > Reviewed-by: Gavin Hu > Acked-by: Erik Gabriel Carrillo [...] > --- a/lib/librte_timer/rte_timer.h > +++ b/lib/librte_timer/rte_timer.h > @@ -101,7 +101,7 @@ struct rte_timer > - volatile union rte_timer_status status; /**< Status of timer. */ > + union rte_timer_status status; /**< Status of timer. */ Unfortunately, I cannot merge this patch because it breaks the ABI: [C]'function void rte_timer_init(rte_timer*)' at rte_timer.c:214:1 has some indirect sub-type changes: parameter 1 of type 'rte_timer*' has sub-type changes: in pointed to type 'struct rte_timer' at rte_timer.h:100:1: type size hasn't changed 1 data member changes (2 filtered): type of 'volatile rte_timer_status rte_timer::status' changed: entity changed from 'volatile rte_timer_status' to 'union rte_timer_status' at rte_timer.h:67:1 type size hasn't changed