[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231019134211.329-3-justinjiang@vivo.com>
Date: Thu, 19 Oct 2023 21:42:11 +0800
From: Zhiguo Jiang <justinjiang@...o.com>
To: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com, Zhiguo Jiang <justinjiang@...o.com>
Subject: [PATCH v2 2/2] mm:vmscan: the ref clean dirty folio skip unmap
If the dirty folio in folio_list which is inactive file lru is
FOLIOREF_RECLAIM_CLEAN, the dirty folio can skip unmap in advance
to reduce recyling time.
Signed-off-by: Zhiguo Jiang <justinjiang@...o.com>
---
Changelog:
v1->v2:
1. The dirty folio in folio_list wich FOLIOREF_RECLAIM_CLEAN skip
unmap in advance.
mm/vmscan.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index e067269275a5..e587dafeef94 100755
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1225,7 +1225,10 @@ static unsigned int shrink_folio_list(struct list_head *folio_list,
stat->nr_ref_keep += nr_pages;
goto keep_locked;
case FOLIOREF_RECLAIM:
+ break;
case FOLIOREF_RECLAIM_CLEAN:
+ if (dirty)
+ goto activate_locked;
; /* try to reclaim the folio below */
}
--
2.39.0
Powered by blists - more mailing lists