1 From bec433f29537652ed054148edfd7e2183ddcf7c3 Mon Sep 17 00:00:00 2001
2 From: "T.J. Alumbaugh" <talumbau@google.com>
3 Date: Wed, 18 Jan 2023 00:18:25 +0000
4 Subject: [PATCH 16/19] UPSTREAM: mm: multi-gen LRU: improve
7 Add warnings and poison ->next.
9 Link: https://lkml.kernel.org/r/20230118001827.1040870-6-talumbau@google.com
10 Change-Id: I53de9e04c1ae941e122b33cd45d2bbb5f34aae0c
11 Signed-off-by: T.J. Alumbaugh <talumbau@google.com>
12 Cc: Yu Zhao <yuzhao@google.com>
13 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
14 (cherry picked from commit 37cc99979d04cca677c0ad5c0acd1149ec165d1b)
16 Signed-off-by: T.J. Mercier <tjmercier@google.com>
19 1 file changed, 5 insertions(+)
21 diff --git a/mm/vmscan.c b/mm/vmscan.c
22 index ccde215c084ca..d5d6f8d94f58a 100644
25 @@ -6160,12 +6160,17 @@ void lru_gen_exit_memcg(struct mem_cgroup *memcg)
29 + VM_WARN_ON_ONCE(!list_empty(&memcg->mm_list.fifo));
32 struct lruvec *lruvec = get_lruvec(memcg, nid);
34 + VM_WARN_ON_ONCE(lruvec->mm_state.nr_walkers);
35 VM_WARN_ON_ONCE(memchr_inv(lruvec->lrugen.nr_pages, 0,
36 sizeof(lruvec->lrugen.nr_pages)));
38 + lruvec->lrugen.list.next = LIST_POISON1;
40 for (i = 0; i < NR_BLOOM_FILTERS; i++) {
41 bitmap_free(lruvec->mm_state.filters[i]);
42 lruvec->mm_state.filters[i] = NULL;