From 73d8a013f317031bf7c9114b5ced2932e1a32f51 Mon Sep 17 00:00:00 2001 From: Steven Barrett Date: Wed, 11 Aug 2021 18:47:46 -0500 Subject: [PATCH] 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. --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 4440beeedd9923..eb09dd5de38c6c 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3922,7 +3922,7 @@ static bool lruvec_is_reclaimable(struct lruvec *lruvec, struct scan_control *sc } /* to protect the working set of the last N jiffies */ -static unsigned long lru_gen_min_ttl __read_mostly; +static unsigned long lru_gen_min_ttl __read_mostly = HZ; static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) {