From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E80403064AF for ; Mon, 24 Nov 2025 13:38:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763991511; cv=none; b=BWJgXzkgESvTyy2Qc/HEX2cmCy8wypqInRUyT0h/LDLCU23BirbP3T7IYKY7UZlP7OouAwGod8+lMy+NfVTapwTfkMewgGuThNccOCHNgqPmkb/eaQsguxBi8DN+pVXBL57MaLce4YbisU4FgrmtR6FflUb/Hw8pf4gx/41DWS8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763991511; c=relaxed/simple; bh=B3XxBWJfthTej/qaAy/mzipRhOyNUi8ahgoYJf5vnms=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lFHYBkqjMXJfro9QCLJiRO5H3ARI0yFACEGMXa9M2oGoJgCk/s1xGQF9DY4/p2HPNJx+qrII7ml01PJIUC1z6SIqO1MlEdLLftE18hsg92T9Rk5OQyfWQ4d3g8ox3tPxPKu0YSVlIN+4VsmEKNrRFO2r1R3MSqVbLVHqyeFfp5c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m3h78+Or; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m3h78+Or" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E929C4CEF1; Mon, 24 Nov 2025 13:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763991510; bh=B3XxBWJfthTej/qaAy/mzipRhOyNUi8ahgoYJf5vnms=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m3h78+Orb7KyZeoZDFEzQ1zvbY37167Fsft0+oJzz4aIL13eeiTC9HWmrsBRBAuWs 1wVM8MO2IjiT6G8UFXawUpHg4bSdnHkFaop6OI/ogGC1m9eWp2T5taMVQtBfAW8hXL XBCRQxgQulHJcBg987zerjLNmBbEQVuAwBS55mSuoPX7F1aiW5vSUhpwdl6TCsqlfH 7356thh+tPjfglTqt0ArOsCBXZjRdYalxfIw5k0MyhXxmN9Kiovk/DIJPioRRra3Eq 1wHfsjUs9/mF+1YOQfsZu4AiECVUN3K50MNayLfP42to7xWlJ+8WPd6pmHnTvmrRnm DLBFXCq+x810w== Date: Mon, 24 Nov 2025 13:38:25 +0000 From: Will Deacon To: Luke Yang Cc: Catalin Marinas , Jirka Hladky , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joe Mario Subject: Re: [PATCH] arm64: clear_user: align __arch_clear_user() to 128B for I-cache efficiency Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Nov 21, 2025 at 12:04:55AM -0500, Luke Yang wrote: > On aarch64 kernels, recent changes (specifically irqbypass patch > https://lore.kernel.org/all/20250516230734.2564775-6-seanjc@google.com/) > shifted __arch_clear_user() such that the tight zeroing loop straddles > I-cache lines. This causes measurable read performance regression when > reading from /dev/zero. > > Add `.p2align 6` (64-byte alignment) to guarantee the loop stays within a > single I-cache boundary, restoring the previous IPC and throughput. Hmm, but what's special about __arch_clear_user()? If we make this change, anybody could surely make similar arguments for other functions on their hot paths? Amusingly, there's CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B to play around with that and it sounds like the irqbyass change you cite calls into the category of changes highlighted by the Kconfig text. Will