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
6 Add configuration options for the multigenerational lru.
8 Signed-off-by: Yu Zhao <yuzhao@google.com>
9 Tested-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
10 Change-Id: Ic74ea07f8fb5f56e6904a1b80c3c286bc2911635
12 mm/Kconfig | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
13 1 file changed, 59 insertions(+)
17 @@ -899,4 +899,63 @@ config SECRETMEM
19 source "mm/damon/Kconfig"
21 +# the multigenerational lru {
23 + bool "Multigenerational LRU"
25 + # the following options may leave not enough spare bits in page->flags
26 + depends on !MAXSMP && (64BIT || !SPARSEMEM || SPARSEMEM_VMEMMAP)
28 + A high performance LRU implementation to heavily overcommit workloads
29 + that are not IO bound. See Documentation/vm/multigen_lru.rst for
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
36 +config LRU_GEN_ENABLED
37 + bool "Turn on by default"
40 + The default value of /sys/kernel/mm/lru_gen/enabled is 0. This option
43 + Warning: the default value is the fast path. See
44 + Documentation/static-keys.txt for details.
47 + bool "Full stats for debugging"
50 + This option keeps full stats for each generation, which can be read
51 + from /sys/kernel/debug/lru_gen_full.
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.
58 + int "Max number of generations"
63 + This will use order_base_2(N+1) spare bits from page flags.
65 + Warning: do not use numbers larger than necessary because each
66 + generation introduces a small per-node and per-memcg memory overhead.
69 + int "Number of tiers per generation"
74 + This will use N-2 spare bits from page flags.
76 + Larger values generally offer better protection to active pages under
77 + heavy buffered I/O workloads.