Re: [PATCH v12 mm-new 06/15] khugepaged: introduce collapse_max_ptes_none helper function

From
Lorenzo Stoakes <hidden>
Date
2025-10-28 17:37:08
Also in
linux-doc, linux-mm, lkml
Reply to
Lorenzo Stoakes, 2025-10-28
On Tue, Oct 28, 2025 at 05:29:59PM +0000, Lorenzo Stoakes wrote:
quoted
If we want to avoid the implicit capping, I think there are the following
possible approaches

(1) Tolerate creep for now, maybe warning if the user configures it.
I mean this seems a viable option if there is pressure to land this series
before we have a viable uAPI for configuring this.

A part of me thinks we shouldn't rush series in for that reason though and
should require that we have a proper control here.

But I guess this approach is the least-worst as it leaves us with the most
options moving forwards.
quoted
(2) Avoid creep by counting zero-filled pages towards none_or_zero.
Would this really make all that much difference?
quoted
(3) Have separate toggles for each THP size. Doesn't quite solve the
    problem, only shifts it.
Yeah I did wonder about this as an alternative solution. But of course it then
makes it vague what the parent values means in respect of the individual levels,
unless we have an 'inherit' mode there too (possible).

It's going to be confusing though as max_ptes_none sits at the root khugepaged/
level and I don't think any other parameter from khugepaged/ is exposed at
individual page size levels.

And of course doing this means we
Oops didn't finish the thought!

Here it is:

And of course this means we continue to propagate this max_ptes_none concept
only now in more places which is yuck.

Unless you meant putting something other than max_ptes_none at different levels?

Cheers, Lorenzo
Thread (91 messages) 91 messages, 11 authors, last reply 2025-11-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help