Thread (79 messages) 79 messages, 8 authors, 2025-09-15

Re: [PATCH v11 00/15] khugepaged: mTHP support

From: Lorenzo Stoakes <hidden>
Date: 2025-09-15 10:41:08
Also in: linux-doc, linux-mm, lkml

On Mon, Sep 15, 2025 at 11:35:53AM +0100, Lorenzo Stoakes wrote:
 > On Mon, Sep 15, 2025 at 12:22:07PM +0200, David Hildenbrand wrote:
quoted
Initially we will start out simple and map it directly. But yeah, the idea
is to give us some more room later.
I think it's less 'wiggle room' and more us being able to _abstract_ what this
measurement means while reserving the right to adjust this.

But maybe we are saying the same thing in different ways.
quoted
I had something logarithmic in mind which would roughly be (ignoring the the
weird -1 for simplicity and expressing it as "used" instead of none-or-zero)

0 -> ~100% used (~0% none)
So equivalent to 511 today?
quoted
1 -> ~50% used (~50% none)
2 -> ~25% used (~75% none)
3 -> ~12.5% used (~87.5% none)
4 -> ~11.25% used (~88,75% none)
...
10 -> ~0% used (~100% none)
So equivalent to 0 today?

And with a logarithmic weighting towards values closer to "0% used"?

This seems sensible given the only reports we've had of non-0/511 uses here are
in that range...

But ofc this interpretation should be something we determine + treated as an
implementation detail that we can modify later.
quoted
Mapping that to actual THP sizes (#pages in a thp) on an arch will be easy.
And at different mTHP levels too right?
Another point here, since we have to keep:

/sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_none

Around, and users will try to set values there, presumably we will now add:

/sys/kernel/mm/transparent_hugepage/khugepaged/eagerness

How will we map <-> the two tunables?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help