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
431 bool recent = lru_gen_test_recent(shadow, file, in workingset_test_recent()
439 unpack_shadow(shadow, &memcgid, &pgdat, &eviction, workingset); in workingset_test_recent()
482 * special case: usually, shadow entries have a short lifetime in workingset_test_recent()
485 * nonresident_age to lap a shadow entry in the field, which in workingset_test_recent()
523 * @shadow: Shadow entry of the evicted folio.
529 void workingset_refault(struct folio *folio, void *shadow) in workingset_refault() argument
539 lru_gen_refault(folio, shadow); in workingset_refault()
560 if (!workingset_test_recent(shadow, file, &workingset)) in workingset_refault()
604 * Shadow entries reflect the share of the working set that does not
610 * create excessive amounts of shadow nodes. To keep a lid on this,
611 * track shadow nodes and reclaim them when they grow way past the
622 * Track non-empty nodes that contain only shadow entries; in workingset_update_node()
658 * containing shadow entries. We don't need to keep more in count_shadow_nodes()
659 * shadow entries than possible pages on the active list, in count_shadow_nodes()
666 * Nodes might be sparsely populated, with only one shadow in count_shadow_nodes()
668 * node for every eligible shadow entry, so compromise on a in count_shadow_nodes()
673 * each, this will reclaim shadow entries when they consume in count_shadow_nodes()
714 * the shadow node LRU under the i_pages lock and the in shadow_lru_isolate()
749 * The nodes should only contain one or more shadow entries, in shadow_lru_isolate()
812 "mm-shadow"); in workingset_init()