linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 1/1] mm: Skip folio with private data during isolation
@ 2024-08-26  8:50 zhaoyang.huang
  2024-08-26 10:36 ` David Hildenbrand
  0 siblings, 1 reply; 7+ messages in thread
From: zhaoyang.huang @ 2024-08-26  8:50 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Matthew Wilcox, Yu Zhao,
	Baolin Wang, linux-mm, Zhaoyang Huang, steve.kang

From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>

Since clean target folio with private data will be given up finally in
__remove_mapping as it has extra refcnt, it is better to skip it during
isolation to save the slot for more qualified folio. Current one could
be the candidate for next round of scanning after the private data gone.

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
 mm/vmscan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index cfa839284b92..755bf3a387f3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1685,6 +1685,8 @@ static unsigned long isolate_lru_folios(unsigned long nr_to_scan,
 		 */
 		scan += nr_pages;
 
+		if (folio_test_private(folio) && !folio_test_dirty(folio))
+			goto move;
 		if (!folio_test_lru(folio))
 			goto move;
 		if (!sc->may_unmap && folio_mapped(folio))
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-27  2:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26  8:50 [RFC PATCH 1/1] mm: Skip folio with private data during isolation zhaoyang.huang
2024-08-26 10:36 ` David Hildenbrand
2024-08-26 11:10   ` Zhaoyang Huang
2024-08-26 13:01     ` David Hildenbrand
2024-08-27  2:45       ` Zhaoyang Huang
2024-08-27  2:49         ` Matthew Wilcox
2024-08-27  2:53           ` Zhaoyang Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).