Skip to content

Commit 2fac020

Browse files
damentzkakra
authored andcommitted
ZEN: INTERACTIVE: 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. Signed-off-by: Kai Krakow <[email protected]>
1 parent c423a63 commit 2fac020

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

init/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ config ZEN_INTERACTIVE
176176
--- Virtual Memory Subsystem ---------------------------
177177

178178
Background-reclaim hugepages...: no -> yes
179+
MG-LRU minimum cache TTL.......: 0 -> 1000 ms
179180

180181
config BROKEN
181182
bool

mm/vmscan.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4007,7 +4007,11 @@ static bool lruvec_is_reclaimable(struct lruvec *lruvec, struct scan_control *sc
40074007
}
40084008

40094009
/* to protect the working set of the last N jiffies */
4010+
#ifdef CONFIG_ZEN_INTERACTIVE
4011+
static unsigned long lru_gen_min_ttl __read_mostly = HZ;
4012+
#else
40104013
static unsigned long lru_gen_min_ttl __read_mostly;
4014+
#endif
40114015

40124016
static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
40134017
{

0 commit comments

Comments
 (0)