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,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 EE94CC4708F for ; Tue, 1 Jun 2021 10:15:27 +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 AC2E761396 for ; Tue, 1 Jun 2021 10:15:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC2E761396 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=cVdchGcKKuVTgWjoyX5ZDX8ToI+ABG6R7OHTC+AuqvM=; b=CLK2sEU8b7ioJq VBSQcZcqOLj9H4Nu90s5OMTX9uT4ycxE48BVfjmJCzZa0yVBLqaO4tR/TGUEmSpVvjZPLpM2vwrSl d3PkMOAq9GFnkTOSvrGx4oDX5eRY3WjMYfgHphnoXTNPS4RsHAZA/Cz8AGx6fb2tCgFa1P3AhB9AT LTILOjWvwtpRXy8kTE2yqkeQmUatYP60PA5wMityGPACPVwfN/WkGvRT1KDntaX8KFT/zbNtBU4BX FQowwYgQ6AXdnr60CVDV9e9mrPEghzljQnKpnnXqiBshDIUnEQZ5McDJV1/uzmVzMR1ARCf1O6MUX TdZVTHGilIFmt1c1iQqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo1Pd-00Fohj-3r; Tue, 01 Jun 2021 10:14:17 +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 1lo1PZ-00Fogo-67 for linux-arm-kernel@lists.infradead.org; Tue, 01 Jun 2021 10:14:14 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2BF466139A; Tue, 1 Jun 2021 10:14:11 +0000 (UTC) Date: Tue, 1 Jun 2021 11:14:08 +0100 From: Catalin Marinas To: Arnd Bergmann Cc: Mark Rutland , Will Deacon , Linux ARM , Android Kernel Team , Ard Biesheuvel , Vincent Whitchurch Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) Message-ID: <20210601101408.GA29312@arm.com> References: <20210527124356.22367-1-will@kernel.org> <20210527131900.GA37050@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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-20210601_031413_267414_0BD8861C X-CRM114-Status: GOOD ( 18.36 ) 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 Fri, May 28, 2021 at 11:35:32AM +0200, Arnd Bergmann wrote: > On Thu, May 27, 2021 at 3:19 PM Mark Rutland wrote: > > > 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. > > > > The rationale above makes sense to me, so: > > > > Acked-by: Mark Rutland > > I think it would make sense to go even further than this in the > future, and allow > setting a smaller minimum alignment depending what hardware is detected > at boot time. Yeah, we talked about this in the past. The problem is that very early the kernel doesn't know whether it'll have devices that require non-coherent DMA. So we'd probably need to start with a 64 byte ARCH_DMA_MINALIGN and populate the slab caches slightly later once the kernel learns more about the system it's running on. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel