From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D32E3606A320 for ; Tue, 1 Dec 2026 10:35:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=hkDYEJ6l; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=rMC/2VXO DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=Z8Ixdg5cDyjzuacIgieYObTDt0AlnrcCW7oqELoJ4+c=; b=hkDYEJ6lb0aTF6eIofeCgPcf51 XbwiPNkTWdqwRF3o8wwqpfFb4UWVdUDPc2LaoPpDgOz2BhuZBugKzbAo5Z1YAreCqQc5GY+i1Ew0P HPAxmqD0Ty/hgshN9pUdSrkpDulWIvh3JEKKlxyAWvkVdOUYAHDvbP0LJzlgH8wAoO6Pc5xZPw9ww jro7Js1AAalH9iy2A+8HPCx3SeET3576y31bWBQeeH0enKZgEBAv+jC4Jy+TnBIXfr9uvSW2AP3hz KHzI5+ToqUbAzmTpLmeNYEANlhtta9jKhVr/mK2JIyKLuYYKDaFCswofZNQAokPSuy6ZXT1jJr/Kt syMW0F0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYLCT-00000007Q8X-3Nmm; Tue, 01 Dec 2026 10:35:05 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYLCN-00000007Q73-0op4 for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2026 10:35:04 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C8EE51570; Tue, 1 Dec 2026 02:34:52 -0800 (PST) Received: from localhost (unknown [10.2.196.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 47CB53F86F; Tue, 1 Dec 2026 02:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796121295; bh=aF0dwQZ/PriNBmLoUc0XjX/z6V8ralQTcJK3PoaKDjw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rMC/2VXO6+EnvjN6Yg1VELITMMb8KgeQkx8bf8pQ0Cv2lq539tFfD/8JDLGlX3KOv th7FbyBgEvFqFTJsNBgyhWat8ZK3Z/glHpin2B0XRi23E4WhwfpOBvxchbh5WKst6E NFwcJ+Cy7W2PDFNIVOKb2n5fwJA0b60HIZE9molY= Date: Tue, 1 Dec 2026 10:34:53 +0000 From: Leo Yan To: Will Deacon Cc: Mark Rutland , Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Anshuman Khandual , Mathieu Poirier , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org Subject: Re: [PATCH 1/2] perf: arm_spe: Order padding before publishing AUX head Message-ID: <20261201103453.GQ861809@e132581.arm.com> References: <20261015-add_barriers_for_perf_aux_output_skip-v1-0-5847d0578859@arm.com> <20261015-add_barriers_for_perf_aux_output_skip-v1-1-5847d0578859@arm.com> <20261127211413.GH861809@e132581.arm.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261201_023459_275101_7EF7D48F X-CRM114-Status: GOOD ( 15.51 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, Dec 01, 2026 at 09:34:31AM +0000, Will Deacon wrote: [...] > > > This looks correct to me, but I wonder if it should be handled by > > > perf_aux_output_skip() instead? arm_spe_pmu_pad_buf() is called from a > > > bunch of places in the driver, including in conjunction with > > > perf_aux_output_end(), which looks like it already has the necessary > > > memory barrier. So doing it here seems weird inconsistent to me. > > > > As I mentioned in the cover letter, the choice of barrier depends on the > > CPU memory model and the trace hardware. Perf deliberately leaves that > > choice to the AUX driver [1]. > > No it doesn't. The padding is written using store instructions from the > CPU, so they are ordered just like every other store instruction. Okay, I’ll move the barrier into perf_aux_output_skip(). Thanks, Leo