From: Byungchul Park <byungchul@sk.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>,
lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
linux-cxl@vger.kernel.org, Honggyu Kim <honggyu.kim@sk.com>,
kernel_team@skhynix.com
Subject: Re: [LSF/MM/BPF TOPIC] Restricting or migrating unmovable kernel allocations from slow tier
Date: Fri, 7 Feb 2025 16:20:24 +0900 [thread overview]
Message-ID: <20250207072024.GA48419@system.software.com> (raw)
In-Reply-To: <Z54p4QOnAlTYm6DG@casper.infradead.org>
On Sat, Feb 01, 2025 at 02:04:17PM +0000, Matthew Wilcox wrote:
> On Sat, Feb 01, 2025 at 10:29:23PM +0900, Hyeonggon Yoo wrote:
> > The Linux kernel supports hot-plugging CXL memory via dax/kmem functionality.
> > The hot-plugged memory allows either unmovable kernel allocations
> > (ZONE_NORMAL), or restricts them to movable allocations (ZONE_MOVABLE)
> > depending on the hot-plug policy.
>
> This all seems like a grand waste of time. Don't do that. Don't allow
> kernel allocations from CXL at all. Don't build systems that have
> vast quantities of CXL memory (or if you do, expose it as really fast
> swap, not as memory).
>
> All of the CXL topics I see this year are "It really hurts performance
> when ..." and my reaction is "Yes, I told you it would hurt and you did
> it anyway". Just stop doing it. CXL is this decade's Infiniband / ATM
> / (name your favourite misguided dead technology here). You can't stop
> other people from doing foolish things, but you don't have to join in.
> And we don't have to take stupid patches.
Hyeonggon and I described the topic based on what we observed in CXL
memory environment, but fundamentally it doesn't have to be only CXL
memory issue but also heterogeneous memory or ZONE_NORMAL cost issue as
you and others mentioned. Lemme clarify it.
<general mm issue>
1. Allow kernel object to be movable:
a. ZONE_NORMAL cost will be reduced. (less reclaim and oom)
b. ZONE_NORMAL covers bigger whole memory.
c. A smaller ZONE_NORMAL is sufficient.
d. Need additional consideration about when(or what) to move.
2. Never allow kernel object to be movable:
a. ZONE_NORMAL cost keeps high. (premature reclaim and oom)
b. ZONE_NORMAL covers smaller whole memory.
c. A bigger ZONE_NORMAL is required.
<heterogeneous memory specific issue>
3. Allow ZONE_NORMAL in non-DRAM:
a. Mitigate ZONE_NORMAL cost. (less reclaim and oom)
b. Followed by e.g. hot-unplug issue.
c. Option 1: No restricting the ZONE_NORMAL size.
d. Option 2: Restricting the size as budget to cover its capacity.
e. Option 3: ?
4. Never allow ZONE_NORMAL in non-DRAM:
a. ZONE_NORMAL cost should be low enough to cover non-DRAM too.
b. Any efforts to reduce ZONE_NORMAL cost should be welcome.
c. Matthew's work would mitigate the cost.
d. Allowing kernel object to be movable would work for it too.
Plus, I think Metthew's effort to reduce ZONE_NORMAL cost is amazing and
hope successfully make it. However, ZONE_NORMAL cost can be reduced in
many ways and all the efforts can be considered meaningful.
We can work with from the easiest object e.g. page table, struct page,
and kernel stack, to harder ones, while struct page cost is getting
reduced by Matthew's work at the same time.
When it comes to this topic, the most important thing is the collected
*direction* from the community so that we can start the work under the
*direction*.
Byungchul
next prev parent reply other threads:[~2025-02-07 7:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-01 13:29 Hyeonggon Yoo
2025-02-01 14:04 ` Matthew Wilcox
2025-02-01 15:13 ` Hyeonggon Yoo
2025-02-01 16:30 ` Gregory Price
2025-02-01 18:48 ` Matthew Wilcox
2025-02-03 22:09 ` Dan Williams
2025-02-07 7:20 ` Byungchul Park [this message]
2025-02-07 8:57 ` Gregory Price
2025-02-07 9:27 ` Gregory Price
2025-02-07 9:34 ` Honggyu Kim
2025-02-07 9:54 ` Gregory Price
2025-02-07 10:49 ` Byungchul Park
2025-02-10 2:33 ` Harry (Hyeonggon) Yoo
2025-02-10 3:19 ` Matthew Wilcox
2025-02-10 6:00 ` Gregory Price
2025-02-10 7:17 ` Byungchul Park
2025-02-10 15:47 ` Gregory Price
2025-02-10 15:55 ` Matthew Wilcox
2025-02-10 16:06 ` Gregory Price
2025-02-11 1:53 ` Byungchul Park
2025-02-21 1:52 ` Harry Yoo
2025-02-25 4:54 ` [LSF/MM/BPF TOPIC] Gathering ideas to reduce ZONE_NORMAL cost Byungchul Park
2025-02-25 5:06 ` [LSF/MM/BPF TOPIC] Restricting or migrating unmovable kernel allocations from slow tier Byungchul Park
2025-03-03 15:55 ` Gregory Price
2025-02-07 10:14 ` Byungchul Park
2025-02-10 7:02 ` Byungchul Park
2025-02-04 9:59 ` 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=20250207072024.GA48419@system.software.com \
--to=byungchul@sk.com \
--cc=42.hyeyoo@gmail.com \
--cc=honggyu.kim@sk.com \
--cc=kernel_team@skhynix.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=willy@infradead.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