From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id lkPZEG+4GGRARhUAWB0awg (envelope-from ) for ; Mon, 20 Mar 2023 15:47:59 -0400 Received: by simark.ca (Postfix, from userid 112) id 327DD1E223; Mon, 20 Mar 2023 15:47:59 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=hJGk2lpd; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2F0D61E0D3 for ; Mon, 20 Mar 2023 15:47:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1679341677; bh=pxyy13WyQCZepZ1uNTe+URjtQOAVtFz+0ZUIDvLHMr4=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hJGk2lpduJ4COTwKVqDOCyg8tVozYtXBk6FFXhHpyFg3zZ2RqcvWwYQzgHr3xY2Cl 8epQhq/ZP+lGCH5X4D2gveoyeMdZEDiyEl8+qdeTZzqDX8uRlGVOe/DcmsiZDa+DSh 78Sl/G0FQtAdgsGGYjbm2lVWVdRAc4c8SIQ1V5sED6xXcZ1R0kArhReZh/E5MnxnNy vG7fo/v0oH03R1wEGZ4MW7KZ2tMP9dxoHMrKnKLcY+863xqzCoB9LelmFsDjRlYCTN 07sBw6LsCuiCPHUqoviKlZMJVj0XVF41ZlYF3WeeGDmIHuQFtiaKO7STz6JbONokKV tjx8jzuD08tEg== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4PgQJF3vg5z2Dkf; Mon, 20 Mar 2023 15:47:57 -0400 (EDT) Received: from smtpfb1-g21.free.fr (smtpfb1-g21.free.fr [212.27.42.9]) by lists.lttng.org (Postfix) with ESMTP id 4PgQJC20sSz2DbF for ; Mon, 20 Mar 2023 15:47:54 -0400 (EDT) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by smtpfb1-g21.free.fr (Postfix) with ESMTP id 52B64DF8EE5 for ; Mon, 20 Mar 2023 20:39:37 +0100 (CET) Received: from [IPV6:2a01:e0a:255:1000:d6dc:f705:ee77:618b] (unknown [IPv6:2a01:e0a:255:1000:d6dc:f705:ee77:618b]) (Authenticated sender: duncan.sands@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 61F192003CE for ; Mon, 20 Mar 2023 20:38:59 +0100 (CET) Message-ID: Date: Mon, 20 Mar 2023 20:38:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-GB To: lttng-dev@lists.lttng.org References: <20230317213755.455957-1-ondrej@sury.org> <20230317213755.455957-3-ondrej@sury.org> <6d73ed33-f3fc-2459-a7e9-142b8908ad4f@efficios.com> In-Reply-To: <6d73ed33-f3fc-2459-a7e9-142b8908ad4f@efficios.com> Subject: Re: [lttng-dev] [PATCH 2/7] Use gcc __atomic builtis for implementation X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Duncan Sands via lttng-dev Reply-To: Duncan Sands Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" Hi Mathieu, > While OK for the general case, I would recommend that we immediately implement > something more efficient on x86 32/64 which takes into account that > __ATOMIC_ACQ_REL atomic operations are implemented with LOCK prefixed atomic > ops, which imply the barrier already, leaving the before/after_uatomic_*() as > no-ops. maybe first check whether the GCC optimizers merge them. I believe some optimizations of atomic primitives are allowed and implemented, but I couldn't say which ones. Best wishes, Duncan. _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev