All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-add-lazyfree-folio-to-lru-tail.patch added to mm-unstable branch
@ 2024-08-16 21:53 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-08-16 21:53 UTC (permalink / raw)
  To: mm-commits, surenb, shli, kaleshsingh, gaoxu2, david, gaoxu2,
	akpm


The patch titled
     Subject: mm: add lazyfree folio to lru tail
has been added to the -mm mm-unstable branch.  Its filename is
     mm-add-lazyfree-folio-to-lru-tail.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-add-lazyfree-folio-to-lru-tail.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: gaoxu <gaoxu2@honor.com>
Subject: mm: add lazyfree folio to lru tail
Date: Fri, 16 Aug 2024 07:48:01 +0000

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.

Link: https://lkml.kernel.org/r/f29f64e29c08427b95e3df30a5770056@honor.com
Signed-off-by: gao xu <gaoxu2@hihonor.com>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Shaohua Li <shli@fb.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/swap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/swap.c~mm-add-lazyfree-folio-to-lru-tail
+++ a/mm/swap.c
@@ -641,7 +641,7 @@ static void lru_lazyfree(struct lruvec *
 	 * 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);
_

Patches currently in -mm which might be from gaoxu2@honor.com are

mm-add-lazyfree-folio-to-lru-tail.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-16 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-16 21:53 + mm-add-lazyfree-folio-to-lru-tail.patch added to mm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.