From: Baoquan He <baoquan.he@linux.dev>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Carlier <devnexen@gmail.com>,
Dave Young <ruirui.yang@linux.dev>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] vmcoreinfo: export SECTION_HAS_MEM_MAP
Date: Mon, 28 Sep 2026 18:12:30 +0800 [thread overview]
Message-ID: <aro9jg5VN_CRBK7N@MiWiFi-R3L-srv> (raw)
In-Reply-To: <21abd60c-e71b-40ed-9506-853d4485cf4b@kernel.org>
On 09/28/26 at 11:14am, David Hildenbrand (Arm) wrote:
> On 9/28/26 11:11, Baoquan He wrote:
> > On 09/28/26 at 10:48am, David Hildenbrand (Arm) wrote:
> >> The crash tool currently hardcodes SECTION_HAS_MEM_MAP, and makedumpfile
> >> needs similar information (although still relying on
> >> SECTION_MARKED_PRESENT, it should switch to SECTION_HAS_MEM_MAP).
> >>
> >> Let's just export the value instead, so tools that work on vmcoreinfo
> >> will not have to guess.
> >>
> >> Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
> >> ---
> >> Result of the discussion in reply to "[PATCH v2 00/13] mm/sparse: remove
> >> SECTION_MARKED_PRESENT and further cleanups" [1]
> >>
> >> This patch can go in independently. It would be preferable if both
> >> go into the same kernel release ;)
> >>
> >> [1] https://lore.kernel.org/r/20260921-b4-sparsemem_cleanups-v2-0-54d81d65e125@kernel.org
> >> ---
> >> kernel/vmcore_info.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/kernel/vmcore_info.c b/kernel/vmcore_info.c
> >> index 5a417f8a922a..7833a36064a8 100644
> >> --- a/kernel/vmcore_info.c
> >> +++ b/kernel/vmcore_info.c
> >> @@ -182,6 +182,7 @@ static int __init crash_save_vmcoreinfo_init(void)
> >> VMCOREINFO_STRUCT_SIZE(mem_section);
> >> VMCOREINFO_OFFSET(mem_section, section_mem_map);
> >> VMCOREINFO_NUMBER(SECTION_SIZE_BITS);
> >> + VMCOREINFO_NUMBER(SECTION_HAS_MEM_MAP);
> >> VMCOREINFO_NUMBER(MAX_PHYSMEM_BITS);
> >> #endif
> >> VMCOREINFO_STRUCT_SIZE(page);
> >
> > It would be good to add one section in
> > Documentation/admin-guide/kdump/vmcoreinfo.rst, e.g
> >
> > SECTION_HAS_MEM_MAP
> > -------------------
> >
> > Indicates a memory section has struct page array (mem_map). User-space
> > tools should read this value but not hardcode it since the bit position
> > could change between kernel versions.
>
> I'm not particularly happy about having core-kernel defines documented in
> kdump/vmcoreinfo.rst, though?
>
> If it would be something vmcoreinfo special, sure. But not for basic defines.
>
> "See the kernel source code" is really what anybody using this should be doing?
I can't remember who suggested adding this document. The benefit is
users can read document to understand how it works, no need to look
at the code. I don't have strong preference on this.
So I am fine with both. Or we can add it if anyone really complains.
For the patch itself,
Acked-by: Baoquan He <baoquan.he@linux.dev>
Thanks
Baoquan
next prev parent reply other threads:[~2026-09-28 10:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 8:48 David Hildenbrand (Arm)
2026-09-28 9:11 ` Baoquan He
2026-09-28 9:14 ` David Hildenbrand (Arm)
2026-09-28 10:12 ` Baoquan He [this message]
2026-09-28 10:23 ` Dave Young
2026-09-28 11:42 ` David Hildenbrand (Arm)
2026-09-29 0:25 ` Dave Young
2026-09-28 15:53 ` Bradley Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aro9jg5VN_CRBK7N@MiWiFi-R3L-srv \
--to=baoquan.he@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=devnexen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ruirui.yang@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®