Skip to content

Commit 59d76bd

Browse files
damentzintersectRaven
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 9572b4f commit 59d76bd

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
@@ -4333,7 +4333,11 @@ static int get_swappiness(struct lruvec *lruvec)
43334333
return swappiness;
43344334
}
43354335

4336+
#ifdef CONFIG_ZEN_INTERACTIVE
4337+
static DEFINE_RATELIMIT_STATE(lru_gen_min_ttl, 1000, 1);
4338+
#else
43364339
static DEFINE_RATELIMIT_STATE(lru_gen_min_ttl, 0, 1);
4340+
#endif
43374341

43384342
static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc,
43394343
int swappiness)

0 commit comments

Comments
 (0)