1
0
linux/debian/patches/patchset-zen/sauce/0015-ZEN-INTERACTIVE-Tune-mgLRU-to-protect-cache-used-in-.patch
2024-12-05 18:46:18 +03:00

42 lines
1.3 KiB
Diff

From f5b82cc382eaf3ddf5c26f60965037bde8733445 Mon Sep 17 00:00:00 2001
From: Steven Barrett <steven@liquorix.net>
Date: Wed, 11 Aug 2021 18:47:46 -0500
Subject: ZEN: INTERACTIVE: Tune mgLRU to protect cache used in the last second
Although not identical to the le9 patches that protect a byte-amount of
cache through tunables, multigenerational LRU now supports protecting
cache accessed in the last X milliseconds.
In #218, Yu recommends starting with 1000ms and tuning as needed. This
looks like a safe default and turning on this feature should help users
that don't know they need it.
---
init/Kconfig | 1 +
mm/vmscan.c | 4 ++++
2 files changed, 5 insertions(+)
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -157,6 +157,7 @@ config ZEN_INTERACTIVE
--- Virtual Memory Subsystem ---------------------------
Background-reclaim hugepages...: no -> yes
+ MG-LRU minimum cache TTL.......: 0 -> 1000 ms
config BROKEN
bool
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3974,7 +3974,11 @@ static bool lruvec_is_reclaimable(struct
}
/* to protect the working set of the last N jiffies */
+#ifdef CONFIG_ZEN_INTERACTIVE
+static unsigned long lru_gen_min_ttl __read_mostly = HZ;
+#else
static unsigned long lru_gen_min_ttl __read_mostly;
+#endif
static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
{