diff mbox series

[V3,3/3] mm: vmscan: add more comments about cache_trim_mode

Message ID 6a27dbcfe0c3014261380baa111adf3a7aa15847.1744169302.git.hezhongkun.hzk@bytedance.com (mailing list archive)
State New
Headers show
Series add max arg to swappiness in memory.reclaim and lru_gen | expand

Commit Message

Zhongkun He April 9, 2025, 7:06 a.m. UTC
Add more comments for cache_trim_mode, and the annotations
provided by Johannes Weiner in [1].

[1]:
https://lore.kernel.org/all/20250314141833.GA1316033@cmpxchg.org/

Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
---
 mm/vmscan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 18a175752b57..ffa8a7a97c8f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2530,7 +2530,8 @@  static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
 
 	/*
 	 * If there is enough inactive page cache, we do not reclaim
-	 * anything from the anonymous working right now.
+	 * anything from the anonymous working right now to make sure
+         * a streaming file access pattern doesn't cause swapping.
 	 */
 	if (sc->cache_trim_mode) {
 		scan_balance = SCAN_FILE;