ramips: add support for Keenetic Lite III rev. A
[openwrt/staging/dedeckeh.git] / target / linux / generic / backport-5.15 / 020-v6.1-09-mm-multigenerational-lru-Kconfig.patch
1 From 3008095eb835d207dd7e5b60899aad17f32aa9f7 Mon Sep 17 00:00:00 2001
2 From: Yu Zhao <yuzhao@google.com>
3 Date: Mon, 25 Jan 2021 21:47:24 -0700
4 Subject: [PATCH 09/10] mm: multigenerational lru: Kconfig
5
6 Add configuration options for the multigenerational lru.
7
8 Signed-off-by: Yu Zhao <yuzhao@google.com>
9 Tested-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
10 Change-Id: Ic74ea07f8fb5f56e6904a1b80c3c286bc2911635
11 ---
12 mm/Kconfig | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
13 1 file changed, 59 insertions(+)
14
15 --- a/mm/Kconfig
16 +++ b/mm/Kconfig
17 @@ -899,4 +899,63 @@ config SECRETMEM
18
19 source "mm/damon/Kconfig"
20
21 +# the multigenerational lru {
22 +config LRU_GEN
23 + bool "Multigenerational LRU"
24 + depends on MMU
25 + # the following options may leave not enough spare bits in page->flags
26 + depends on !MAXSMP && (64BIT || !SPARSEMEM || SPARSEMEM_VMEMMAP)
27 + help
28 + A high performance LRU implementation to heavily overcommit workloads
29 + that are not IO bound. See Documentation/vm/multigen_lru.rst for
30 + details.
31 +
32 + Warning: do not enable this option unless you plan to use it because
33 + it introduces a small per-process and per-memcg and per-node memory
34 + overhead.
35 +
36 +config LRU_GEN_ENABLED
37 + bool "Turn on by default"
38 + depends on LRU_GEN
39 + help
40 + The default value of /sys/kernel/mm/lru_gen/enabled is 0. This option
41 + changes it to 1.
42 +
43 + Warning: the default value is the fast path. See
44 + Documentation/static-keys.txt for details.
45 +
46 +config LRU_GEN_STATS
47 + bool "Full stats for debugging"
48 + depends on LRU_GEN
49 + help
50 + This option keeps full stats for each generation, which can be read
51 + from /sys/kernel/debug/lru_gen_full.
52 +
53 + Warning: do not enable this option unless you plan to use it because
54 + it introduces an additional small per-process and per-memcg and
55 + per-node memory overhead.
56 +
57 +config NR_LRU_GENS
58 + int "Max number of generations"
59 + depends on LRU_GEN
60 + range 4 31
61 + default 7
62 + help
63 + This will use order_base_2(N+1) spare bits from page flags.
64 +
65 + Warning: do not use numbers larger than necessary because each
66 + generation introduces a small per-node and per-memcg memory overhead.
67 +
68 +config TIERS_PER_GEN
69 + int "Number of tiers per generation"
70 + depends on LRU_GEN
71 + range 2 5
72 + default 4
73 + help
74 + This will use N-2 spare bits from page flags.
75 +
76 + Larger values generally offer better protection to active pages under
77 + heavy buffered I/O workloads.
78 +# }
79 +
80 endmenu