From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <songmuchun@bytedance.com>,
Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <muchun.song@linux.dev>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/sparse: Remove sparse buffer pre-allocation mechanism
Date: Tue, 14 Apr 2026 14:17:31 +0200 [thread overview]
Message-ID: <90d0abf6-fec4-439e-a7b3-756e3cdcba6b@kernel.org> (raw)
In-Reply-To: <ad4u64rfWAy19kup@kernel.org>
On 4/14/26 14:11, Mike Rapoport wrote:
> On Mon, Apr 13, 2026 at 09:02:43PM +0200, David Hildenbrand (Arm) wrote:
>>> -
>>> -void * __meminit sparse_buffer_alloc(unsigned long size)
>>> -{
>>> - void *ptr = NULL;
>>> -
>>> - if (sparsemap_buf) {
>>> - ptr = (void *) roundup((unsigned long)sparsemap_buf, size);
>>> - if (ptr + size > sparsemap_buf_end)
>>> - ptr = NULL;
>>> - else {
>>> - /* Free redundant aligned space */
>>> - if ((unsigned long)(ptr - sparsemap_buf) > 0)
>>> - sparse_buffer_free((unsigned long)(ptr - sparsemap_buf));
>>> - sparsemap_buf = ptr + size;
>>
>> This code implied, that we would usually get contiguous memory sections
>> (on the same node) to have contiguous PFNs in the SPARSE !VMEMMAP case.
>> That will no longer be the case (reliably).
>>
>> The code must be prepared to handle that, so I guess that is fine. And
>> we don't care that much about SPARSE !VMEMMAP.
>
> I've started to hunt them down ;-P
Nice :)
--
Cheers,
David
prev parent reply other threads:[~2026-04-14 12:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 9:24 Muchun Song
2026-04-12 16:26 ` Mike Rapoport
2026-04-13 19:02 ` David Hildenbrand (Arm)
2026-04-14 12:11 ` Mike Rapoport
2026-04-14 12:17 ` David Hildenbrand (Arm) [this message]
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=90d0abf6-fec4-439e-a7b3-756e3cdcba6b@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=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