mm/mglru: improve should_run_aging()
authorKinsey Ho <kinseyho@google.com>
Wed, 14 Feb 2024 06:05:35 +0000 (06:05 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 18:24:58 +0000 (10:24 -0800)
commit51973cc9e53899e50e47c1e4c2967c3021cb6257
tree7daee51fca33a925da89dccbe92481cb23b216a0
parent1ce2292c148043360c49122b1310da7132f1b8f6
mm/mglru: improve should_run_aging()

scan_control *sc does not need to be passed into should_run_aging(), as it
provides only the reclaim priority.  This can be moved to
get_nr_to_scan().

Refactor should_run_aging() and get_nr_to_scan() to improve code
readability.  No functional changes.

Link: https://lkml.kernel.org/r/20240214060538.3524462-3-kinseyho@google.com
Signed-off-by: Kinsey Ho <kinseyho@google.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Donet Tom <donettom@linux.vnet.ibm.com>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c