From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IhjdDMenfWD2dwAAWB0awg (envelope-from ) for ; Mon, 19 Apr 2021 11:54:47 -0400 Received: by simark.ca (Postfix, from userid 112) id 26CB11F104; Mon, 19 Apr 2021 11:54:47 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 955471E813 for ; Mon, 19 Apr 2021 11:54:46 -0400 (EDT) Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4FPBGG1MtZz1Yqd; Mon, 19 Apr 2021 11:54:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1618847686; bh=GZrMJx9PmkDgEr0bXDrunxlMGLpseTjep85hPuxsB7k=; h=Date:To:Cc:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=PJmMN0h3hT3gQQW1NRAZvrn6pnELkgRySLId+whSjOqyYXj7Bu31HMfHkZvwANQVH oZ4JnRzuls1FD2iOyrncSh/yLLVIb0WdVq8HjG4b2Ca0wm5mup2dVfJ1GZcjpLkA68 srwjZix5pzIs6npqN1D7xRpKy2ksBk8iZ3xP/AmgkgnWeZb3BsUKBwB6nTvR/noE07 05Ea40Wo/1ztvbqdc98nQdgZ/iQ/OsN3rGdIYPfYFfJRQKUrAvDzhA6L02LMpFxYOq P3Cl6Hb296vs17ws+nM+Z5qCwsA7pjZgZ6afFFx+5vNlcEP5oAqZFCrMXtO5iWoAQh BImkUFlbk6jAw== Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by lists.lttng.org (Postfix) with ESMTPS id 4FPBGD38FYz1Yqc for ; Mon, 19 Apr 2021 11:54:44 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id DEB862DCC47 for ; Mon, 19 Apr 2021 11:54:38 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id EWc3ilsSvCDY; Mon, 19 Apr 2021 11:54:37 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id DECCC2DCDE1; Mon, 19 Apr 2021 11:54:37 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com DECCC2DCDE1 X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EpZrKNZCokVD; Mon, 19 Apr 2021 11:54:37 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id D368B2DCDD2; Mon, 19 Apr 2021 11:54:37 -0400 (EDT) Date: Mon, 19 Apr 2021 11:54:37 -0400 (EDT) To: Duncan Sands Cc: paulmck , lttng-dev Message-ID: <2073969799.507.1618847677716.JavaMail.zimbra@efficios.com> In-Reply-To: <66ce5b4b-1992-26ab-9d76-e6a30ab2bbba@free.fr> References: <1680415903.81652.1618584736742.JavaMail.zimbra@efficios.com> <0b613c40-24b4-6836-d47b-705ac0e46386@free.fr> <612661965.84539.1618605578871.JavaMail.zimbra@efficios.com> <7972b031-59b9-7fb5-6379-58bcec13a769@free.fr> <1645001619.285.1618846305316.JavaMail.zimbra@efficios.com> <66ce5b4b-1992-26ab-9d76-e6a30ab2bbba@free.fr> MIME-Version: 1.0 X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_4018 (ZimbraWebClient - FF87 (Linux)/8.8.15_GA_4007) Thread-Topic: liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ? Thread-Index: 3nNQj6fp80fiMHHApJwrkbEJTPDwMQ== Subject: Re: [lttng-dev] liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ? X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mathieu Desnoyers via lttng-dev Reply-To: Mathieu Desnoyers Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" ----- On Apr 19, 2021, at 11:41 AM, Duncan Sands baldrick@free.fr wrote: > Hi Mathieu, > > On 4/19/21 5:31 PM, Mathieu Desnoyers wrote: >> ----- On Apr 19, 2021, at 5:41 AM, Duncan Sands baldrick@free.fr wrote: >> >> >>> >>>> Quick question: should we use __atomic_load() or atomic_load_explicit() (C) and >>>> (std::atomic<__typeof__(x)>)(x)).load() (C++) ? >>> >>> If both are available, is there any advantage to using the C++ version when >>> compiling C++? As opposed to using the C11 one for both C and C++? >> >> I recently noticed that using C11/C++11 atomic load explicit is not a good >> fit for rcu_dereference, because we want the type to be a pointer, not an >> _Atomic type. gcc appears to accept a looser typing, but clang has issues >> trying to build that code. > > in the long run maybe the original variables should be declared with the > appropriate atomic type from the get-go. Considering that rcu_dereference is public API, we would have to wait until we do a major soname ABI bump _and_ an API break to do that, which I am very reluctant to do, especially for the API break part. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev