From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796121297; b=PD4f+USVKX/tXaHzUYIGMjsxg9RzaDDFXG/BbmZ1g1frcI1oNzdeMH0DpmPsFZ+r3neC e7AdCTXnwMv8G2fu8wNV3C3TLqAeu6AFSHS2TnidnC43D8GPJlzwqZnapBmh3Qnphu3ZE LhvakhCjvI9owVqJjvo4meWGRrdh59vbOXzinJE8QJtAP2AiZSL6MUWxJpW+zuJGBzsuf lLH7cCA68OqX0TEhjY/0spaIODDAKnTUQL0Wl1mkHT4OY4O5YAAnFGFmkQZxzsXJ8SJdU 3xIBzifTUClTufLGCEVCvwy/sn+rZELQHNWTpCD7NICXkJn9PZ2hhejxnokwETwajeA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796121297; h=DMARC-Filter:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; bh=Z8Ixdg5cDyjzuacIgieYObTDt0AlnrcCW7oqELoJ4+c=; b=welz2NU85wKm31JtnSCUVc0hu/y3c/D9m0+Xx3qE718YOFiAfLTQczWNTNPgg4cD04yd zVctc1Yxsaa15cFmbt5ITNUqyJGf/N/a42P8IesZlAcRxfMPPRRL2FtzL4WtPPnNFoXz9 wO8E1uxfiC0C1rhth/+t7JqH/4vTCorxOpNRFP9aDTK6oztq4++IrmobiAO1YTFCQUr3+ 5GgUsOE773Os9h9wOuaGSSu72vNE8wZJr25sM2Tmi4k/uaReWxiaF3KhQ9hdgtlaqzxf/ N7ghVRAq3VTqWbUn+NN6vhqlvAY9jaQ94D2FZhZnOMih6YG5mtZpgXrW8MJmlyGnFGQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b="rMC/2VXO"; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AABA4606A31A; Tue, 1 Dec 2026 10:34:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AABA4606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=rMC/2VXO 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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