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=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 CD0A9C433C1 for ; Mon, 22 Mar 2021 18:51:35 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 651BE6195D for ; Mon, 22 Mar 2021 18:51:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 651BE6195D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de 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=desiato.20200630; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ljx4VdQ1Rm9WzZvWLVBZMJeO6saZfXJOIYUH8hJOduU=; b=mqlNr3X853O9IjP4HS1naiUld 1Kqv628ksdsXjRLadfKfXwKMpD0eVWoCt8pobfRfgEB9HQWWhd+2kiFMMDtvJkhWlGckKUK5Wrii3 YIDkbthCdwZJSiOd+v9DZoTotq1dNlbk/Q0R4uhRsBescSko78nocmFVK/qEoPkOfYklT5xn6kU+6 aeyJgFHkuYt0X1njCTcGL4y4k4w0tEF5Xb5R53CvDUy6mjWZPckwCv7oqUNdzlv6o4gv/kCr+9I5h ZhoCUTADDuP0TvXaEYc8jte2cxEITtGesDKZ9YImQ+dRFBtpOue1BQX7Nw1KCouKce+fvWM1TC060 Ob0hgAUgw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOPcq-00CJay-00; Mon, 22 Mar 2021 18:50:04 +0000 Received: from mx2.suse.de ([195.135.220.15]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOPba-00CIvk-5G for linux-arm-kernel@lists.infradead.org; Mon, 22 Mar 2021 18:48:48 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D087DAD80; Mon, 22 Mar 2021 18:48:44 +0000 (UTC) Message-ID: Subject: Re: [PATCH v3 2/2] arm64: mm: reserve CMA and crashkernel in ZONE_DMA32 From: Nicolas Saenz Julienne To: Jon Masters , catalin.marinas@arm.com, linux-kernel@vger.kernel.org Cc: Qian Cai , Will Deacon , linux-arm-kernel@lists.infradead.org Date: Mon, 22 Mar 2021 19:48:43 +0100 In-Reply-To: References: <20191107095611.18429-1-nsaenzjulienne@suse.de> <20191107095611.18429-3-nsaenzjulienne@suse.de> <4f094513-507d-566d-a0e2-a30ea36f64c9@jonmasters.org> User-Agent: Evolution 3.38.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210322_184846_503315_74E46D3A X-CRM114-Status: GOOD ( 26.64 ) 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: multipart/mixed; boundary="===============7127413650391424668==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7127413650391424668== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-9iHYFcF7AG5JS/g9N0on" --=-9iHYFcF7AG5JS/g9N0on Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2021-03-22 at 14:40 -0400, Jon Masters wrote: > On 3/22/21 2:34 PM, Jon Masters wrote: > > Hi Nicolas, > >=20 > > On 11/7/19 4:56 AM, Nicolas Saenz Julienne wrote: > > > With the introduction of ZONE_DMA in arm64 we moved the default CMA a= nd > > > crashkernel reservation into that area. This caused a regression on b= ig > > > machines that need big CMA and crashkernel reservations. Note that > > > ZONE_DMA is only 1GB big. > > >=20 > > > Restore the previous behavior as the wide majority of devices are OK > > > with reserving these in ZONE_DMA32. The ones that need them in ZONE_D= MA > > > will configure it explicitly. > > >=20 > > > Reported-by: Qian Cai > > > Signed-off-by: Nicolas Saenz Julienne > > > --- > > > =C2=A0 arch/arm64/mm/init.c | 4 ++-- > > > =C2=A0 1 file changed, 2 insertions(+), 2 deletions(-) > > >=20 > > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > > > index 580d1052ac34..8385d3c0733f 100644 > > > --- a/arch/arm64/mm/init.c > > > +++ b/arch/arm64/mm/init.c > > > @@ -88,7 +88,7 @@ static void __init reserve_crashkernel(void) > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (crash_base =3D=3D 0) { > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Current arm= 64 boot protocol requires 2MB alignment */ > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 crash_base =3D memblock_f= ind_in_range(0, ARCH_LOW_ADDRESS_LIMIT, > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 crash_base =3D memblock_f= ind_in_range(0, arm64_dma32_phys_limit, > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 crash_size, SZ_2M); > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (crash_base= =3D=3D 0) { > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 pr_warn("cannot allocate crashkernel (size:0x%llx)\n", > > > @@ -454,7 +454,7 @@ void __init arm64_memblock_init(void) > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 high_memory =3D __va(memblock_end_of_D= RAM() - 1) + 1; > > > -=C2=A0=C2=A0=C2=A0 dma_contiguous_reserve(arm64_dma_phys_limit ? := =20 > > > arm64_dma32_phys_limit); > > > +=C2=A0=C2=A0=C2=A0 dma_contiguous_reserve(arm64_dma32_phys_limit); > > > =C2=A0 } > > > =C2=A0 void __init bootmem_init(void) > >=20 > > Can we get a bit more of a backstory about what the regression was on= =20 > > larger machines? If the 32-bit DMA region is too small, but the machine= =20 > > otherwise has plenty of memory, the crashkernel reservation will fail.= =20 > > Most e.g. enterprise users aren't going to respond to that situation by= =20 > > determining the placement manually, they'll just not have a crashkernel= . >=20 > Nevermind, looks like Catalin already changed this logic in Jan 2021 by= =20 > removing arm64_dma32_phys_limit and I'm out of date. Also see this series (already merged): https://lore.kernel.org/linux-arm-kernel/20201119175400.9995-1-nsaenzjulien= ne@suse.de/ Regads, Nicolas --=-9iHYFcF7AG5JS/g9N0on Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAmBY5osACgkQlfZmHno8 x/5wPAf/WA4vj1kbrX0NtO4qTprFN/IA4jdplzDtN3CTgiXbuscV6xJjsbby0l7B aq73lCWc7WDGlUdg92a3tBc3VwcAngl2Hl/HwSD36Gj1EHkFzF0BY/AGgs6sy7FI 4vQk/EjKja5Wqe9OI9urmoP0J6hgcreNaROxldg0NzGH5iop/sdX5T7PtBK6yO1D YKarQbCuke2PP5CTJzfKDaaJ7kuXQWCe7bBlrlKbqZftZbd68DbHD0Viis5A5Wfj sny7asDVXjiVWEX688VANHnAeUnJJprPheU67vTlD9n8tqRxqpmEeDvE3V3clph3 QFCQLxKnmArwDaHhNM3raRFLJphGkw== =M3gO -----END PGP SIGNATURE----- --=-9iHYFcF7AG5JS/g9N0on-- --===============7127413650391424668== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7127413650391424668==--