Lines Matching defs:shadow

177  * slot of the evicted page.  This is called a shadow entry.
179 * On cache misses for which there are shadow entries, an eligible
210 static void unpack_shadow(void *shadow, int *memcgidp, pg_data_t **pgdat,
213 unsigned long entry = xa_to_value(shadow);
261 * Tests if the shadow entry is for a folio that was recently evicted.
262 * Fills in @lruvec, @token, @workingset with the values unpacked from shadow.
264 static bool lru_gen_test_recent(void *shadow, struct lruvec **lruvec,
272 unpack_shadow(shadow, &memcg_id, &pgdat, token, workingset);
283 static void lru_gen_refault(struct folio *folio, void *shadow)
296 recent = lru_gen_test_recent(shadow, &lruvec, &token, &workingset);
333 static bool lru_gen_test_recent(void *shadow, struct lruvec **lruvec,
339 static void lru_gen_refault(struct folio *folio, void *shadow)
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
416 * Return: true if the shadow is for a recently evicted folio; false otherwise.
418 bool workingset_test_recent(void *shadow, bool file, bool *workingset,
434 recent = lru_gen_test_recent(shadow, &eviction_lruvec, &eviction, workingset);
440 unpack_shadow(shadow, &memcgid, &pgdat, &eviction, workingset);
487 * special case: usually, shadow entries have a short lifetime
490 * nonresident_age to lap a shadow entry in the field, which
528 * @shadow: Shadow entry of the evicted folio.
534 void workingset_refault(struct folio *folio, void *shadow)
546 lru_gen_refault(folio, shadow);
566 if (!workingset_test_recent(shadow, file, &workingset, true))
606 * create excessive amounts of shadow nodes. To keep a lid on this,
607 * track shadow nodes and reclaim them when they grow way past the
618 * Track non-empty nodes that contain only shadow entries;
653 * containing shadow entries. We don't need to keep more
654 * shadow entries than possible pages on the active list,
661 * Nodes might be sparsely populated, with only one shadow
663 * node for every eligible shadow entry, so compromise on a
668 * each, this will reclaim shadow entries when they consume
708 * the shadow node LRU under the i_pages lock and the
743 * The nodes should only contain one or more shadow entries,
805 "mm-shadow");