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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240827022911.bcje3ofucegg6vjl@oppo.com>
Date: Tue, 27 Aug 2024 10:29:11 +0800
From: Hailong Liu <hailong.liu@...o.com>
To: Barry Song <21cnbao@...il.com>
CC: Lokesh Gidra <lokeshgidra@...gle.com>, Suren Baghdasaryan
	<surenb@...gle.com>, Nicolas Geoffray <ngeoffray@...gle.com>, Michal Hocko
	<mhocko@...e.com>, gaoxu <gaoxu2@...or.com>, Andrew Morton
	<akpm@...ux-foundation.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Shaohua Li
	<shli@...com>, yipengxiang <yipengxiang@...or.com>, fengbaopeng
	<fengbaopeng@...or.com>, Kalesh Singh <kaleshsingh@...gle.com>
Subject: Re: [PATCH v2] mm: add lazyfree folio to lru tail

On Tue, 27. Aug 14:18, Barry Song wrote:
> On Tue, Aug 27, 2024 at 2:13 PM Hailong Liu <hailong.liu@...o.com> wrote:
> >
> > On Mon, 26. Aug 09:37, Lokesh Gidra wrote:
> > >
> > > IMHO, within LRU_INACTIVE_FILE, MADV_FREE'ed pages should be
> > > prioritized for reclamation over file ones.
> >
> >
> > > >
> > > > Adding Lokesh.
> > > > Lokesh, could you please comment on the reasoning behind the above
> > > > mentioned change?
> > >
> > > Adding Nicolas as well, in case he wants to add something.
> > IMHO, lruvec_add_folio is enough. if lruvec_add_folio_tail why not use
> > MADV_DONTNEED instead? In MM the reclaim policy prefer to reclaim file cache, if
> > MADV_FREE'd pages directly add to the tail, they might be reclaimed instantly.
> > Also the benefit of workingset_refault_file cannot be convinced for me.
>
> My understanding is that MADV_DONTNEED will immediately free the memory,
> whereas MADV_FREE will release memory only under memory pressure. If
> memory pressure is low, the anonymous memory may still be gotten back
> without causing page faults. This might be what Lokesh is aiming to achieve.
>
Hmm, IIUC, for the reason of watermark, the kswapd would do reclamation without
memory pressure. I worried here is that the madv_free'd pages reclaimed too fast
if add to tail.
> >
> > So we should know the reasons and the benefits of the changes. page faults or ?
> > > >
> > > > >
> > > > > >
> > > > > > --
> > > > > > Michal Hocko
> > > > > > SUSE Labs
> > > > > >
> > > > >
>
> Thanks
> Barry

--

Help you, Help me,
Hailong.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ