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(+)
23 @@ -6160,12 +6160,17 @@ void lru_gen_exit_memcg(struct mem_cgrou
27 + VM_WARN_ON_ONCE(!list_empty(&memcg->mm_list.fifo));
30 struct lruvec *lruvec = get_lruvec(memcg, nid);
32 + VM_WARN_ON_ONCE(lruvec->mm_state.nr_walkers);
33 VM_WARN_ON_ONCE(memchr_inv(lruvec->lrugen.nr_pages, 0,
34 sizeof(lruvec->lrugen.nr_pages)));
36 + lruvec->lrugen.list.next = LIST_POISON1;
38 for (i = 0; i < NR_BLOOM_FILTERS; i++) {
39 bitmap_free(lruvec->mm_state.filters[i]);
40 lruvec->mm_state.filters[i] = NULL;