5 Matching Annotations
- Feb 2025
-
elixir.bootlin.com elixir.bootlin.com
-
pressure = scale - (reclaimed * scale / scanned); pressure = pressure * 100 / scale;
Calculates pressure via reclaim efficiency rather than actual memory pressure.
-
-
elixir.bootlin.com elixir.bootlin.com
-
static ssize_t general_profit_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
Can be used to evaluate most efficient use of ksm
-
-
elixir.bootlin.com elixir.bootlin.com
-
if (new_order < MAX_PAGECACHE_ORDER) {
Adjusts new_order so that it's balanced with the readahead window size while increasing it as much as possible.
-
if (cur < max / 16) return 4 * cur; if (cur <= max / 2) return 2 * cur;
Set values for scaling readahead window. Might be too minor to need changes though.
-
unsigned long newsize = roundup_pow_of_two(size); if (newsize <= max / 32) newsize = newsize * 4; else if (newsize <= max / 4) newsize = newsize * 2; else newsize = max; return newsize;
These are all heuristics to determine intial readahead size. Trades potentially memory overuse for faster access. Could be changed to not use these hardcoded values.
-