[mm-unstable,v1,8/8] mm: multi-gen LRU: simplify arch_has_hw_pte_young() check

Message ID 20221201223923.873696-9-yuzhao@google.com
State New
Headers
Series mm: multi-gen LRU: memcg LRU |

Commit Message

Yu Zhao Dec. 1, 2022, 10:39 p.m. UTC
  Scanning page tables when hardware does not set the accessed bit has
no real use cases.

Signed-off-by: Yu Zhao <yuzhao@google.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 39724e7ae837..5994592c55fd 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4412,7 +4412,7 @@  static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq,
 	 * handful of PTEs. Spreading the work out over a period of time usually
 	 * is less efficient, but it avoids bursty page faults.
 	 */
-	if (!force_scan && !(arch_has_hw_pte_young() && get_cap(LRU_GEN_MM_WALK))) {
+	if (!arch_has_hw_pte_young() || !get_cap(LRU_GEN_MM_WALK)) {
 		success = iterate_mm_list_nowalk(lruvec, max_seq);
 		goto done;
 	}