From: Hailong Liu <hailong.liu@oppo.com>
To: Barry Song <21cnbao@gmail.com>
Cc: Lokesh Gidra <lokeshgidra@google.com>,
Suren Baghdasaryan <surenb@google.com>,
Nicolas Geoffray <ngeoffray@google.com>,
Michal Hocko <mhocko@suse.com>, gaoxu <gaoxu2@honor.com>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Shaohua Li <shli@fb.com>, yipengxiang <yipengxiang@honor.com>,
fengbaopeng <fengbaopeng@honor.com>,
Kalesh Singh <kaleshsingh@google.com>
Subject: Re: [PATCH v2] mm: add lazyfree folio to lru tail
Date: Tue, 27 Aug 2024 10:29:11 +0800 [thread overview]
Message-ID: <20240827022911.bcje3ofucegg6vjl@oppo.com> (raw)
In-Reply-To: <CAGsJ_4wUrm1Q7Oxb5BHC2ypyf4wAH+UO9KYhCUwsEbhkcc7QGg@mail.gmail.com>
On Tue, 27. Aug 14:18, Barry Song wrote:
> On Tue, Aug 27, 2024 at 2:13 PM Hailong Liu <hailong.liu@oppo.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.
next prev parent reply other threads:[~2024-08-27 2:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 7:48 gaoxu
2024-08-16 10:19 ` David Hildenbrand
2024-08-16 10:21 ` David Hildenbrand
2024-08-19 16:11 ` Suren Baghdasaryan
2024-08-20 10:11 ` Barry Song
2024-08-20 11:53 ` 回复: " gaoxu
2024-08-20 21:46 ` Barry Song
2024-08-21 12:46 ` Michal Hocko
2024-08-21 21:47 ` Barry Song
2024-08-23 23:39 ` Suren Baghdasaryan
2024-08-26 16:37 ` Lokesh Gidra
2024-08-26 19:54 ` Barry Song
2024-08-27 0:12 ` Lokesh Gidra
2024-08-27 2:21 ` Barry Song
2024-08-27 4:07 ` 回复: " gaoxu
2024-08-27 17:56 ` Minchan Kim
2024-08-29 3:55 ` 回复: " gaoxu
2024-09-10 8:51 ` Barry Song
2024-08-27 2:13 ` Hailong Liu
2024-08-27 2:18 ` Barry Song
2024-08-27 2:29 ` Hailong Liu [this message]
2024-09-09 22:22 ` Andrew Morton
2024-09-10 8:20 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240827022911.bcje3ofucegg6vjl@oppo.com \
--to=hailong.liu@oppo.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fengbaopeng@honor.com \
--cc=gaoxu2@honor.com \
--cc=kaleshsingh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lokeshgidra@google.com \
--cc=mhocko@suse.com \
--cc=ngeoffray@google.com \
--cc=shli@fb.com \
--cc=surenb@google.com \
--cc=yipengxiang@honor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox