Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3313834pxj; Tue, 1 Jun 2021 02:19:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhWII5xzYaYzLodvbvKUXqE+I/YMN3Zqm22oIOfHJXRyxaBnuArkCXFYkJkspFYWeTZjvI X-Received: by 2002:a02:a316:: with SMTP id q22mr23848358jai.26.1622539194389; Tue, 01 Jun 2021 02:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622539194; cv=none; d=google.com; s=arc-20160816; b=kRbgWypbUJuRrdjBw5fr+N7AandGSMXLfvYKShXfU+wxa9RN32ugBZok9Gp3G9rjga SNBKt4H+HjprAT7Dv9K/YGregVpP7F0QaZUDYdmO9rZWJfcF76j4MUgLqsHCk0+XOiFy XE1QWyct5/kUGwcelkfTQq8GjVWiMnL6+8/e+tUShHooakN982gi8h2SlfGJH7Jhd9qu /PrzV5KPGjWRWj/7agPn78UVORvbKgrXJMWndctmZr5KbmOaFdnt/ZCxXBXHvcbzu/Dq Yvh4dSjVQPF2oh/OO9NYg2zUq/LU+k1o5F03BRl/aydiwlqypPKeEqYsFFmozRiFxkzK dddQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5rmhQAIMRhc0/LXllKDO9MjTjuKbppvLAxt/fqIeNe0=; b=Y7bj2y6MA92qijnbGvT6zfq+5rz3iCm5ANsP7QO5Dyd93uKs/NcEGCZjtzDAEDM6SY Jh5sx6YlwxXlqwUuo06sMB3wUEO9zC1exnmhjq5eS3V8VEG6zvrLG85kPf5JCym0svxq LL1hUCORF1ovlXaO+vpF/TVxsKtx7XQ8a2HrHcNOnRE1eTP1rtAXSlPtd+ewSaBmBadY RJ4usbqYX7gvIsle9SEdkA0b6yOutUkmkuXN3kGpDA6vGZs0R1QkRvyXHBGnUJ3o9tV9 +EeT/VA6aCyIFq8TKkflrLye8ToBwEc66ccAuRSvXSc4m9APwHdnPSK8k5qbjxH4yfX8 KEEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bP1CJz4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l23si15275338jas.94.2021.06.01.02.19.41; Tue, 01 Jun 2021 02:19:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bP1CJz4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233252AbhFAJTo (ORCPT + 99 others); Tue, 1 Jun 2021 05:19:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232869AbhFAJTn (ORCPT ); Tue, 1 Jun 2021 05:19:43 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8746DC061574; Tue, 1 Jun 2021 02:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5rmhQAIMRhc0/LXllKDO9MjTjuKbppvLAxt/fqIeNe0=; b=bP1CJz4s1PkNBLaGcX+yW6zHu/ 1XXqpeUi1pFJ0EhIDBh9vZT/LxvjJbWeut6it+HG1Ryxaugdn1PbwdYhctNtsD4068Vc+LBMIdO6r l/7VFWM/DF4rMUG3x2GD552/ujSDdEcCmkFG0H0wgMJehmEDhXUNtjgANz9frQyFzYshxfljS2HuU HfYKbYV8vHjIECJwueJKKTGv2jLJMbvqjIuy7pm9xjpSiknQmLlHgbzKYlon/ThFzaG1b80fbK3SO sLZZhS1e7UdMvvJDCPIM3qDhm4lzWxeWjjhIw3C8rpWRAvU+a2Cenn/trEKvjEb7Rybhq5sbBUUKQ qof1GGTA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo0Wr-002W26-SI; Tue, 01 Jun 2021 09:17:48 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (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) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id F3E8E30019C; Tue, 1 Jun 2021 11:17:46 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D72032011CA24; Tue, 1 Jun 2021 11:17:46 +0200 (CEST) Date: Tue, 1 Jun 2021 11:17:46 +0200 From: Peter Zijlstra To: Adrian Hunter Cc: Leo Yan , Arnaldo Carvalho de Melo , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , Andi Kleen , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/2] perf auxtrace: Optimize barriers with load-acquire and store-release Message-ID: References: <20210519140319.1673043-1-leo.yan@linaro.org> <20210519140319.1673043-2-leo.yan@linaro.org> <20210531151049.GE9324@leoy-ThinkPad-X240s> <20210601063342.GB10026@leoy-ThinkPad-X240s> <71b0e395-0e20-fdd1-b105-0ca1706c8ed1@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <71b0e395-0e20-fdd1-b105-0ca1706c8ed1@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 01, 2021 at 12:07:31PM +0300, Adrian Hunter wrote: > __sync_xxx_compare_and_swap is out-of-date now. This page: > > https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins > > recommends '__atomic' builtins instead. perf doesn't seem to use that. > Since atomics are needed only for the "compat" case (i.e. 32-bit perf with 64-bit kernel) > you could try to find an elegant way to check for a 64-bit kernel, and avoid the atomics > for a 32-bit perf with 32-bit kernel. Most 32bit archs cannot do 64bit atomics. I suppose the only reason this doesn't explode is because the aux stuff isn't supported on many architectures?