From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1EA7C4707F for ; Thu, 27 May 2021 13:15:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86693613AC for ; Thu, 27 May 2021 13:15:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86693613AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To: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-Owner; bh=kfpA6GliS66XwETnqMiQ9OBjcSa+ZLmLmW6t18xhTJE=; b=BrNzsL2YwdpD5x bGFtFpeTFncy9s1no+Pr7FLF+Clqbm5l+faDVm48CV2JnHsgewnhJJuOJ2c8Zy82mu5mSnAkVgij3 PSNYwyZWAlRnfF3ccKeO5bAk7ChbTNVW0R4FKQA01af0EmRo72rN5GPiZDFJv/utwBZx00bk7eMZI Gk0UPPBotvFqS6FBC9BSD5ii0IggP4jCmC82/ZA22sCJsoI7IlAdCr4CQKO8PMqORxZlt7mA2tW1v opUI6PZ+dOLwzO3TTrIOXwKweg0MjR/7hGwrj3UjG6qm/m9D7t4qIiSe+UQ+4eEmIWsQfEFND4wXv qQrtEceWTe24fCW2VK5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmFoM-0066j2-HE; Thu, 27 May 2021 13:12:35 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmFnJ-00661Y-9n for linux-arm-kernel@lists.infradead.org; Thu, 27 May 2021 13:11:28 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 52385613AB; Thu, 27 May 2021 13:11:23 +0000 (UTC) Date: Thu, 27 May 2021 14:11:20 +0100 From: Catalin Marinas To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, kernel-team@android.com, Mark Rutland , Ard Biesheuvel , Arnd Bergmann , Vincent Whitchurch Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) Message-ID: <20210527131120.GB8661@arm.com> References: <20210527124356.22367-1-will@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210527124356.22367-1-will@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_061125_417141_D4C1D865 X-CRM114-Status: GOOD ( 18.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 27, 2021 at 01:43:56PM +0100, Will Deacon wrote: > Back in 97303480753e ("arm64: Increase the max granular size"), > ARCH_DMA_MINALIGN was effectively increased to 128 bytes thanks to an > increase in L1_CACHE_BYTES due to an unsubstantiated performance claim > on the now obsolete ThunderX-1. Although this was reverted in > d93277b9839b, ARCH_DMA_MINALIGN was kept at 128 bytes by ebc7e21e0fa2 > ("arm64: Increase ARCH_DMA_MINALIGN to 128"). > > During discussion of the original patch, it was reported that the change > also prevented a warning during boot on (again, now obsolete) Qualcomm > server hardware where the cache writeback granule was larger than 64 > bytes. The reason for this warning was because non-coherent DMA could > lead to data corruption due to unexpected writeback from the CPU where a > cacheline is shared with other allocations. > > Since then, systems have appeared with larger cachelines still, and so > commit 8f5c9037a55b ("arm64/mm: Correct the cache line size warning with > non coherent device") reworked the warning so that it only appears on > systems where non-coherent DMA is actually required and taints the > kernel with TAINT_CPU_OUT_OF_SPEC. We are not aware of any systems, even > including the aforementioned obsolete machines, which have a CWG larger > than 64 bytes and require non-coherent DMA. > > More recently, it has been reported that a ARCH_DMA_MINALIGN of 128 > bytes wastes considerable memory (~6% immediately after boot on one > system). > > Reduce ARCH_DMA_MINALIGN to 64 bytes and allow the warning/taint to > indicate if there are machines that unknowingly rely on this. > > Cc: Catalin Marinas > Cc: Mark Rutland > Cc: Ard Biesheuvel > Cc: Arnd Bergmann > Cc: Vincent Whitchurch > Link: https://lore.kernel.org/linux-arm-kernel/1442944788-17254-1-git-send-email-rric@kernel.org/ > Link: https://lore.kernel.org/linux-arm-kernel/CAOZdJXUiRMAguDV+HEJqPg57MyBNqEcTyaH+ya=U93NHb-pdJA@mail.gmail.com/ > Link: https://lore.kernel.org/linux-arm-kernel/20190614131141.4428-1-msys.mizuma@gmail.com/ > Link: https://lore.kernel.org/r/20210517074332.28280-1-vincent.whitchurch@axis.com > Signed-off-by: Will Deacon Unless we hear from anyone that the warning is triggered, I think we should change this in mainline. Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel