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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 51CA0FC591C for ; Thu, 26 Feb 2026 09:34:12 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fM5rL5Hgzz2yFc; Thu, 26 Feb 2026 20:34:10 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772098450; cv=none; b=iqXOXjkob8KPf1aIvOfWQEB/01bll8NX3c/QmpjrtIaXEWXcbGf63/NaEVj/Y4HDSMhASF13LU6B68WsjPg+OURTXH5smRWMyTHU5frNN6K6Dw0+jv0w5Fv5HIxlpfkPC7if2CF6UtwMsA0zYHuKWeDr5Lj1OUgXHj5HO6LhyqcK3osdTJ5oILIgkTXkEHheFb7ZArY5fKfwYFi7M6ZoYMnNUaTksJMAzabKv/PBNgnfB5nnWxDMASv1PSY/JjjHtgdFym2vIuo+fyMbVMDnoaTagROUmtB8HBlMH9O6n/g8iZ/l26Sjd47gVrWrbUGp+dH5q5+71q5e1s5GWxmFGQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772098450; c=relaxed/relaxed; bh=XkGmC86NoLQjvZOxhyrqXHuM788hxYhHZtfwsGaL3u0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=TM0Dn4vfhexs7ef/CYFYbNFsgwLDoxqUyNyGX2HyKMsCfRL6NctlCs9+K0HdH41yXZ2EwZWjIKf3/FYG4bwvQXtIDvXlYBrp6UUupqVvqoxBHqiGP0qOv4Bygpg5+oKxvn8Xt3aHiI9M9PEAUjHI0Ev9w1dma/vGvg2LAsHAbNaT5yLGjAl3W7XChAZ1oK+yJKkSUfFBGpF/uWAh+3SJpPWIkMfZlZUeaZJth2HEuahl6zn8H6109GHhDdicujg4zf08YEV8/gJOp5xeIssti8pNmlwcLQk/DzP+3VRQOplQP16FtDbvvOGMy+CGxibOYIqN/esfnl8Z92BbCNAugg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z82ROHHi; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z82ROHHi; dkim-atps=neutral; spf=pass (client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=bhe@redhat.com; receiver=lists.ozlabs.org) smtp.mailfrom=redhat.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z82ROHHi; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z82ROHHi; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=bhe@redhat.com; receiver=lists.ozlabs.org) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4fM5rK5fxcz2xMt for ; Thu, 26 Feb 2026 20:34:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772098445; 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=Z82ROHHiHzcsjigDP4Y5CFK/+42rOSzDKP9ox1+VTaNUNowPoCP/uOfwEuNsPj9tXPSBz0 C8aA3Qc2cH0TKLED/rIr3sJgvCuD2b/RkkPy46UZOzrv1xn/1JdmN7h8tjCQORrq34yEW1 QVn8L9BrU7VZ+aVkq8FOhuZkTr1NpdQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772098445; 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=Z82ROHHiHzcsjigDP4Y5CFK/+42rOSzDKP9ox1+VTaNUNowPoCP/uOfwEuNsPj9tXPSBz0 C8aA3Qc2cH0TKLED/rIr3sJgvCuD2b/RkkPy46UZOzrv1xn/1JdmN7h8tjCQORrq34yEW1 QVn8L9BrU7VZ+aVkq8FOhuZkTr1NpdQ= 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-609-cKoIy_McNXyrDuGueNJKMw-1; Thu, 26 Feb 2026 04:33:56 -0500 X-MC-Unique: cKoIy_McNXyrDuGueNJKMw-1 X-Mimecast-MFC-AGG-ID: cKoIy_McNXyrDuGueNJKMw_1772098431 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 7373E18002FB; 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> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 In-Reply-To: <20260224085342.387996-5-ruanjinjie@huawei.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-MFC-PROC-ID: ReKm7mr5He_G1OkdydTkj_iI5h9LXRBgQYU2uU6GaLY_1772098431 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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...