Skip to content

Commit

Permalink
ZEN: Tune mgLRU to protect cache used in the last second
Browse files Browse the repository at this point in the history
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 raspberrypi#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.
  • Loading branch information
damentz committed Nov 11, 2021
1 parent 87542b2 commit 8d4b19a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mm/vmscan.c
Expand Up @@ -4138,7 +4138,11 @@ static bool age_lruvec(struct lruvec *lruvec, struct scan_control *sc,
}

/* Protect the working set accessed within the last N milliseconds. */
#ifdef CONFIG_ZEN_INTERACTIVE
static unsigned long lru_gen_min_ttl = 1000;
#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)
{
Expand Down

0 comments on commit 8d4b19a

Please sign in to comment.