diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-12-20 23:47:18 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-20 23:47:18 +0100 |
commit | a721aeac8bc2cade37e68ea195f28d2ed28c1130 (patch) | |
tree | 34da931ad1d0d715c4fde89d19af67780e40a6aa /mm/workingset.c | |
parent | maple_tree: change return type of mas_split_final_node as void. (diff) | |
parent | mailmap: add an old address for Naoya Horiguchi (diff) | |
download | linux-a721aeac8bc2cade37e68ea195f28d2ed28c1130.tar.xz linux-a721aeac8bc2cade37e68ea195f28d2ed28c1130.zip |
sync mm-stable with mm-hotfixes-stable to pick up depended-upon changes
Diffstat (limited to 'mm/workingset.c')
-rw-r--r-- | mm/workingset.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/workingset.c b/mm/workingset.c index c17d45c6f29b..3ea2ccb8e57d 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -313,10 +313,10 @@ static void lru_gen_refault(struct folio *folio, void *shadow) * 1. For pages accessed through page tables, hotter pages pushed out * hot pages which refaulted immediately. * 2. For pages accessed multiple times through file descriptors, - * numbers of accesses might have been out of the range. + * they would have been protected by sort_folio(). */ - if (lru_gen_in_fault() || refs == BIT(LRU_REFS_WIDTH)) { - folio_set_workingset(folio); + if (lru_gen_in_fault() || refs >= BIT(LRU_REFS_WIDTH) - 1) { + set_mask_bits(&folio->flags, 0, LRU_REFS_MASK | BIT(PG_workingset)); mod_lruvec_state(lruvec, WORKINGSET_RESTORE_BASE + type, delta); } unlock: |