/linux-6.6.21/mm/ |
D | list_lru.c | 22 static inline bool list_lru_memcg_aware(struct list_lru *lru) in list_lru_memcg_aware() argument 24 return lru->memcg_aware; in list_lru_memcg_aware() 27 static void list_lru_register(struct list_lru *lru) in list_lru_register() argument 29 if (!list_lru_memcg_aware(lru)) in list_lru_register() 33 list_add(&lru->list, &memcg_list_lrus); in list_lru_register() 37 static void list_lru_unregister(struct list_lru *lru) in list_lru_unregister() argument 39 if (!list_lru_memcg_aware(lru)) in list_lru_unregister() 43 list_del(&lru->list); in list_lru_unregister() 47 static int lru_shrinker_id(struct list_lru *lru) in lru_shrinker_id() argument 49 return lru->shrinker_id; in lru_shrinker_id() [all …]
|
D | balloon_compaction.c | 48 list_for_each_entry_safe(page, tmp, pages, lru) { in balloon_page_list_enqueue() 49 list_del(&page->lru); in balloon_page_list_enqueue() 84 list_for_each_entry_safe(page, tmp, &b_dev_info->pages, lru) { in balloon_page_list_dequeue() 104 list_add(&page->lru, pages); in balloon_page_list_dequeue() 200 return list_first_entry(&pages, struct page, lru); in balloon_page_dequeue() 213 list_del(&page->lru); in balloon_page_isolate() 226 list_add(&page->lru, &b_dev_info->pages); in balloon_page_putback()
|
D | page_reporting.c | 183 list_for_each_entry_safe(page, next, list, lru) { in page_reporting_cycle() 218 if (!list_is_first(&page->lru, list)) in page_reporting_cycle() 219 list_rotate_to_front(&page->lru, list); in page_reporting_cycle() 243 next = list_first_entry(list, struct page, lru); in page_reporting_cycle() 251 if (!list_entry_is_head(next, list, lru) && !list_is_first(&next->lru, list)) in page_reporting_cycle() 252 list_rotate_to_front(&next->lru, list); in page_reporting_cycle()
|
D | migrate.c | 152 list_for_each_entry_safe(folio, folio2, l, lru) { in putback_movable_pages() 157 list_del(&folio->lru); in putback_movable_pages() 1072 list_move_tail(&src->lru, ret); in migrate_folio_undo_src() 1124 list_del(&src->lru); in migrate_folio_unmap() 1280 prev = dst->lru.prev; in migrate_folio_move() 1281 list_del(&dst->lru); in migrate_folio_move() 1320 list_del(&src->lru); in migrate_folio_move() 1334 list_add(&dst->lru, prev); in migrate_folio_move() 1463 list_move_tail(&src->lru, ret); in unmap_and_move_huge_page() 1486 list_move_tail(&folio->lru, split_folios); in try_split_folio() [all …]
|
D | hugetlb_vmemmap.c | 224 list_for_each_entry_safe(page, next, list, lru) in free_vmemmap_page_list() 242 list_del(&walk->reuse_page->lru); in vmemmap_remap_pte() 253 list_add_tail(&page->lru, walk->vmemmap_pages); in vmemmap_remap_pte() 285 page = list_first_entry(walk->vmemmap_pages, struct page, lru); in vmemmap_restore_pte() 286 list_del(&page->lru); in vmemmap_restore_pte() 337 list_add(&walk.reuse_page->lru, &vmemmap_pages); in vmemmap_remap_free() 392 list_add_tail(&page->lru, list); in alloc_vmemmap_page_list() 397 list_for_each_entry_safe(page, next, list, lru) in alloc_vmemmap_page_list()
|
D | vmscan.c | 175 if ((_folio)->lru.prev != _base) { \ 178 prev = lru_to_folio(&(_folio->lru)); \ 654 static unsigned long lruvec_lru_size(struct lruvec *lruvec, enum lru_list lru, in lruvec_lru_size() argument 667 size += mem_cgroup_get_zone_lru_size(lruvec, lru, zid); in lruvec_lru_size() 669 size += zone_page_state(zone, NR_ZONE_LRU_BASE + lru); in lruvec_lru_size() 1732 list_del(&folio->lru); in shrink_folio_list() 1855 list_add_tail(&folio->lru, folio_list); in shrink_folio_list() 1880 list_add(&folio->lru, &demote_folios); in shrink_folio_list() 2121 list_add(&folio->lru, &free_folios); in shrink_folio_list() 2148 list_add(&folio->lru, &ret_folios); in shrink_folio_list() [all …]
|
/linux-6.6.21/include/linux/ |
D | list_lru.h | 45 struct list_lru_one lru; member 59 void list_lru_destroy(struct list_lru *lru); 60 int __list_lru_init(struct list_lru *lru, bool memcg_aware, 63 #define list_lru_init(lru) \ argument 64 __list_lru_init((lru), false, NULL, NULL) 65 #define list_lru_init_key(lru, key) \ argument 66 __list_lru_init((lru), false, (key), NULL) 67 #define list_lru_init_memcg(lru, shrinker) \ argument 68 __list_lru_init((lru), true, NULL, shrinker) 70 int memcg_list_lru_alloc(struct mem_cgroup *memcg, struct list_lru *lru, [all …]
|
D | mm_inline.h | 38 enum lru_list lru, enum zone_type zid, in __update_lru_size() argument 46 __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); in __update_lru_size() 48 NR_ZONE_LRU_BASE + lru, nr_pages); in __update_lru_size() 52 enum lru_list lru, enum zone_type zid, in update_lru_size() argument 55 __update_lru_size(lruvec, lru, zid, nr_pages); in update_lru_size() 57 mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages); in update_lru_size() 88 enum lru_list lru; in folio_lru_list() local 95 lru = folio_is_file_lru(folio) ? LRU_INACTIVE_FILE : LRU_INACTIVE_ANON; in folio_lru_list() 97 lru += LRU_ACTIVE; in folio_lru_list() 99 return lru; in folio_lru_list() [all …]
|
D | balloon_compaction.h | 97 list_add(&page->lru, &balloon->pages); in balloon_page_insert() 118 list_del(&page->lru); in balloon_page_delete() 141 list_add(&page->lru, &balloon->pages); in balloon_page_insert() 147 list_del(&page->lru); in balloon_page_delete() 166 list_add(&page->lru, pages); in balloon_page_push() 178 struct page *page = list_first_entry_or_null(pages, struct page, lru); in balloon_page_pop() 183 list_del(&page->lru); in balloon_page_pop()
|
/linux-6.6.21/kernel/bpf/ |
D | bpf_lru_list.c | 144 static void __bpf_lru_list_rotate_active(struct bpf_lru *lru, in __bpf_lru_list_rotate_active() argument 158 if (++i == lru->nr_scans || node == first_node) in __bpf_lru_list_rotate_active() 171 static void __bpf_lru_list_rotate_inactive(struct bpf_lru *lru, in __bpf_lru_list_rotate_inactive() argument 187 while (i < lru->nr_scans) { in __bpf_lru_list_rotate_inactive() 211 __bpf_lru_list_shrink_inactive(struct bpf_lru *lru, in __bpf_lru_list_shrink_inactive() argument 225 } else if (lru->del_from_htab(lru->del_arg, node)) { in __bpf_lru_list_shrink_inactive() 232 if (++i == lru->nr_scans) in __bpf_lru_list_shrink_inactive() 242 static void __bpf_lru_list_rotate(struct bpf_lru *lru, struct bpf_lru_list *l) in __bpf_lru_list_rotate() argument 245 __bpf_lru_list_rotate_active(lru, l); in __bpf_lru_list_rotate() 247 __bpf_lru_list_rotate_inactive(lru, l); in __bpf_lru_list_rotate() [all …]
|
D | bpf_lru_list.h | 71 int bpf_lru_init(struct bpf_lru *lru, bool percpu, u32 hash_offset, 73 void bpf_lru_populate(struct bpf_lru *lru, void *buf, u32 node_offset, 75 void bpf_lru_destroy(struct bpf_lru *lru); 76 struct bpf_lru_node *bpf_lru_pop_free(struct bpf_lru *lru, u32 hash); 77 void bpf_lru_push_free(struct bpf_lru *lru, struct bpf_lru_node *node);
|
/linux-6.6.21/samples/bpf/ |
D | test_lru_dist.c | 99 static void pfect_lru_init(struct pfect_lru *lru, unsigned int lru_size, in pfect_lru_init() argument 102 lru->map_fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, in pfect_lru_init() 106 assert(lru->map_fd != -1); in pfect_lru_init() 108 lru->free_nodes = malloc(lru_size * sizeof(struct pfect_lru_node)); in pfect_lru_init() 109 assert(lru->free_nodes); in pfect_lru_init() 111 INIT_LIST_HEAD(&lru->list); in pfect_lru_init() 112 lru->cur_size = 0; in pfect_lru_init() 113 lru->lru_size = lru_size; in pfect_lru_init() 114 lru->nr_unique = lru->nr_misses = lru->total = 0; in pfect_lru_init() 117 static void pfect_lru_destroy(struct pfect_lru *lru) in pfect_lru_destroy() argument [all …]
|
/linux-6.6.21/net/ceph/ |
D | pagelist.c | 32 struct page *page = list_entry(pl->head.prev, struct page, lru); in ceph_pagelist_unmap_tail() 45 lru); in ceph_pagelist_release() 46 list_del(&page->lru); in ceph_pagelist_release() 61 page = list_first_entry(&pl->free_list, struct page, lru); in ceph_pagelist_addpage() 62 list_del(&page->lru); in ceph_pagelist_addpage() 69 list_add_tail(&page->lru, &pl->head); in ceph_pagelist_addpage() 113 list_add_tail(&page->lru, &pl->free_list); in ceph_pagelist_reserve() 125 struct page, lru); in ceph_pagelist_free_reserve() 126 list_del(&page->lru); in ceph_pagelist_free_reserve() 159 page = list_entry(pl->head.prev, struct page, lru); in ceph_pagelist_truncate() [all …]
|
/linux-6.6.21/fs/nfs/ |
D | nfs42xattr.c | 71 struct list_head lru; member 82 struct list_head lru; member 130 struct list_lru *lru; in nfs4_xattr_entry_lru_add() local 132 lru = (entry->flags & NFS4_XATTR_ENTRY_EXTVAL) ? in nfs4_xattr_entry_lru_add() 135 return list_lru_add(lru, &entry->lru); in nfs4_xattr_entry_lru_add() 141 struct list_lru *lru; in nfs4_xattr_entry_lru_del() local 143 lru = (entry->flags & NFS4_XATTR_ENTRY_EXTVAL) ? in nfs4_xattr_entry_lru_del() 146 return list_lru_del(lru, &entry->lru); in nfs4_xattr_entry_lru_del() 239 INIT_LIST_HEAD(&entry->lru); in nfs4_xattr_alloc_entry() 261 if (WARN_ON(!list_empty(&entry->lru))) in nfs4_xattr_free_entry_cb() [all …]
|
/linux-6.6.21/drivers/gpu/drm/ |
D | drm_gem.c | 1317 drm_gem_lru_init(struct drm_gem_lru *lru, struct mutex *lock) in drm_gem_lru_init() argument 1319 lru->lock = lock; in drm_gem_lru_init() 1320 lru->count = 0; in drm_gem_lru_init() 1321 INIT_LIST_HEAD(&lru->list); in drm_gem_lru_init() 1328 obj->lru->count -= obj->size >> PAGE_SHIFT; in drm_gem_lru_remove_locked() 1329 WARN_ON(obj->lru->count < 0); in drm_gem_lru_remove_locked() 1331 obj->lru = NULL; in drm_gem_lru_remove_locked() 1344 struct drm_gem_lru *lru = obj->lru; in drm_gem_lru_remove() local 1346 if (!lru) in drm_gem_lru_remove() 1349 mutex_lock(lru->lock); in drm_gem_lru_remove() [all …]
|
/linux-6.6.21/drivers/gpu/drm/msm/ |
D | msm_gem_shrinker.c | 39 unsigned count = priv->lru.dontneed.count; in msm_gem_shrinker_count() 42 count += priv->lru.willneed.count; in msm_gem_shrinker_count() 106 struct drm_gem_lru *lru; in msm_gem_shrinker_scan() member 113 { &priv->lru.dontneed, purge, true }, in msm_gem_shrinker_scan() 114 { &priv->lru.willneed, evict, can_swap() }, in msm_gem_shrinker_scan() 115 { &priv->lru.dontneed, active_purge, can_block(sc) }, in msm_gem_shrinker_scan() 116 { &priv->lru.willneed, active_evict, can_swap() && can_block(sc) }, in msm_gem_shrinker_scan() 126 drm_gem_lru_scan(stages[i].lru, nr, in msm_gem_shrinker_scan() 184 &priv->lru.dontneed, in msm_gem_shrinker_vmap() 185 &priv->lru.willneed, in msm_gem_shrinker_vmap() [all …]
|
/linux-6.6.21/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/ |
D | nv50.c | 37 struct list_head lru; member 52 struct list_head lru; member 142 eobj = list_first_entry_or_null(&imem->lru, typeof(*eobj), lru); in nv50_instobj_kmap() 148 list_del_init(&eobj->lru); in nv50_instobj_kmap() 204 if (likely(iobj->lru.next) && iobj->map) { in nv50_instobj_release() 205 BUG_ON(!list_empty(&iobj->lru)); in nv50_instobj_release() 206 list_add_tail(&iobj->lru, &imem->lru); in nv50_instobj_release() 245 if (likely(iobj->lru.next)) in nv50_instobj_acquire() 246 list_del_init(&iobj->lru); in nv50_instobj_acquire() 269 if (likely(iobj->lru.next)) { in nv50_instobj_boot() [all …]
|
/linux-6.6.21/drivers/gpu/drm/ttm/ |
D | ttm_resource.c | 70 list_bulk_move_tail(&man->lru[j], &pos->first->lru, in ttm_lru_bulk_move_tail() 71 &pos->last->lru); in ttm_lru_bulk_move_tail() 90 pos->first = list_next_entry(res, lru); in ttm_lru_bulk_move_pos_tail() 91 list_move(&res->lru, &pos->last->lru); in ttm_lru_bulk_move_pos_tail() 121 pos->first = list_next_entry(res, lru); in ttm_lru_bulk_move_del() 123 pos->last = list_prev_entry(res, lru); in ttm_lru_bulk_move_del() 125 list_move(&res->lru, &pos->last->lru); in ttm_lru_bulk_move_del() 154 list_move_tail(&res->lru, &bdev->pinned); in ttm_resource_move_to_lru_tail() 165 list_move_tail(&res->lru, &man->lru[bo->priority]); in ttm_resource_move_to_lru_tail() 196 list_add_tail(&res->lru, &bo->bdev->pinned); in ttm_resource_init() [all …]
|
/linux-6.6.21/drivers/md/ |
D | dm-bufio.c | 86 struct lru *lru; member 92 struct lru { struct 101 static void lru_init(struct lru *lru) in lru_init() argument 103 lru->cursor = NULL; in lru_init() 104 lru->count = 0; in lru_init() 105 INIT_LIST_HEAD(&lru->iterators); in lru_init() 108 static void lru_destroy(struct lru *lru) in lru_destroy() argument 110 WARN_ON_ONCE(lru->cursor); in lru_destroy() 111 WARN_ON_ONCE(!list_empty(&lru->iterators)); in lru_destroy() 117 static void lru_insert(struct lru *lru, struct lru_entry *le) in lru_insert() argument [all …]
|
/linux-6.6.21/arch/mips/mm/ |
D | cerr-sb1.c | 326 uint8_t lru; in extract_ic() local 348 lru = (taghi >> 14) & 0xff; in extract_ic() 352 (lru & 0x3), in extract_ic() 353 ((lru >> 2) & 0x3), in extract_ic() 354 ((lru >> 4) & 0x3), in extract_ic() 355 ((lru >> 6) & 0x3)); in extract_ic() 481 uint8_t ecc, lru; in extract_dc() local 503 lru = (taghi >> 14) & 0xff; in extract_dc() 507 (lru & 0x3), in extract_dc() 508 ((lru >> 2) & 0x3), in extract_dc() [all …]
|
/linux-6.6.21/fs/proc/ |
D | meminfo.c | 42 int lru; in meminfo_proc_show() local 53 for (lru = LRU_BASE; lru < NR_LRU_LISTS; lru++) in meminfo_proc_show() 54 pages[lru] = global_node_page_state(NR_LRU_BASE + lru); in meminfo_proc_show()
|
/linux-6.6.21/drivers/xen/ |
D | balloon.c | 154 list_add_tail(&page->lru, &ballooned_pages); in balloon_append() 157 list_add(&page->lru, &ballooned_pages); in balloon_append() 171 page = list_entry(ballooned_pages.next, struct page, lru); in balloon_retrieve() 174 list_del(&page->lru); in balloon_retrieve() 187 struct list_head *next = page->lru.next; in balloon_next_page() 190 return list_entry(next, struct page, lru); in balloon_next_page() 395 page = list_first_entry_or_null(&ballooned_pages, struct page, lru); in increase_reservation() 445 list_add(&page->lru, &pages); in decrease_reservation() 462 list_for_each_entry_safe(page, tmp, &pages, lru) { in decrease_reservation() 467 list_del(&page->lru); in decrease_reservation()
|
/linux-6.6.21/kernel/power/ |
D | wakelock.c | 32 struct list_head lru; member 92 list_add(&wl->lru, &wakelocks_lru_list); in wakelocks_lru_add() 97 list_move(&wl->lru, &wakelocks_lru_list); in wakelocks_lru_most_recent() 108 list_for_each_entry_safe_reverse(wl, aux, &wakelocks_lru_list, lru) { in __wakelocks_gc() 123 list_del(&wl->lru); in __wakelocks_gc()
|
/linux-6.6.21/include/drm/ |
D | drm_gem.h | 423 struct drm_gem_lru *lru; member 536 void drm_gem_lru_init(struct drm_gem_lru *lru, struct mutex *lock); 538 void drm_gem_lru_move_tail_locked(struct drm_gem_lru *lru, struct drm_gem_object *obj); 539 void drm_gem_lru_move_tail(struct drm_gem_lru *lru, struct drm_gem_object *obj); 540 unsigned long drm_gem_lru_scan(struct drm_gem_lru *lru,
|
/linux-6.6.21/include/trace/events/ |
D | pagemap.h | 37 __field(enum lru_list, lru ) 44 __entry->lru = folio_lru_list(folio); 52 __entry->lru,
|