Skip to content

Commit 635a1af

Browse files
damentzheftig
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.
1 parent 26fcaf5 commit 635a1af

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

init/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ config ZEN_INTERACTIVE
159159
--- Virtual Memory Subsystem ---------------------------
160160

161161
Background-reclaim hugepages...: no -> yes
162+
MG-LRU minimum cache TTL.......: 0 -> 1000 ms
162163

163164
config BROKEN
164165
bool

mm/vmscan.c

+4
Original file line numberDiff line numberDiff line change
@@ -3992,7 +3992,11 @@ static bool lruvec_is_reclaimable(struct lruvec *lruvec, struct scan_control *sc
39923992
}
39933993

39943994
/* to protect the working set of the last N jiffies */
3995+
#ifdef CONFIG_ZEN_INTERACTIVE
3996+
static unsigned long lru_gen_min_ttl __read_mostly = HZ;
3997+
#else
39953998
static unsigned long lru_gen_min_ttl __read_mostly;
3999+
#endif
39964000

39974001
static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
39984002
{

0 commit comments

Comments
 (0)