+ mm-vmscan-dont-turn-on-cache_trim_mode-at-the-highest-scan-priority.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm, vmscan: don't turn on cache_trim_mode at the highest scan priority
has been added to the -mm mm-unstable branch.  Its filename is
     mm-vmscan-dont-turn-on-cache_trim_mode-at-the-highest-scan-priority.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmscan-dont-turn-on-cache_trim_mode-at-the-highest-scan-priority.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: Byungchul Park <byungchul@xxxxxx>
Subject: mm, vmscan: don't turn on cache_trim_mode at the highest scan priority
Date: Thu, 8 Feb 2024 15:18:25 +0900

With cache_trim_mode on, reclaim logic doesn't bother reclaiming anon
pages.  However, it should be more careful to turn on the mode because
it's going to prevent anon pages from being reclaimed even if there are a
huge number of anon pages that are very cold and which should be
reclaimed.  Even worse, that can lead kswapd_failures to reach
MAX_RECLAIM_RETRIES and stopping kswapd until direct reclaim eventually
works to resume kswapd.

Link: https://lkml.kernel.org/r/20240208061825.36640-1-byungchul@xxxxxx
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Cc: Yu Zhao <yuzhao@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/vmscan.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/vmscan.c~mm-vmscan-dont-turn-on-cache_trim_mode-at-the-highest-scan-priority
+++ a/mm/vmscan.c
@@ -2269,7 +2269,8 @@ static void prepare_scan_control(pg_data
 	 * anonymous pages.
 	 */
 	file = lruvec_page_state(target_lruvec, NR_INACTIVE_FILE);
-	if (file >> sc->priority && !(sc->may_deactivate & DEACTIVATE_FILE))
+	if (sc->priority != 1 && file >> sc->priority &&
+	    !(sc->may_deactivate & DEACTIVATE_FILE))
 		sc->cache_trim_mode = 1;
 	else
 		sc->cache_trim_mode = 0;
_

Patches currently in -mm which might be from byungchul@xxxxxx are

mm-vmscan-dont-turn-on-cache_trim_mode-at-the-highest-scan-priority.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux