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] [day] [month] [year] [list]
Message-ID: <CACZaFFObE7fy8yRNFoYhntOP_x-7eXRbVhTg0xH-SjWSyjwfpg@mail.gmail.com>
Date: Sun, 8 Feb 2026 21:26:19 +0800
From: Vernon Yang <vernon2gm@...il.com>
To: "David Hildenbrand (Arm)" <david@...nel.org>
Cc: Barry Song <21cnbao@...il.com>, Lance Yang <lance.yang@...ux.dev>, akpm@...ux-foundation.org, 
	lorenzo.stoakes@...cle.com, ziy@...dia.com, dev.jain@....com, 
	linux-mm@...ck.org, linux-kernel@...r.kernel.org, 
	Vernon Yang <yanglincheng@...inos.cn>
Subject: Re: [PATCH mm-new v7 4/5] mm: khugepaged: skip lazy-free folios

On Sun, Feb 8, 2026 at 6:25 AM David Hildenbrand (Arm) <david@...nel.org> wrote:
>
> On 2/7/26 23:17, Barry Song wrote:
> > On Sun, Feb 8, 2026 at 6:05 AM David Hildenbrand (Arm) <david@...nel.org> wrote:
> >>
> >> On 2/7/26 23:01, Barry Song wrote:
> >>>
> >>> Maybe change “just not skip” to “just skip”?
> >>>
> >>> If the goal is to avoid the collapse overhead for folios that are
> >>> about to be dropped, we might consider skipping collapse for the
> >>> entire VMA?
> >> If there is no memory pressure in the system, why wouldn't you just want
> >> to collapse in a VM_DROPPABLE region?
> >>
> >> "about to be dropped" only applies once there is actual memory pressure.
> >> If not, these pages stick around forever.
> >
> >   agree. But this brings us back to the philosophy of the original patch.
> > If there is no memory pressure, lazyfree folios won’t be dropped, so
> > collapsing them might also be reasonable.
>
> It's about memory pressure in the future.
>
> >
> > Just collapsing fully lazyfree folios with VM_DROPPABLE while
> > skipping partially lazyfree VMAs seems a bit confusing to me :-)
>
> Think of it like this:
>
> All folios in VM_DROPPABLE are lazyfree. Collapsing maintains that
> property. So you can just collapse and memory pressure in the future
> will free it up.
>
> In contrast, collapsing in !VM_DROPPABLE does not maintain that
> property. The collapsed folio will not be lazyfree and memory pressure
> in the future will not be able to free it up.

Thank you Barry for pointing out this corner case, and thank you David for
suggestions and explanations.

LGTM, I will fix it in the next version.

---
Thanks,
Vernon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ