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 torvalds#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 authored and intersectRaven committed Aug 31, 2023
1 parent bd3a369 commit d70d2e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -4594,7 +4594,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)
{
Expand Down

0 comments on commit d70d2e7

Please sign in to comment.