From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Muchun Song <muchun.song@linux.dev>
Cc: Muchun Song <songmuchun@bytedance.com>,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Petr Tesarik <ptesarik@suse.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/sparse: fix BUILD_BUG_ON check for section map alignment
Date: Wed, 1 Apr 2026 09:08:17 +0200 [thread overview]
Message-ID: <9fddd112-e304-4ce1-b3f0-a4b133fcb281@kernel.org> (raw)
In-Reply-To: <1742503A-F912-4AB6-AAF6-6CDB06829024@linux.dev>
On 4/1/26 06:01, Muchun Song wrote:
>
>
>> On Apr 1, 2026, at 10:57, Muchun Song <muchun.song@linux.dev> wrote:
>>
>>
>>
>>>
>>>
>>> If that would trigger, wouldn't the memmap of a memory section be
>>> smaller than a single page?
>>
>> I don't think a memory section can be smaller than a page, because
>> PFN_SECTION_SHIFT is defined as follows:
>>
>> #define PFN_SECTION_SHIFT (SECTION_SIZE_BITS - PAGE_SHIFT)
>>
>> Therefore, PFN_SECTION_SHIFT must be greater than PAGE_SHIFT. On powerpc,
>> PFN_SECTION_SHIFT is 6, PAGE_SHIFT is 18 (the worst combination).
>>
>> Sorry, but I didn't understand what your concern is. Could you elaborate
>> a bit more?
>
> Sorry, I misread it earlier — I thought it was about the memory
> section size, but it's actually about the memmap size. Let me respond
> again to your question. On the powerpc architecture, when PFN_SECTION_SHIFT
> is 6 and PAGE_SHIFT is 18, it does seem that the memmap of a memory
> section would be smaller than a single page.
Right, and I am saying we don't care about that and do not support it.
For example, most vmemmap code I am aware of relies on a single section
covering full pages.
So I don't think this patch here adds any value, except faking that we
might be supporting something we don't?
--
Cheers,
David
next prev parent reply other threads:[~2026-04-01 7:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 11:30 [PATCH] mm/sparse: fix BUILD_BUG_ON check for section map alignment Muchun Song
2026-03-31 19:55 ` Andrew Morton
2026-03-31 20:04 ` David Hildenbrand (Arm)
2026-04-01 2:47 ` Muchun Song
2026-03-31 20:07 ` Andrew Morton
2026-04-01 2:47 ` Muchun Song
2026-03-31 20:29 ` David Hildenbrand (Arm)
2026-04-01 2:57 ` Muchun Song
2026-04-01 2:59 ` Muchun Song
2026-04-01 4:01 ` Muchun Song
2026-04-01 7:08 ` David Hildenbrand (Arm) [this message]
2026-04-01 7:23 ` Muchun Song
2026-04-01 7:26 ` David Hildenbrand (Arm)
2026-04-01 7:28 ` Muchun Song
2026-04-01 16:33 ` Andrew Morton
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=9fddd112-e304-4ce1-b3f0-a4b133fcb281@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=ptesarik@suse.com \
--cc=rppt@kernel.org \
--cc=songmuchun@bytedance.com \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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