On 2025/7/8 12:37, Nico Pache wrote:
On Fri, Jul 4, 2025 at 3:14 PM Andrew Morton <a...@linux-foundation.org> wrote:

On Fri, 4 Jul 2025 14:11:13 +0800 Baolin Wang <baolin.w...@linux.alibaba.com> 
wrote:

On 2025/7/2 13:57, Nico Pache wrote:
Allow madvise_collapse to scan/collapse all mTHP orders without the
strict requirement of needing the PMD-order enabled.

Signed-off-by: Nico Pache <npa...@redhat.com>

I am afraid we should drop this patch from the series, since Hugh
explicitly opposed my modification of the madvise_collapse control logic
in this thread[1].

Well it drops easily enough.  I don't know if it compiles yet.

Nico, can you confirm that you're OK with the droppage and that the
series is still good without this patch?
Yes that is fine, it shouldn't conflict at all. Although this isn't
the only patch that will need modification... Ill reply to Baolin
inline here.

Moreover, since we have not yet clarified how to handle the conflict
between the semantics of madvise_collapse and the THP interfaces, we
should keep the current logic[2] (means madvise_collapse still only
allows PMD collapse).
Hi Baolin,

Sorry I saw most of that discussion but missed that point by David.

We should come to an agreement on what the proper approach is, because
if not we'll ALWAYS have this problem and NEVER solve it (pun
intended).

Jokes aside, if we are leaving MADV_COLLAPSE untouched then I need to
make some slight modifications to this series so that MADV_COLLAPSE
never tries anything other than PMD collapse (should be a pretty small
change). Dropping this commit alone does not achieve that, but rather
just allows MADV_COLLAPSE to work if PMD is disabled, and one other
mTHP size is enabled. On second thought this isn't great either as
MADV_COLLAPSE ignores sysfs, so if you have any mTHP size enabled, it
will still continue to collapse to other PMD+mTHP sizes... wow this
really is a mess.

Yes, this is what I mentioned earlier about the conflict between MADV_COLLAPSE and mTHP collapse :(

If madvise_collapse is to support mTHP collapse, there will be more
semantic conflicts to discuss.
I guess a V9 is inevitable, I will drop mTHP support for
MADV_COLLAPSE, and drop this patch too. I'll let this series sit for a
week or so to gather reviews (and make sure nothing else is missing).

Sure.

Reply via email to