diff options
Diffstat (limited to '0015-ZEN-Tune-mgLRU-to-protect-cache-used-in-the-last-sec.patch')
-rw-r--r-- | 0015-ZEN-Tune-mgLRU-to-protect-cache-used-in-the-last-sec.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/0015-ZEN-Tune-mgLRU-to-protect-cache-used-in-the-last-sec.patch b/0015-ZEN-Tune-mgLRU-to-protect-cache-used-in-the-last-sec.patch new file mode 100644 index 000000000000..8ee4aef66231 --- /dev/null +++ b/0015-ZEN-Tune-mgLRU-to-protect-cache-used-in-the-last-sec.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Steven Barrett <steven@liquorix.net> +Date: Wed, 11 Aug 2021 18:41:50 -0500 +Subject: [PATCH] ZEN: 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. +--- + mm/vmscan.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/mm/vmscan.c b/mm/vmscan.c +index aef71c45c424f046fe850a57c6b3fce10c63d93a..421e5a6eaedc2958e68dd67322b5725278ae5f38 100644 +--- a/mm/vmscan.c ++++ b/mm/vmscan.c +@@ -4355,7 +4355,11 @@ static bool age_lruvec(struct lruvec *lruvec, struct scan_control *sc, + } + + /* 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) + { |