Skip to content

Commit e6d55b8

Browse files
damentzKaz205
authored andcommitted
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 c918e14 commit e6d55b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mm/vmscan.c

+4
Original file line numberDiff line numberDiff line change
@@ -4604,7 +4604,11 @@ static bool lruvec_is_reclaimable(struct lruvec *lruvec, struct scan_control *sc
46044604
}
46054605

46064606
/* to protect the working set of the last N jiffies */
4607+
#ifdef CONFIG_ZEN_INTERACTIVE
4608+
static unsigned long lru_gen_min_ttl __read_mostly = HZ;
4609+
#else
46074610
static unsigned long lru_gen_min_ttl __read_mostly;
4611+
#endif
46084612

46094613
static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
46104614
{

0 commit comments

Comments
 (0)