mm: multi-gen LRU: simplify lru_gen_look_around()
authorT.J. Alumbaugh <talumbau@google.com>
Wed, 18 Jan 2023 00:18:27 +0000 (00:18 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:33:28 +0000 (22:33 -0800)
commitabf086721a2f1e6897c57796f7268df1b194c750
tree680aa18af6eeca00882d8a3668b962ca67f9bb6f
parentb5ff4133617d0eced35b685da0bd0929dd9fabb7
mm: multi-gen LRU: simplify lru_gen_look_around()

Update the folio generation in place with or without
current->reclaim_state->mm_walk.  The LRU lock is held for longer, if
mm_walk is NULL and the number of folios to update is more than
PAGEVEC_SIZE.

This causes a measurable regression from the LRU lock contention during a
microbencmark.  But a tiny regression is not worth the complexity.

Link: https://lkml.kernel.org/r/20230118001827.1040870-8-talumbau@google.com
Signed-off-by: T.J. Alumbaugh <talumbau@google.com>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c