diff mbox series

[v14-fix,02/11] mm: multi-gen LRU: add comment in lru_gen_use_mm()

Message ID 20220918204755.3135720-2-yuzhao@google.com (mailing list archive)
State New
Headers show
Series [v14-fix,01/11] mm: multi-gen LRU: update admin guide | expand

Commit Message

Yu Zhao Sept. 18, 2022, 8:47 p.m. UTC
Link: https://lore.kernel.org/r/CAOUHufY91Eju-g1+xbUsGkGZ-cwBm78v+S_Air7Cp8mAnYJVYA@mail.gmail.com/
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Yu Zhao <yuzhao@google.com>
---
 include/linux/mm_types.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 882c31e03cca..500e536796ca 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -18,7 +18,6 @@ 
 #include <linux/page-flags-layout.h>
 #include <linux/workqueue.h>
 #include <linux/seqlock.h>
-#include <linux/mmdebug.h>
 
 #include <asm/mmu.h>
 
@@ -770,6 +769,11 @@  static inline void lru_gen_init_mm(struct mm_struct *mm)
 
 static inline void lru_gen_use_mm(struct mm_struct *mm)
 {
+	/*
+	 * When the bitmap is set, page reclaim knows this mm_struct has been
+	 * used since the last time it cleared the bitmap. So it might be worth
+	 * walking the page tables of this mm_struct to clear the accessed bit.
+	 */
 	WRITE_ONCE(mm->lru_gen.bitmap, -1);
 }