lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA1CXcDkr8itrXiuVq+Tck1hkRwgq-byXCcM3oHqy1dXOhhTTg@mail.gmail.com>
Date: Mon, 7 Jul 2025 22:37:06 -0600
From: Nico Pache <npache@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>, Baolin Wang <baolin.wang@...ux.alibaba.com>, 
	david@...hat.com, dev.jain@....com, Hugh Dickins <hughd@...gle.com>
Cc: linux-mm@...ck.org, linux-doc@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, 
	ziy@...dia.com, lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, 
	ryan.roberts@....com, corbet@....net, rostedt@...dmis.org, 
	mhiramat@...nel.org, mathieu.desnoyers@...icios.com, baohua@...nel.org, 
	willy@...radead.org, peterx@...hat.com, wangkefeng.wang@...wei.com, 
	usamaarif642@...il.com, sunnanyong@...wei.com, vishal.moola@...il.com, 
	thomas.hellstrom@...ux.intel.com, yang@...amperecomputing.com, 
	kirill.shutemov@...ux.intel.com, aarcange@...hat.com, raquini@...hat.com, 
	anshuman.khandual@....com, catalin.marinas@....com, tiwai@...e.de, 
	will@...nel.org, dave.hansen@...ux.intel.com, jack@...e.cz, cl@...two.org, 
	jglisse@...gle.com, surenb@...gle.com, zokeefe@...gle.com, hannes@...xchg.org, 
	rientjes@...gle.com, mhocko@...e.com, rdunlap@...radead.org
Subject: Re: [PATCH v8 11/15] khugepaged: allow madvise_collapse to check all
 anonymous mTHP orders

On Fri, Jul 4, 2025 at 3:14 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Fri, 4 Jul 2025 14:11:13 +0800 Baolin Wang <baolin.wang@...ux.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 <npache@...hat.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.
> >
> > 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).

Thanks,
-- Nico
> >
> > [1]
> > https://lore.kernel.org/all/cover.1750815384.git.baolin.wang@linux.alibaba.com/
> > [2]
> > https://lore.kernel.org/all/23b8ad10-cd1f-45df-a25c-78d01c8af44f@redhat.com/
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ