From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B5A0351C14; Thu, 26 Mar 2026 10:54:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774522455; cv=none; b=p1hYGfZtNIOaBqwnIyb1RSsHcBo8cGJa19apSDAOO5ZxdflmEqZRXgFBBHSlTwzQ8A88MWnKFLwJg8dDzUWaZeeu0SysEyW2qNDln+2ErLVAP3VSXPQMfjPR5cWPOx3eMKMj5AvsHOTpfSVO68+U+lAcZ+rWaI9PtJT5ZcvW5FI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774522455; c=relaxed/simple; bh=8IXmdtIFEytfMHYy2/zN6eUVEhDW6CUJvZu3Mba6/Z0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CjSbnY5mL3f6B5An8t7m2rywPgCWidIykc+u19QFqwKYEN/COT1tTT2sqoBMXlHeccY9DgiRhDnrZcF0UEt78MOstU8pJh/53rsAIkcjr/MTXOJLa6bV8t5yWW6dG0AoAHVMn1MONAeFJ+T4iuYxqOttEVCCyhKXVtFnVHm6Ut4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=YVuxS70w; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="YVuxS70w" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9240222F8; Thu, 26 Mar 2026 03:54:06 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E50D13FB90; Thu, 26 Mar 2026 03:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1774522452; bh=8IXmdtIFEytfMHYy2/zN6eUVEhDW6CUJvZu3Mba6/Z0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YVuxS70wtA+CNyc+9Yfuu8kLdwGx0hAOW4qIgVCCdqd3eWV81ySjZ1drGGhP2OXoL +ZNCcv/2wvx0wEMhP2Dp3UCFRMfOF2SBHpPH29ZkEJibdsvI0zy0/8alDG7Ivbi7i4 oE7duHHNhvv6uUVGYqsXoDVURWRztrpZN8osSmlg= Date: Thu, 26 Mar 2026 10:54:01 +0000 From: Catalin Marinas To: Jinjie Ruan Cc: corbet@lwn.net, skhan@linuxfoundation.org, will@kernel.org, chenhuacai@kernel.org, kernel@xen0n.name, maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, robh@kernel.org, saravanak@kernel.org, akpm@linux-foundation.org, bhe@redhat.com, vgoyal@redhat.com, dyoung@redhat.com, rdunlap@infradead.org, peterz@infradead.org, pawan.kumar.gupta@linux.intel.com, feng.tang@linux.alibaba.com, dapeng1.mi@linux.intel.com, kees@kernel.org, elver@google.com, paulmck@kernel.org, lirongqing@baidu.com, rppt@kernel.org, ardb@kernel.org, leitao@debian.org, osandov@fb.com, cfsworks@gmail.com, tangyouling@kylinos.cn, sourabhjain@linux.ibm.com, ritesh.list@gmail.com, eajames@linux.ibm.com, songshuaishuai@tinylab.org, kevin.brodsky@arm.com, samuel.holland@sifive.com, vishal.moola@gmail.com, junhui.liu@pigmoral.tech, coxu@redhat.com, liaoyuanhong@vivo.com, jbohac@suse.cz, fuqiang.wang@easystack.cn, guoren@kernel.org, chenjiahao16@huawei.com, hbathini@linux.ibm.com, james.morse@arm.com, takahiro.akashi@linaro.org, lizhengyu3@huawei.com, x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, kexec@lists.infradead.org Subject: Re: [PATCH v10 6/8] arm64: kexec: Add support for crashkernel CMA reservation Message-ID: References: <20260325025904.2811960-1-ruanjinjie@huawei.com> <20260325025904.2811960-7-ruanjinjie@huawei.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260325025904.2811960-7-ruanjinjie@huawei.com> On Wed, Mar 25, 2026 at 10:59:02AM +0800, Jinjie Ruan wrote: > Commit 35c18f2933c5 ("Add a new optional ",cma" suffix to the > crashkernel= command line option") and commit ab475510e042 ("kdump: > implement reserve_crashkernel_cma") added CMA support for kdump > crashkernel reservation. > > Crash kernel memory reservation wastes production resources if too > large, risks kdump failure if too small, and faces allocation difficulties > on fragmented systems due to contiguous block constraints. The new > CMA-based crashkernel reservation scheme splits the "large fixed > reservation" into a "small fixed region + large CMA dynamic region": the > CMA memory is available to userspace during normal operation to avoid > waste, and is reclaimed for kdump upon crash—saving memory while > improving reliability. > > So extend crashkernel CMA reservation support to arm64. The following > changes are made to enable CMA reservation: > > - Parse and obtain the CMA reservation size along with other crashkernel > parameters. > - Call reserve_crashkernel_cma() to allocate the CMA region for kdump. > - Include the CMA-reserved ranges for kdump kernel to use. > - Exclude the CMA-reserved ranges from the crash kernel memory to > prevent them from being exported through /proc/vmcore, which is already > done in the crash core. > > Update kernel-parameters.txt to document CMA support for crashkernel on > arm64 architecture. > > Acked-by: Rob Herring (Arm) > Acked-by: Baoquan He > Acked-by: Mike Rapoport (Microsoft) > Acked-by: Ard Biesheuvel > Signed-off-by: Jinjie Ruan Acked-by: Catalin Marinas