Lines Matching full:shadow

176  * slot of the evicted page.  This is called a shadow entry.
178 * On cache misses for which there are shadow entries, an eligible
209 static void unpack_shadow(void *shadow, int *memcgidp, pg_data_t **pgdat, in unpack_shadow() argument
212 unsigned long entry = xa_to_value(shadow); in unpack_shadow()
259 * Tests if the shadow entry is for a folio that was recently evicted.
260 * Fills in @lruvec, @token, @workingset with the values unpacked from shadow.
262 static bool lru_gen_test_recent(void *shadow, bool file, struct lruvec **lruvec, in lru_gen_test_recent() argument
270 unpack_shadow(shadow, &memcg_id, &pgdat, token, workingset); in lru_gen_test_recent()
279 static void lru_gen_refault(struct folio *folio, void *shadow) in lru_gen_refault() argument
292 recent = lru_gen_test_recent(shadow, type, &lruvec, &token, &workingset); in lru_gen_refault()
333 static bool lru_gen_test_recent(void *shadow, bool file, struct lruvec **lruvec, in lru_gen_test_recent() argument
339 static void lru_gen_refault(struct folio *folio, void *shadow) in lru_gen_refault() argument
378 * Return: a shadow entry to be stored in @folio->mapping->i_pages in place
407 * workingset_test_recent - tests if the shadow entry is for a folio that was
409 * shadow.
410 * @shadow: the shadow entry to be tested.
412 * @workingset: where the workingset value unpacked from shadow should
415 * Return: true if the shadow is for a recently evicted folio; false otherwise.
417 bool workingset_test_recent(void *shadow, bool file, bool *workingset) in workingset_test_recent() argument
429 return lru_gen_test_recent(shadow, file, &eviction_lruvec, &eviction, workingset); in workingset_test_recent()
431 unpack_shadow(shadow, &memcgid, &pgdat, &eviction, workingset); in workingset_test_recent()
462 * special case: usually, shadow entries have a short lifetime in workingset_test_recent()
465 * nonresident_age to lap a shadow entry in the field, which in workingset_test_recent()
502 * @shadow: Shadow entry of the evicted folio.
508 void workingset_refault(struct folio *folio, void *shadow) in workingset_refault() argument
518 lru_gen_refault(folio, shadow); in workingset_refault()
542 if (!workingset_test_recent(shadow, file, &workingset)) in workingset_refault()
588 * Shadow entries reflect the share of the working set that does not
594 * create excessive amounts of shadow nodes. To keep a lid on this,
595 * track shadow nodes and reclaim them when they grow way past the
606 * Track non-empty nodes that contain only shadow entries; in workingset_update_node()
642 * containing shadow entries. We don't need to keep more in count_shadow_nodes()
643 * shadow entries than possible pages on the active list, in count_shadow_nodes()
650 * Nodes might be sparsely populated, with only one shadow in count_shadow_nodes()
652 * node for every eligible shadow entry, so compromise on a in count_shadow_nodes()
657 * each, this will reclaim shadow entries when they consume in count_shadow_nodes()
698 * the shadow node LRU under the i_pages lock and the in shadow_lru_isolate()
733 * The nodes should only contain one or more shadow entries, in shadow_lru_isolate()
800 ret = prealloc_shrinker(&workingset_shadow_shrinker, "mm-shadow"); in workingset_init()