Skip to content

Commit 0696726

Browse files
committed
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 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.
1 parent 2be4e05 commit 0696726

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mm/vmscan.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4299,7 +4299,11 @@ static bool age_lruvec(struct lruvec *lruvec, struct scan_control *sc,
42994299
}
43004300

43014301
/* to protect the working set of the last N jiffies */
4302+
#ifdef CONFIG_ZEN_INTERACTIVE
4303+
static unsigned long lru_gen_min_ttl = HZ;
4304+
#else
43024305
static unsigned long lru_gen_min_ttl __read_mostly;
4306+
#endif
43034307

43044308
static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
43054309
{

0 commit comments

Comments
 (0)