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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 B5995C433DB for ; Thu, 7 Jan 2021 18:37:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6EBAD233CE for ; Thu, 7 Jan 2021 18:37:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EBAD233CE 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=M7IVlv3plxlOzkPVG4iYRNXvP2BdrB06lH51HtclD20=; b=nMnbKRzbtcr+oNyknhWbgY0gE +AruWVw6wQR2M1RJQp0eL7CMC/oRxkkBQwO0m3Ct4ZQuq2dxiDtc/fYdp+4vw27r9j1UpB5MZ9FNo rODS5gUDlR1DkOhW+NAo03AK/LpNW7I/N1urEiUO6CC/7oCoPTbSsPv3Pswa03tc1PbruazAirZq5 xobY064qjcX6rtMlow7sUPUeqFJitSjq2cWhWIm14ESBt5jwjGHHP0OnkI6PqZf/uE9uqtEszqwJR gY1qMPlJUtftxV6Q3BOS24M6JmLmnv3KaaHgbQPrX3kBqVeMcvdcY6aFI8RdwPjov2gyyIst2NnvK PnBErdsPg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxa6r-00041g-QL; Thu, 07 Jan 2021 18:34:09 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxa6o-00041B-R0 for linux-arm-kernel@lists.infradead.org; Thu, 07 Jan 2021 18:34:07 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id DEFED233CF; Thu, 7 Jan 2021 18:34:03 +0000 (UTC) Date: Thu, 7 Jan 2021 18:34:01 +0000 From: Catalin Marinas To: chenzhou Subject: Re: [PATCH 2/2] arm64: mm: fix kdump broken with ZONE_DMA reintroduced Message-ID: <20210107183400.GB26159@gaia> References: <20201226033557.116251-1-chenzhou10@huawei.com> <20201226033557.116251-3-chenzhou10@huawei.com> <653d43ed326e6a3974660c0ca2ad8a847a4ff986.camel@suse.de> 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-20210107_133406_979343_83DDBCE9 X-CRM114-Status: GOOD ( 17.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: song.bao.hua@hisilicon.com, xiexiuqi@huawei.com, linux-kernel@vger.kernel.org, rppt@kernel.org, huawei.libin@huawei.com, akpm@linux-foundation.org, will@kernel.org, ardb@kernel.org, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org 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 Mon, Dec 28, 2020 at 03:32:35PM +0800, chenzhou wrote: > On 2020/12/26 18:34, Nicolas Saenz Julienne wrote: > > On Sat, 2020-12-26 at 11:35 +0800, Chen Zhou wrote: > >> If the memory reserved for crash dump kernel falled in ZONE_DMA32, > >> the devices in crash dump kernel need to use ZONE_DMA will alloc fail. > >> > >> Fix this by reserving low memory in ZONE_DMA if CONFIG_ZONE_DMA is > >> enabled, otherwise, reserving in ZONE_DMA32. > >> > >> Fixes: bff3b04460a8 ("arm64: mm: reserve CMA and crashkernel in ZONE_DMA32") > > I'm not so sure this counts as a fix, if someone backports it it'll probably > > break things as it depends on the series that dynamically sizes DMA zones. > > I write this just because kdump is broken from this commit. Commit bff3b04460a8 actually fixed a regression introduced by the limited 30-bit ZONE_DMA, under the assumption that RPi4 is the only platform that cares about this. I agree a kdump kernel will fail to get memory in the low zone but it's not clear to me whether the regression you are seeing happened in 5.11-rc1 or you it's been around since 5.5. We may have got away before because max_zone_phys() assumed an implicit DMA offset equal to the start of the DRAM (well, power of two). This assumption was removed in 5.11 by commit 791ab8b2e3db ("arm64: Ignore any DMA offsets in the max_zone_phys() calculation"). So your patch or the clean-up I posted only makes sense with the dynamic ZONE_DMA patches in 5.11-rc1. For any earlier version, I don't have any suggestion other than not enabling CONFIG_ZONE_DMA in the kdump kernel (or backporting all of Nicolas' patches). I'll post my clean-up separately to go into 5.11 but won't have a fixes tag for bff3b04460a8. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel