Home
last modified time | relevance | path

Searched refs:lru (Results 1 – 25 of 119) sorted by relevance

12345

/linux/mm/
H A Dlist_lru.c22 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 in lru_shrinker_id()
53 list_lru_from_memcg_idx(struct list_lru * lru,int nid,int idx) list_lru_from_memcg_idx() argument
63 list_lru_register(struct list_lru * lru) list_lru_register() argument
67 list_lru_unregister(struct list_lru * lru) list_lru_unregister() argument
71 lru_shrinker_id(struct list_lru * lru) lru_shrinker_id() argument
76 list_lru_memcg_aware(struct list_lru * lru) list_lru_memcg_aware() argument
82 list_lru_from_memcg_idx(struct list_lru * lru,int nid,int idx) list_lru_from_memcg_idx() argument
89 list_lru_add(struct list_lru * lru,struct list_head * item,int nid,struct mem_cgroup * memcg) list_lru_add() argument
111 list_lru_add_obj(struct list_lru * lru,struct list_head * item) list_lru_add_obj() argument
129 list_lru_del(struct list_lru * lru,struct list_head * item,int nid,struct mem_cgroup * memcg) list_lru_del() argument
149 list_lru_del_obj(struct list_lru * lru,struct list_head * item) list_lru_del_obj() argument
181 list_lru_count_one(struct list_lru * lru,int nid,struct mem_cgroup * memcg) list_lru_count_one() argument
199 list_lru_count_node(struct list_lru * lru,int nid) list_lru_count_node() argument
209 __list_lru_walk_one(struct list_lru * lru,int nid,int memcg_idx,list_lru_walk_cb isolate,void * cb_arg,unsigned long * nr_to_walk) __list_lru_walk_one() argument
274 list_lru_walk_one(struct list_lru * lru,int nid,struct mem_cgroup * memcg,list_lru_walk_cb isolate,void * cb_arg,unsigned long * nr_to_walk) list_lru_walk_one() argument
290 list_lru_walk_one_irq(struct list_lru * lru,int nid,struct mem_cgroup * memcg,list_lru_walk_cb isolate,void * cb_arg,unsigned long * nr_to_walk) list_lru_walk_one_irq() argument
304 list_lru_walk_node(struct list_lru * lru,int nid,list_lru_walk_cb isolate,void * cb_arg,unsigned long * nr_to_walk) list_lru_walk_node() argument
359 memcg_list_lru_free(struct list_lru * lru,int src_idx) memcg_list_lru_free() argument
373 memcg_init_list_lru(struct list_lru * lru,bool memcg_aware) memcg_init_list_lru() argument
380 memcg_destroy_list_lru(struct list_lru * lru) memcg_destroy_list_lru() argument
396 memcg_reparent_list_lru_node(struct list_lru * lru,int nid,int src_idx,struct mem_cgroup * dst_memcg) memcg_reparent_list_lru_node() argument
425 memcg_reparent_list_lru(struct list_lru * lru,int src_idx,struct mem_cgroup * dst_memcg) memcg_reparent_list_lru() argument
439 struct list_lru *lru; memcg_reparent_list_lrus() local
471 memcg_list_lru_allocated(struct mem_cgroup * memcg,struct list_lru * lru) memcg_list_lru_allocated() argument
478 memcg_list_lru_alloc(struct mem_cgroup * memcg,struct list_lru * lru,gfp_t gfp) memcg_list_lru_alloc() argument
556 memcg_init_list_lru(struct list_lru * lru,bool memcg_aware) memcg_init_list_lru() argument
560 memcg_destroy_list_lru(struct list_lru * lru) memcg_destroy_list_lru() argument
565 __list_lru_init(struct list_lru * lru,bool memcg_aware,struct lock_class_key * key,struct shrinker * shrinker) __list_lru_init() argument
598 list_lru_destroy(struct list_lru * lru) list_lru_destroy() argument
[all...]
H A Dballoon_compaction.c48 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()
H A Dhugetlb_vmemmap.c203 list_for_each_entry_safe(page, next, list, lru) in free_vmemmap_page_list()
221 list_del(&walk->reuse_page->lru); in vmemmap_remap_pte()
232 list_add(&page->lru, walk->vmemmap_pages); in vmemmap_remap_pte()
264 page = list_first_entry(walk->vmemmap_pages, struct page, lru); in vmemmap_restore_pte()
265 list_del(&page->lru); in vmemmap_restore_pte()
345 list_add(&walk.reuse_page->lru, vmemmap_pages); in vmemmap_remap_free()
399 list_add(&page->lru, list); in alloc_vmemmap_page_list()
405 list_for_each_entry_safe(page, next, list, lru) in alloc_vmemmap_page_list()
522 list_for_each_entry_safe(folio, t_folio, folio_list, lru) { in hugetlb_vmemmap_restore_folios()
534 list_move(&folio->lru, non_hvo_folios); in hugetlb_vmemmap_restore_folios()
[all …]
H A Dpage_reporting.c183 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()
H A Dmigrate.c146 list_for_each_entry_safe(folio, folio2, l, lru) { in putback_movable_pages()
151 list_del(&folio->lru); in putback_movable_pages()
177 bool isolated, lru; in isolate_folio_to_list() local
182 lru = !__folio_test_movable(folio); in isolate_folio_to_list()
183 if (lru) in isolate_folio_to_list()
192 list_add(&folio->lru, list); in isolate_folio_to_list()
193 if (lru) in isolate_folio_to_list()
1158 list_move_tail(&src->lru, ret); in migrate_folio_undo_src()
1210 list_del(&src->lru); in migrate_folio_unmap()
1365 prev = dst->lru.prev; in migrate_folio_move()
[all …]
H A Dvmscan.c189 if ((_folio)->lru.prev != _base) { \
192 prev = lru_to_folio(&(_folio->lru)); \
387 static unsigned long lruvec_lru_size(struct lruvec *lruvec, enum lru_list lru, in lruvec_lru_size() argument
400 size += mem_cgroup_get_zone_lru_size(lruvec, lru, zid); in lruvec_lru_size()
402 size += zone_page_state(zone, NR_ZONE_LRU_BASE + lru); in lruvec_lru_size()
1070 list_del(&folio->lru); in shrink_folio_list()
1193 list_add_tail(&folio->lru, folio_list); in shrink_folio_list()
1218 list_add(&folio->lru, &demote_folios); in shrink_folio_list()
1511 list_add(&folio->lru, &ret_folios); in shrink_folio_list()
1574 list_for_each_entry_safe(folio, next, folio_list, lru) { in reclaim_clean_pages_from_list()
[all …]
H A Dpgtable-generic.c172 INIT_LIST_HEAD(&pgtable->lru); in pgtable_trans_huge_deposit()
174 list_add(&pgtable->lru, &pmd_huge_pte(mm, pmdp)->lru); in pgtable_trans_huge_deposit()
189 pmd_huge_pte(mm, pmdp) = list_first_entry_or_null(&pgtable->lru, in pgtable_trans_huge_withdraw()
190 struct page, lru); in pgtable_trans_huge_withdraw()
192 list_del(&pgtable->lru); in pgtable_trans_huge_withdraw()
H A Dmmzone.c77 enum lru_list lru; in lruvec_init() local
83 for_each_lru(lru) in lruvec_init()
84 INIT_LIST_HEAD(&lruvec->lists[lru]); in lruvec_init()
/linux/kernel/bpf/
H A Dbpf_lru_list.c144 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 …]
H A Dbpf_lru_list.h71 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/samples/bpf/
H A Dtest_lru_dist.c99 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/drivers/gpu/drm/ttm/
H A Dttm_resource.c62 list_move(&cursor->hitch.link, &pos->last->lru.link); in ttm_resource_cursor_move_bulk_tail()
155 list_bulk_move_tail(&man->lru[j], &pos->first->lru.link, in ttm_lru_bulk_move_tail()
156 &pos->last->lru.link); in ttm_lru_bulk_move_tail()
172 struct ttm_lru_item *lru = &cur->lru; in ttm_lru_prev_res() local
175 lru = list_prev_entry(lru, link); in ttm_lru_prev_res()
176 } while (!ttm_lru_item_is_res(lru)); in ttm_lru_prev_res()
178 return ttm_lru_item_to_res(lru); in ttm_lru_prev_res()
184 struct ttm_lru_item *lru = &cur->lru; in ttm_lru_next_res() local
187 lru = list_next_entry(lru, link); in ttm_lru_next_res()
188 } while (!ttm_lru_item_is_res(lru)); in ttm_lru_next_res()
[all …]
/linux/drivers/gpu/drm/
H A Ddrm_gem.c1370 drm_gem_lru_init(struct drm_gem_lru *lru, struct mutex *lock) in drm_gem_lru_init() argument
1372 lru->lock = lock; in drm_gem_lru_init()
1373 lru->count = 0; in drm_gem_lru_init()
1374 INIT_LIST_HEAD(&lru->list); in drm_gem_lru_init()
1381 obj->lru->count -= obj->size >> PAGE_SHIFT; in drm_gem_lru_remove_locked()
1382 WARN_ON(obj->lru->count < 0); in drm_gem_lru_remove_locked()
1384 obj->lru = NULL; in drm_gem_lru_remove_locked()
1397 struct drm_gem_lru *lru = obj->lru; in drm_gem_lru_remove() local
1399 if (!lru) in drm_gem_lru_remove()
1402 mutex_lock(lru->lock); in drm_gem_lru_remove()
[all …]
/linux/drivers/gpu/drm/msm/
H A Dmsm_gem_shrinker.c38 unsigned count = priv->lru.dontneed.count; in msm_gem_shrinker_count()
41 count += priv->lru.willneed.count; in msm_gem_shrinker_count()
104 struct drm_gem_lru *lru; in msm_gem_shrinker_scan() member
111 { &priv->lru.dontneed, purge, true }, in msm_gem_shrinker_scan()
112 { &priv->lru.willneed, evict, can_swap() }, in msm_gem_shrinker_scan()
113 { &priv->lru.dontneed, active_purge, can_block(sc) }, in msm_gem_shrinker_scan()
114 { &priv->lru.willneed, active_evict, can_swap() && can_block(sc) }, in msm_gem_shrinker_scan()
124 drm_gem_lru_scan(stages[i].lru, nr, in msm_gem_shrinker_scan()
183 &priv->lru.dontneed, in msm_gem_shrinker_vmap()
184 &priv->lru.willneed, in msm_gem_shrinker_vmap()
[all …]
H A Dmsm_gem.c103 drm_gem_lru_move_tail_locked(&priv->lru.pinned, obj); in update_lru_active()
105 drm_gem_lru_move_tail_locked(&priv->lru.willneed, obj); in update_lru_active()
109 drm_gem_lru_move_tail_locked(&priv->lru.dontneed, obj); in update_lru_active()
123 drm_gem_lru_move_tail_locked(&priv->lru.unbacked, obj); in update_lru_locked()
133 mutex_lock(&priv->lru.lock); in update_lru()
135 mutex_unlock(&priv->lru.lock); in update_lru()
283 drm_gem_lru_move_tail_locked(&priv->lru.pinned, obj); in msm_gem_pin_obj_locked()
290 mutex_lock(&priv->lru.lock); in pin_obj_locked()
292 mutex_unlock(&priv->lru.lock); in pin_obj_locked()
541 mutex_lock(&priv->lru.lock); in msm_gem_unpin_locked()
[all …]
/linux/net/ceph/
H A Dpagelist.c32 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()
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/
H A Dnv50.c38 struct list_head lru; member
53 struct list_head lru; member
143 eobj = list_first_entry_or_null(&imem->lru, typeof(*eobj), lru); in nv50_instobj_kmap()
149 list_del_init(&eobj->lru); in nv50_instobj_kmap()
205 if (likely(iobj->lru.next) && iobj->map) { in nv50_instobj_release()
206 BUG_ON(!list_empty(&iobj->lru)); in nv50_instobj_release()
207 list_add_tail(&iobj->lru, &imem->lru); in nv50_instobj_release()
249 if (likely(iobj->lru.next)) in nv50_instobj_acquire()
250 list_del_init(&iobj->lru); in nv50_instobj_acquire()
275 if (likely(iobj->lru.next)) { in nv50_instobj_boot()
[all …]
/linux/include/linux/
H A Dballoon_compaction.h97 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/arch/mips/mm/
H A Dcerr-sb1.c326 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/fs/bcachefs/
H A Dlru.c29 const struct bch_lru *lru = bkey_s_c_to_lru(k).v; in bch2_lru_to_text() local
31 prt_printf(out, "idx %llu", le64_to_cpu(lru->idx)); in bch2_lru_to_text()
34 void bch2_lru_pos_to_text(struct printbuf *out, struct bpos lru) in bch2_lru_pos_to_text() argument
37 lru_pos_id(lru), in bch2_lru_pos_to_text()
38 lru_pos_time(lru), in bch2_lru_pos_to_text()
39 u64_to_bucket(lru.offset).inode, in bch2_lru_pos_to_text()
40 u64_to_bucket(lru.offset).offset); in bch2_lru_pos_to_text()
/linux/drivers/xen/
H A Dballoon.c154 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()
449 list_add(&page->lru, &pages); in decrease_reservation()
466 list_for_each_entry_safe(page, tmp, &pages, lru) { in decrease_reservation()
471 list_del(&page->lru); in decrease_reservation()
/linux/drivers/md/
H A Ddm-writecache.c84 struct list_head lru; member
111 struct list_head lru; member
669 list_add(&ins->lru, &wc->lru); in writecache_insert_entry()
675 list_del(&e->lru); in writecache_unlink()
696 list_add_tail(&e->lru, &wc->freelist); in writecache_add_to_freelist()
737 e = container_of(wc->freelist.next, struct wc_entry, lru); in writecache_pop_from_freelist()
740 list_del(&e->lru); in writecache_pop_from_freelist()
776 wc->lru.next = LIST_POISON1; in writecache_poison_lists()
777 wc->lru.prev = LIST_POISON2; in writecache_poison_lists()
802 if (list_empty(&wc->lru)) in writecache_flush()
[all …]
/linux/kernel/power/
H A Dwakelock.c32 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/include/trace/events/
H A Dpagemap.h37 __field(enum lru_list, lru )
44 __entry->lru = folio_lru_list(folio);
52 __entry->lru,
/linux/include/drm/
H A Ddrm_gem.h432 struct drm_gem_lru *lru; member
552 void drm_gem_lru_init(struct drm_gem_lru *lru, struct mutex *lock);
554 void drm_gem_lru_move_tail_locked(struct drm_gem_lru *lru, struct drm_gem_object *obj);
555 void drm_gem_lru_move_tail(struct drm_gem_lru *lru, struct drm_gem_object *obj);
556 unsigned long drm_gem_lru_scan(struct drm_gem_lru *lru,

12345