From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D7DCEA0C40; Sun, 4 Jul 2021 02:40:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5EF2F40040; Sun, 4 Jul 2021 02:40:51 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id DD31D4003F for ; Sun, 4 Jul 2021 02:40:49 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7DFD95C00A9; Sat, 3 Jul 2021 20:40:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 03 Jul 2021 20:40:49 -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= lYc86KQPBHlQyof7DBx7csNbv5hq/02celuYEg+GMoc=; b=RBVKdpD/13YnXkre V5l5js1l3M0rSAwqlD7ZSrLP/rFpf9kTmbzIkUE9d4io0zhnYkZgfN/2dF9xHyXR FZO1yd+TwZ5sHK0PH07whvoo4DvPOOATyKAp4jG67droYmGoZPHVpAiggxD4g/f+ oW3m34mN5bYX54daelZPd6hqDPEIhEBbrQRwA/BiKhb6Ef0IGawoo2RztuDR8A/y mJjKCBxPbOiFogGTsdJ1vnvStdBy47E19d9b7VHp2OCwSOs4rvvHlJ3gAQRgwbOm CA3+aAX/ICxZfMuVk8QkhaH5PRPv0+zBTPC8KsMk6uM8sVkBJK/qlUoOjeHblynU /BTYAQ== 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=fm3; bh=lYc86KQPBHlQyof7DBx7csNbv5hq/02celuYEg+GM oc=; b=DEtVtZdgmd3YgFM/nOeTlR9hQGJGz6FASz27ZK6kjk309dvNcngKvtEMf XWxfItBGgusap4smuMU16Ub2xQTToTLBi2SFKtvvCiIHkDhGieSGLNqAtjQHEW4N CU5L0ldGaYpCp+GlK2nJAqZbgCH7Ol625QdYzDKY8Yn3Lp8wfrpqnrpqDLt3TFoX GlGEndGaUXovyM6exnl41pjCaswuo1ylPe0SVk8bO0glFf8aPh7RJV8dgnWmtAaJ n3PnItU+YqlGjI15LBIWxst6Y0gWH0dxPG8ls5BmHlaeeSTlPC9F4evl4l505v6j 9QfI2j+zKvY06eCecFqTDEtfy2z6Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeejuddgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepffdvffejueetleefieeludduuefgteejleevfeekjeefieegheet ffdvkeefgedunecuffhomhgrihhnpeguphgukhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn rdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 3 Jul 2021 20:40:47 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com, Phil Yang , bruce.richardson@intel.com, konstantin.ananyev@intel.com, dev@dpdk.org, david.marchand@redhat.com, David Christensen Date: Sun, 04 Jul 2021 02:40:45 +0200 Message-ID: <1736883.HvhGVPZ4tG@thomas> In-Reply-To: <20210703103041.31ee7456@hermes.local> References: <1879045.6WiRxTbeAL@thomas> <20210703103041.31ee7456@hermes.local> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] atomic operations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 03/07/2021 19:30, Stephen Hemminger: > Thomas Monjalon wrote: > > It is very difficult to find which wrapper to use. > > > > This is the guide we have: > > https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html#locks-and-atomic-operations > > There are 2 blog posts: > > https://www.dpdk.org/blog/2021/03/26/dpdk-adopts-the-c11-memory-model/ > > https://www.dpdk.org/blog/2021/06/09/reader-writer-concurrency/ > > > > Basically it says we should use "__atomic builtins" but there is example > > for simple situations like counters, memory barriers, etc. > > Please who could work on improving the documentation? > > Maybe there needs to be a DPDK version of the infamous kernel documentation > of memory barriers. No need to provide the whole theory. We can link to good resources like the kernel documentation you mention, and insist on which function we should use in DPDK, and explain why/when.