From: David Hildenbrand <david@redhat.com>
To: Ross Zwisler <zwisler@google.com>
Cc: Michal Hocko <mhocko@suse.com>, Mike Rapoport <rppt@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
Mel Gorman <mgorman@suse.de>, Vlastimil Babka <vbabka@suse.cz>
Subject: Re: collision between ZONE_MOVABLE and memblock allocations
Date: Wed, 26 Jul 2023 10:31:02 +0200 [thread overview]
Message-ID: <61234a18-7797-722e-ae14-1aa352c4d850@redhat.com> (raw)
In-Reply-To: <20230719230515.GA3654720@google.com>
>> As an alternative, we might use the "memmap=nn[KMG]!ss[KMG]" [1] parameter
>> to mark some memory as protected.
>>
>> That memory can then be configured as devdax device and online to
>> ZONE_MOVABLE (dev/dax).
>>
>> [1] https://docs.pmem.io/persistent-memory/getting-started-guide/creating-development-environments/linux-environments/linux-memmap
>
> I've previously been reconfiguring devdax memory like this:
>
> ndctl create-namespace --reconfig=namespace0.0 -m devdax -f
> daxctl reconfigure-device --mode=system-ram dax0.0
>
> Is this how you've been doing it, or is there something else I should
> consider?
No, exactly like that.
>
> I just sent mail to Michal outlining my use case, hopefully it makes sense.
Yes, thanks for sharing, I'll dig deeper into that next.
>
> I had thought about using 'memmap=' in the first kernel and the worry was that
> I'd have to support many different machines with different memory
> configurations, and have to hard-code memory offsets and lengths for the
> various memmap= kernel command line parameters.
Indeed.
> If I can make ZONE_MOVABLE
> work that's preferable because the kernel will choose the correct usermem-only
> region for me, and then I can just use that region for the crash kernel and
> 3rd kernel boots.
It really sounds like you might be better off using CMA or
alloc_contig_pages().
The latter is unreliable, though, and the memory cannot be used for
other purposes once alloc_contig_pages() succeeded
See arch/powerpc/platforms/powernv/memtrace.c one one user that needs to
set aside a lot of memory to store HW traces.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2023-07-26 8:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 22:01 Ross Zwisler
2023-07-19 5:44 ` Mike Rapoport
2023-07-19 22:26 ` Ross Zwisler
2023-07-21 11:20 ` Mike Rapoport
2023-07-26 7:49 ` Michal Hocko
2023-07-26 10:48 ` Mike Rapoport
2023-07-26 12:57 ` Michal Hocko
2023-07-26 13:23 ` Mike Rapoport
2023-07-26 14:23 ` Michal Hocko
2023-07-19 6:14 ` Michal Hocko
2023-07-19 7:59 ` Mike Rapoport
2023-07-19 8:06 ` Michal Hocko
2023-07-19 8:14 ` David Hildenbrand
2023-07-19 23:05 ` Ross Zwisler
2023-07-26 8:31 ` David Hildenbrand [this message]
2023-07-19 22:48 ` Ross Zwisler
2023-07-20 7:49 ` Michal Hocko
2023-07-20 12:13 ` Michal Hocko
2023-07-24 16:56 ` Ross Zwisler
2023-07-26 8:44 ` David Hildenbrand
2023-07-26 13:08 ` David Hildenbrand
2023-07-27 8:18 ` Michal Hocko
2023-07-27 9:41 ` David Hildenbrand
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=61234a18-7797-722e-ae14-1aa352c4d850@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=zwisler@google.com \
/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