From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.227.138 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796094576; b=mYrRQ73ANZUUhgie5HAE7SKSLPIbRDxLYT+Rj3N3SicJETjKBKnGFxb3f0Eq/5P6+DU3 tnDHmHQ9cNQchSzpDgqvTiFRIpQxbkm5ZT2lMNSAEtDpa+OpXY72eVJZPr+0dHjHn83T5 qgW99iPItkudtcrTDDfiM/t/LwLsfcvOILh7anzVQwY2hlwYVZrJFEBWnTolTVXLfoe/T /9aa5vAFEpFN1MdQKZKHORTh00MVIUqtddVFBB7YL2k514iG0lqBRELltL+foD+mHRtJU RnpdhYF+DS4QWHUnju0D1zWNjeDSnfwEtAJT0uoNVIGd9PxzO0GuqczfWFUL5Z4nFUw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796094576; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=8hWBztnznpAagc05IhLyXf+PAbUTYcNuGBpduCTcxi4=; b=SVNq1RVdPwW80HTU0ITA7aR+tJDKI/UWQmmy0cTrytMpBGtvr9KZEJ6kwQHb+vbvhDne yD7hk1s/+MKTPK6A2PZu3stUpOfs8fmfRy/TVICg9pNUnxArCv4xq5SUtAUatk/vi13ep mzKUITuQEiZJIsIyCygbkWR6C6AQRJK9zjTSOrdjm9zxV3htRxBxU4h12rFWOqeilTral XsbFkjpWYOt+8cWKfk3N4su3yAJrEeivTLth8dRepQpQrWKH8iLm006xpPvxoJelDaqlY 0HggGDTsI15J9Xdw5D8yGR1zCqtwO7NF5H6+Gh77p+rPF8kTcF1IGPK2I5L6oX93zTg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=uAj0fFfL; arc=none smtp.remote-ip=74.125.227.138 Received: from mail-pj2-f10.google.com (mail-pj2-f10.google.com [74.125.227.138]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E783F606A31A for ; Tue, 1 Dec 2026 03:09:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E783F606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=uAj0fFfL Received: by mail-pj2-f10.google.com with SMTP id 98e67ed59e1d1-3b40a2025b0so765721a91.0 for ; Mon, 30 Nov 2026 19:09:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796094575; x=1796699375; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=8hWBztnznpAagc05IhLyXf+PAbUTYcNuGBpduCTcxi4=; b=uAj0fFfLnIglTcoIF+0W9VSw445T53uTsgXEcGMWgrR5o1WrdP9tut2DMno/ei0vge M1nI/kNhs/GCkyA8LcKMHtJEWVbAdFaG1waNao87/WhY0ZtEHm5p0Uymc+K8TRLzMWNE 0qhooS/n3NB03/0KG74oMOz7zCeDVU+obQEnPfinN85wBZb5O85HPa4sqra6Pr67UKxo sjLS8txaGhj97rAFElXa49zWkyCJIm5EmkI7CY16ABcaEwOvRPf0gw/orAjQI6FP3k+V JezrUHm/0GGwzJYSugtquhGtmo+IJep2l0G91Q3a+Lz/308Z8jP8oUMVqzD5a8B1J8MD iuIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796094575; x=1796699375; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8hWBztnznpAagc05IhLyXf+PAbUTYcNuGBpduCTcxi4=; b=Pv5C/QXS3Jvui9qEduxcQ6UEgCatkeW+4t6qkAXWfI3NhoxBSh6G2yVsxQf7RLGjKi f5Aqcw5RDUQPj/d2VJRambQ6nC0+AJv4Tl1JfwigWBXcDS+NbVwviiQBYBe7jwhji4NG CdZ94LLoFyOCXFOhF7RKgfPZ6Rn+X3k3AjK/DPVuxhj+cOyK+TURR+95xBqlpTrxUExW 2jEb/40uM3g8iI95ghGXKGVJHOnVNEmTOnbk8/n2YF5DdXfZyOaOpCzgL0aBRPVLmBEK rZ23UHAL28wmGOln3bd9bQQohCvIQhSxnfdVUUImi2KvaFuj5RI8HVSYPzJfpQY1yHg3 sz5g== X-Forwarded-Encrypted: i=1; AL+hErHtEjzY+liUM1UJrEhQH1w7x6RphZhKFJrlHqlbHqOcunJ/kfUiUMxprAru0LP127ewkOKeuwk1FpWW1QY=@vger.kernel.org X-Gm-Message-State: APuU4Z+SoyMkWYOUSIhaJ70LdLy9zQynHHcH+U8Y7Uo80DqGOpvovRA2 Yu93gsx/8m3Fhe2mD9tM5JxW7hR3ogZoGXxS5gYOek4jBTg1OXAsmJaL X-Gm-Gg: AZFdTZd/BGCYG7xjboNlf3ef/H7zgewacE/tYvgRL+tItCesujorTI8lUPh9FvZyKWD yffrzhBe2htOO+Z7RA/mjpu+StHu+u66ZXmI2fr4KiTx3j/F57bs4pf1Juu2PkXquIoEj7TEHV4 YQw7S+KomDj95SwGJUWZy2blqfeHyMwM3N2eJbrKkRHz+zBo3KabPu6g5MojTK4b+VpFMd6mmZb EJzyMKbiWndNvXb8/RdjFnrtGnrZlHp81euettkJLs20Q6aJIMAHfvu+BIQPM1wBJWcisQJl9HQ iW4WTs1VI4O8A1CCUQn2yncucyRCVN5GFX4H/FxhPG2TnTYRQzFnLxJoNieIKpuZ1aYmFmYdU3f 71UaEnrpOG1KzSsfVHD0jYJLxyEKzR4mM3vmqwrabYm47A9x5yQrgmShglTWyfVg7a8nD1kJeUh COAqvHPf19O6Bex1LdreLztRTGuucQGFa1J5OIgf/HqTLl5E8ArTQPLq1V/Xq78ZRRilMEF8Lce lDA66WKwRF5lHkTMd0daLzBvlAkts1fl1tXz2YFSiU1CAOfFWIBgWFghOD/6U1+VY7kUpouHd57 z2A0RmJ4UobgkWEAb2YqdJRE80DpXVtA8TaarKiGm5Ir0LqMeha3pAbq X-Received: by 2002:a17:90b:380f:b0:3b1:bd6d:fcc2 with SMTP id 98e67ed59e1d1-3b41c97c88cmr23197995a91.40.1796094575154; Mon, 30 Nov 2026 19:09:35 -0800 (PST) Received: from [10.125.112.22] ([122.11.210.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b41abb2076sm56009839a91.2.2026.11.30.19.09.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 19:09:34 -0800 (PST) Message-ID: <2d39aa65-4aa0-4010-b7bc-1b0c731747ab@gmail.com> Date: Tue, 1 Dec 2026 11:09:30 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 0/8] kdump: reduce vmcore size and capture time To: Jinjie Ruan , linux-kernel@vger.kernel.org References: <20261127090723.741253-1-chenwandun1@gmail.com> <42a15fcb-36f7-4a85-b309-c2f96d8931c9@huawei.com> Content-Language: en-US From: Wandun In-Reply-To: <42a15fcb-36f7-4a85-b309-c2f96d8931c9@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/28/26 10:35, Jinjie Ruan wrote: > Hi Wandun, > > Could you help review my below kexec rework? > > https://lore.kernel.org/all/20261127100925.3019877-1-ruanjinjie@huawei.com/ Sure, I will take a look at your kexec rework series. Best regards, Wandun > > Thanks > Jinjie > > 在 2026/11/27 17:07, Wandun Chen 写道: >> From: Wandun Chen >> >> On SoCs that carve out large firmware-owned reserved memory (GPU, >> camera ISP, ...), kdump currently dumps those carveouts as part of >> system RAM even though their contents are firmware state that is not >> useful for kernel crash analysis. >> >> ACPI systems already filter reserved memory out of the vmcore through >> their existing path: firmware reports those carveouts as unusable in >> the EFI memory map, they get MEMBLOCK_NOMAP set in memblock.memory >> (is_usable_memory(), efi-init.c), and the ELF header builder has >> always skipped nomap regions; only DT-based systems currently fail >> to filter these regions, which is what this series addresses. >> >> This series introduces a MEMBLOCK_NODUMP flag (suggested by Rob) in >> memblock to filter reserved memory on DT-based architectures. A new >> flag is needed because MEMBLOCK_NOMAP can only express regions without >> a linear mapping, while MEMBLOCK_NODUMP can filter regions that are >> linearly mapped. Reserved regions are marked MEMBLOCK_NODUMP by default >> so kdump omits them; reusable CMA regions are different because their >> pages are handed back to the buddy allocator and may carry crash-relevant >> data. >> >> Since the reserved memory regions are filtered out, the vmcore is >> smaller in size and faster to produce. >> >> The series is based on linux-next and is organized as follows: >> >> Patches 1-3: Preparation and bugfixes: switch riscv crash_mem to >> memblock, fold the duplicated per-arch memblock walks >> into the weak defaults, and serialize crash header >> preparation against memory hotplug. >> Patches 4-7: NODUMP infrastructure: switch crash_core to >> for_each_mem_region(), introduce the MEMBLOCK_NODUMP >> flag, add a dumpable flag to struct reserved_mem, and >> mark /reserved-memory entries with MEMBLOCK_NODUMP. >> Patch 8: Skip MEMBLOCK_NODUMP regions when building the vmcore >> ELF header. >> >> >> v9 --> v10: >> 1. Rebased on the latest linux-next, which includes the >> reserved-memory rework. >> >> 2. Patch 7: fix two issues found by Sashiko [1], by skipping >> the NODUMP marking entirely when early reservation fail >> and clamping the marked range to page boundaries. >> >> The changes only tighten the conditions for marking NODUMP >> and the overall logic is unchanged, so the Acked-by and >> Reviewed-by tags are kept -- Marek, Rob, please let me know >> if you disagree and I will drop them. >> >> 3. The remaining x86-specific race in patch 3 found by Sashiko [2] >> (Xen balloon inserting a System RAM resource outside >> device_hotplug_lock) is pre-existing, and fixing it depends on >> resolving other pre-existing issues first, so it will be sent >> separately. >> >> [1] https://sashiko.dev/#/message/sashiko-outbox-181183@kernel.org >> [2] https://sashiko.dev/#/message/sashiko-outbox-181179@kernel.org >> >> An Ack for patch 1 from the riscv maintainers is still pending: >> I have pinged them, but no response yet. The Ack will be added >> once received. >> >> v8 --> v9: >> 1. Patch 7: Avoid a potential boot panic on SH when NODUMP marking requires >> memblock resizing before it is allowed. SH supports neither >> CONFIG_KEXEC_FILE nor CONFIG_CRASH_HOTPLUG, so skip marking when both >> are disabled. >> >> v7: https://lore.kernel.org/lkml/20260922084256.1515554-1-chenwandun1@gmail.com/ >> v6: https://lore.kernel.org/lkml/20260902073116.802752-1-chenwandun1@gmail.com/ >> v5: https://lore.kernel.org/lkml/20260806093519.2907771-1-chenwandun1@gmail.com/ >> v4: https://lore.kernel.org/lkml/20260630074715.4126796-1-chenwandun1@gmail.com/ >> >> >> Wandun Chen (8): >> riscv: build crash_mem ranges from memblock instead of resource tree >> crash_core: fold duplicated memblock arch hooks into the weak default >> crash_core: serialize crash header preparation against hotplug >> crash_core: replace for_each_mem_range() with for_each_mem_region() >> memblock: introduce MEMBLOCK_NODUMP flag >> of: reserved_mem: add dumpable flag to opt-in vmcore >> of: reserved_mem: mark /reserved-memory entries with MEMBLOCK_NODUMP >> crash_core: skip MEMBLOCK_NODUMP regions when building vmcore ELF >> header >> >> arch/arm64/kernel/machine_kexec_file.c | 29 ------------ >> arch/loongarch/kernel/machine_kexec_file.c | 27 ----------- >> arch/riscv/Kconfig | 2 +- >> arch/riscv/kernel/crash.c | 2 +- >> arch/riscv/kernel/machine_kexec_file.c | 33 -------------- >> arch/x86/kernel/crash.c | 2 +- >> drivers/of/fdt.c | 2 + >> drivers/of/of_private.h | 1 + >> drivers/of/of_reserved_mem.c | 30 ++++++++++++ >> include/linux/crash_core.h | 2 + >> include/linux/memblock.h | 9 ++++ >> include/linux/of_reserved_mem.h | 1 + >> kernel/crash_core.c | 53 +++++++++++++++++++++- >> kernel/dma/contiguous.c | 1 + >> mm/memblock.c | 16 +++++++ >> 15 files changed, 116 insertions(+), 94 deletions(-) >> >