From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 690C4279DB6 for ; Thu, 26 Feb 2026 09:34:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772098442; cv=none; b=BbbBWtD+w+SnVbEIhUWB2o0dvRbW/0JlVV/SWn42aPl4zm7YQyx/0MCnU3fLsZ5SajXnOV4uNvBn2KNrwPGYzgdgNdKn1FetBmg14UQy3C9s0h9nKmmtHJdaT9QbLu7his6cC8NbNPtzNvTVoSNeCKRduZXoBsx71QJkq4z/gKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772098442; c=relaxed/simple; bh=Z1yt6kzeNlQg0WJ7Zb6KUr2UATU7PoG1znlxMzawMlw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nkRlN2pEnttoOHEN/f+8F0jSS+W0f06K7NYAF20S9z89y43vjMQOtslKhjjqZj16vB7ZXqlX2GKEy5mcD704q08o2ej73Xhy047XXCTvi6iGmXirXbCo9ZhVgI3bdQVsM22Mwhk89Mj21MFdKbJhrud0mqNZePA76XfwHXkp39o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=AfjdkhvO; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AfjdkhvO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772098440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XkGmC86NoLQjvZOxhyrqXHuM788hxYhHZtfwsGaL3u0=; b=AfjdkhvO/BMYPBWryNbPrqMaqPXTAqtV/34vyyffngV5WH72ROumuQr8FuYcvSA/Rugckn IMNwiO7C15DHpMR8fwWOxhLgFg02c1wRNoYJZoKOY54aWSLXBvgQhWj8pjPaTRZDoE2Vjx 1EFrejpAZst6Tjc0vKo3c/tBSnxATF0= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-605-KqM-KKUpOKmWG2fNsWcMhg-1; Thu, 26 Feb 2026 04:33:50 -0500 X-MC-Unique: KqM-KKUpOKmWG2fNsWcMhg-1 X-Mimecast-MFC-AGG-ID: KqM-KKUpOKmWG2fNsWcMhg_1772098429 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 73F7C1800576; Thu, 26 Feb 2026 09:33:49 +0000 (UTC) Received: from localhost (unknown [10.72.112.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 88ECE30001B9; Thu, 26 Feb 2026 09:33:44 +0000 (UTC) Date: Thu, 26 Feb 2026 17:33:36 +0800 From: Baoquan He To: Jinjie Ruan Cc: corbet@lwn.net, skhan@linuxfoundation.org, catalin.marinas@arm.com, 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, akpm@linux-foundation.org, vgoyal@redhat.com, dyoung@redhat.com, rdunlap@infradead.org, pmladek@suse.com, dapeng1.mi@linux.intel.com, kees@kernel.org, paulmck@kernel.org, lirongqing@baidu.com, arnd@arndb.de, ardb@kernel.org, leitao@debian.org, rppt@kernel.org, cfsworks@gmail.com, ryan.roberts@arm.com, sourabhjain@linux.ibm.com, tangyouling@kylinos.cn, eajames@linux.ibm.com, hbathini@linux.ibm.com, ritesh.list@gmail.com, songshuaishuai@tinylab.org, samuel.holland@sifive.com, kevin.brodsky@arm.com, vishal.moola@gmail.com, junhui.liu@pigmoral.tech, coxu@redhat.com, liaoyuanhong@vivo.com, fuqiang.wang@easystack.cn, jbohac@suse.cz, brgerst@gmail.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, kexec@lists.infradead.org Subject: Re: [PATCH v6 4/5] arm64: kexec: Add support for crashkernel CMA reservation Message-ID: References: <20260224085342.387996-1-ruanjinjie@huawei.com> <20260224085342.387996-5-ruanjinjie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260224085342.387996-5-ruanjinjie@huawei.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 On 02/24/26 at 04:53pm, 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: Ard Biesheuvel > Signed-off-by: Jinjie Ruan > --- > v3: > - Add Acked-by. > v2: > - Free cmem in prepare_elf_headers() > - Add the mtivation. > --- > Documentation/admin-guide/kernel-parameters.txt | 2 +- > arch/arm64/kernel/machine_kexec_file.c | 8 +++++++- > arch/arm64/mm/init.c | 5 +++-- > 3 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index cb850e5290c2..497f63b76898 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -1121,7 +1121,7 @@ Kernel parameters > It will be ignored when crashkernel=X,high is not used > or memory reserved is below 4G. > crashkernel=size[KMG],cma > - [KNL, X86, ppc] Reserve additional crash kernel memory from > + [KNL, X86, ARM64, ppc] Reserve additional crash kernel memory from ~~~~ This should be written as 'PPC', even though it's not introduced in this patch. === PPC PowerPC architecture is enabled. === Other than this nit, the overral looks good to me. > CMA. This reservation is usable by the first system's > userspace memory and kernel movable allocations (memory > balloon, zswap). Pages allocated from this memory range ......snip...