Lines Matching full: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, in unpack_shadow() argument
213 unsigned long entry = xa_to_value(shadow); in unpack_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, in lru_gen_test_recent() argument
272 unpack_shadow(shadow, &memcg_id, &pgdat, token, workingset); in lru_gen_test_recent()
283 static void lru_gen_refault(struct folio *folio, void *shadow) in lru_gen_refault() argument
296 recent = lru_gen_test_recent(shadow, &lruvec, &token, &workingset); in lru_gen_refault()
333 static bool lru_gen_test_recent(void *shadow, 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
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, in workingset_test_recent() argument
434 recent = lru_gen_test_recent(shadow, &eviction_lruvec, &eviction, workingset); in workingset_test_recent()
440 unpack_shadow(shadow, &memcgid, &pgdat, &eviction, workingset); in workingset_test_recent()
487 * special case: usually, shadow entries have a short lifetime in workingset_test_recent()
490 * nonresident_age to lap a shadow entry in the field, which in workingset_test_recent()
528 * @shadow: Shadow entry of the evicted folio.
534 void workingset_refault(struct folio *folio, void *shadow) in workingset_refault() argument
546 lru_gen_refault(folio, shadow); in workingset_refault()
566 if (!workingset_test_recent(shadow, file, &workingset, true)) in workingset_refault()
600 * Shadow entries reflect the share of the working set that does not
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
619 * Track non-empty nodes that contain only shadow entries; in workingset_update_node()
655 * containing shadow entries. We don't need to keep more in count_shadow_nodes()
656 * shadow entries than possible pages on the active list, in count_shadow_nodes()
663 * Nodes might be sparsely populated, with only one shadow in count_shadow_nodes()
665 * node for every eligible shadow entry, so compromise on a in count_shadow_nodes()
670 * each, this will reclaim shadow entries when they consume in count_shadow_nodes()
710 * the shadow node LRU under the i_pages lock and the in shadow_lru_isolate()
745 * The nodes should only contain one or more shadow entries, in shadow_lru_isolate()
807 "mm-shadow"); in workingset_init()