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: <974d9d6c3b5e4848a32b930732366084@honor.com>
Date: Tue, 20 Aug 2024 11:53:59 +0000
From: gaoxu <gaoxu2@...or.com>
To: Barry Song <21cnbao@...il.com>
CC: Andrew Morton <akpm@...ux-foundation.org>, "linux-mm@...ck.org"
	<linux-mm@...ck.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Suren Baghdasaryan <surenb@...gle.com>,
	Shaohua Li <shli@...com>, yipengxiang <yipengxiang@...or.com>, fengbaopeng
	<fengbaopeng@...or.com>, Kalesh Singh <kaleshsingh@...gle.com>
Subject: 回复: [PATCH v2] mm: add lazyfree folio to lru tail

> 
> On Fri, Aug 16, 2024 at 7:48 PM gaoxu <gaoxu2@...or.com> wrote:
> >
> > Replace lruvec_add_folio with lruvec_add_folio_tail in the lru_lazyfree_fn:
> > 1. The lazy-free folio is added to the LRU_INACTIVE_FILE list. If it's
> >    moved to the LRU tail, it allows for faster release lazy-free folio and
> >    reduces the impact on file refault.
> > 2. When mglru is enabled, the lazy-free folio is reclaimabled and should be
> >    added using lru_gen_add_folio(lruvec, folio, true) instead of
> >    lru_gen_add_folio(lruvec, folio, false) for adding to gen.
> >
> > With the change in place, workingset_refault_file is reduced by 33% in
> > the continuous startup testing of the applications in the Android system.
> >
> 
> Hi Gao,
> 
> Just curious, in which scenario are we frequently calling MADV_FREE but not
> MADV_DONTNEED?
Hi Song,
 Android ART use MADV_FREE, please refer to the following link.
 https://android-review.googlesource.com/c/platform/art/+/2633132
> 
> > Signed-off-by: gao xu <gaoxu2@...onor.com>
> > ---
> > V1 -> V2: Based on the latest mm-unstable, recreate the patch.
> >
> >  mm/swap.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/swap.c b/mm/swap.c
> > index 6b838986d..e0dbfc983 100644
> > --- a/mm/swap.c
> > +++ b/mm/swap.c
> > @@ -641,7 +641,7 @@ static void lru_lazyfree(struct lruvec *lruvec, struct
> folio *folio)
> >          * anonymous folios
> >          */
> >         folio_clear_swapbacked(folio);
> > -       lruvec_add_folio(lruvec, folio);
> > +       lruvec_add_folio_tail(lruvec, folio);
> >
> >         __count_vm_events(PGLAZYFREE, nr_pages);
> >         __count_memcg_events(lruvec_memcg(lruvec), PGLAZYFREE,
> > nr_pages);
> > --
> > 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ