/kernel/linux/linux-6.6/include/linux/ |
H A D | shrinker.h | 47 * or shrinker should skip this cache for this time (e.g., their number 49 * count callback - the shrinker relies on aggregating scan counts that couldn't 61 * @flags determine the shrinker abilities, like numa awareness 63 struct shrinker { struct 64 unsigned long (*count_objects)(struct shrinker *, 66 unsigned long (*scan_objects)(struct shrinker *, 94 * It just makes sense when the shrinker is also MEMCG_AWARE for now, 95 * non-MEMCG_AWARE shrinker should not have this flag set. 99 extern int __printf(2, 3) prealloc_shrinker(struct shrinker *shrinker, 117 shrinker_debugfs_add(struct shrinker *shrinker) shrinker_debugfs_add() argument 121 shrinker_debugfs_detach(struct shrinker *shrinker, int *debugfs_id) shrinker_debugfs_detach() argument 132 shrinker_debugfs_rename(struct shrinker *shrinker, const char *fmt, ...) shrinker_debugfs_rename() argument [all...] |
H A D | list_lru.h | 13 #include <linux/shrinker.h> 61 struct lock_class_key *key, struct shrinker *shrinker); 67 #define list_lru_init_memcg(lru, shrinker) \ 68 __list_lru_init((lru), true, NULL, shrinker)
|
/kernel/linux/linux-6.6/mm/ |
H A D | shrinker_debug.c | 6 #include <linux/shrinker.h> 16 static unsigned long shrinker_count_objects(struct shrinker *shrinker, in shrinker_count_objects() argument 24 if (nid == 0 || (shrinker->flags & SHRINKER_NUMA_AWARE)) { in shrinker_count_objects() 31 nr = shrinker->count_objects(shrinker, &sc); in shrinker_count_objects() 47 struct shrinker *shrinker = m->private; in shrinker_debugfs_count_show() local 65 memcg_aware = shrinker->flags & SHRINKER_MEMCG_AWARE; in shrinker_debugfs_count_show() 72 total = shrinker_count_objects(shrinker, in shrinker_debugfs_count_show() 112 struct shrinker *shrinker = file->private_data; shrinker_debugfs_scan_write() local 174 shrinker_debugfs_add(struct shrinker *shrinker) shrinker_debugfs_add() argument 208 shrinker_debugfs_rename(struct shrinker *shrinker, const char *fmt, ...) shrinker_debugfs_rename() argument 249 shrinker_debugfs_detach(struct shrinker *shrinker, int *debugfs_id) shrinker_debugfs_detach() argument 273 struct shrinker *shrinker; shrinker_debugfs_init() local [all...] |
H A D | vmscan.c | 266 static int prealloc_memcg_shrinker(struct shrinker *shrinker) in prealloc_memcg_shrinker() argument 274 /* This may call shrinker, so it must use down_read_trylock() */ in prealloc_memcg_shrinker() 275 id = idr_alloc(&shrinker_idr, shrinker, 0, 0, GFP_KERNEL); in prealloc_memcg_shrinker() 285 shrinker->id = id; in prealloc_memcg_shrinker() 292 static void unregister_memcg_shrinker(struct shrinker *shrinker) in unregister_memcg_shrinker() argument 294 int id = shrinker->id; in unregister_memcg_shrinker() 303 static long xchg_nr_deferred_memcg(int nid, struct shrinker *shrinker, in xchg_nr_deferred_memcg() argument 312 add_nr_deferred_memcg(long nr, int nid, struct shrinker *shrinker, struct mem_cgroup *memcg) add_nr_deferred_memcg() argument 384 prealloc_memcg_shrinker(struct shrinker *shrinker) prealloc_memcg_shrinker() argument 389 unregister_memcg_shrinker(struct shrinker *shrinker) unregister_memcg_shrinker() argument 393 xchg_nr_deferred_memcg(int nid, struct shrinker *shrinker, struct mem_cgroup *memcg) xchg_nr_deferred_memcg() argument 399 add_nr_deferred_memcg(long nr, int nid, struct shrinker *shrinker, struct mem_cgroup *memcg) add_nr_deferred_memcg() argument 473 xchg_nr_deferred(struct shrinker *shrinker, struct shrink_control *sc) xchg_nr_deferred() argument 490 add_nr_deferred(long nr, struct shrinker *shrinker, struct shrink_control *sc) add_nr_deferred() argument 605 __prealloc_shrinker(struct shrinker *shrinker) __prealloc_shrinker() argument 630 prealloc_shrinker(struct shrinker *shrinker, const char *fmt, ...) prealloc_shrinker() argument 650 prealloc_shrinker(struct shrinker *shrinker, const char *fmt, ...) prealloc_shrinker() argument 656 free_prealloced_shrinker(struct shrinker *shrinker) free_prealloced_shrinker() argument 673 register_shrinker_prepared(struct shrinker *shrinker) register_shrinker_prepared() argument 682 __register_shrinker(struct shrinker *shrinker) __register_shrinker() argument 693 register_shrinker(struct shrinker *shrinker, const char *fmt, ...) register_shrinker() argument 712 register_shrinker(struct shrinker *shrinker, const char *fmt, ...) register_shrinker() argument 722 unregister_shrinker(struct shrinker *shrinker) unregister_shrinker() argument 762 do_shrink_slab(struct shrink_control *shrinkctl, struct shrinker *shrinker, int priority) do_shrink_slab() argument 883 struct shrinker *shrinker; shrink_slab_memcg() local 966 struct shrinker *shrinker; shrink_slab() local [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | shrinker.h | 44 * or shrinker should skip this cache for this time (e.g., their number 46 * count callback - the shrinker relies on aggregating scan counts that couldn't 58 * @flags determine the shrinker abilities, like numa awareness 60 struct shrinker { struct 61 unsigned long (*count_objects)(struct shrinker *, 63 unsigned long (*scan_objects)(struct shrinker *, 86 * It just makes sense when the shrinker is also MEMCG_AWARE for now, 87 * non-MEMCG_AWARE shrinker should not have this flag set. 91 extern int prealloc_shrinker(struct shrinker *shrinker); [all...] |
H A D | list_lru.h | 13 #include <linux/shrinker.h> 63 struct lock_class_key *key, struct shrinker *shrinker); 69 #define list_lru_init_memcg(lru, shrinker) \ 70 __list_lru_init((lru), true, NULL, shrinker)
|
H A D | reclaim_acct.h | 12 #include <linux/shrinker.h> 45 const struct shrinker *shrinker);
|
/kernel/linux/linux-5.10/drivers/gpu/drm/panfrost/ |
H A D | panfrost_gem_shrinker.c | 19 panfrost_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) in panfrost_gem_shrinker_count() argument 22 container_of(shrinker, struct panfrost_device, shrinker); in panfrost_gem_shrinker_count() 66 panfrost_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc) in panfrost_gem_shrinker_scan() argument 69 container_of(shrinker, struct panfrost_device, shrinker); in panfrost_gem_shrinker_scan() 95 * panfrost_gem_shrinker_init - Initialize panfrost shrinker 98 * This function registers and sets up the panfrost shrinker [all...] |
/kernel/linux/linux-5.10/drivers/gpu/drm/msm/ |
H A D | msm_gem_shrinker.c | 16 * shrinker are still called in code-paths that hold the in msm_gem_shrinker_lock() 22 * protecting inactive_list, so that shrinker does not need in msm_gem_shrinker_lock() 42 msm_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) in msm_gem_shrinker_count() argument 45 container_of(shrinker, struct msm_drm_private, shrinker); in msm_gem_shrinker_count() 66 msm_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc) in msm_gem_shrinker_scan() argument 69 container_of(shrinker, struct msm_drm_private, shrinker); in msm_gem_shrinker_scan() [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/panfrost/ |
H A D | panfrost_gem_shrinker.c | 19 panfrost_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) in panfrost_gem_shrinker_count() argument 22 container_of(shrinker, struct panfrost_device, shrinker); in panfrost_gem_shrinker_count() 66 panfrost_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc) in panfrost_gem_shrinker_scan() argument 69 container_of(shrinker, struct panfrost_device, shrinker); in panfrost_gem_shrinker_scan() 95 * panfrost_gem_shrinker_init - Initialize panfrost shrinker 98 * This function registers and sets up the panfrost shrinker [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/msm/ |
H A D | msm_gem_shrinker.c | 35 msm_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) in msm_gem_shrinker_count() argument 38 container_of(shrinker, struct msm_drm_private, shrinker); in msm_gem_shrinker_count() 101 msm_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc) in msm_gem_shrinker_scan() argument 104 container_of(shrinker, struct msm_drm_private, shrinker); in msm_gem_shrinker_scan() 154 ret = msm_gem_shrinker_scan(&priv->shrinker, &sc); in msm_gem_shrinker_shrink() 162 * and if necessary the shrinker wil [all...] |
/kernel/linux/linux-5.10/drivers/staging/android/ion/ |
H A D | ion_heap.c | 234 static unsigned long ion_heap_shrink_count(struct shrinker *shrinker, in ion_heap_shrink_count() argument 237 struct ion_heap *heap = container_of(shrinker, struct ion_heap, in ion_heap_shrink_count() 238 shrinker); in ion_heap_shrink_count() 249 static unsigned long ion_heap_shrink_scan(struct shrinker *shrinker, in ion_heap_shrink_scan() argument 252 struct ion_heap *heap = container_of(shrinker, struct ion_heap, in ion_heap_shrink_scan() 253 shrinker); in ion_heap_shrink_scan() 280 heap->shrinker.count_objects = ion_heap_shrink_count; in ion_heap_init_shrinker() 281 heap->shrinker in ion_heap_init_shrinker() [all...] |
H A D | ion.h | 18 #include <linux/shrinker.h> 81 * the buffer's private_flags when called from a shrinker. In that 106 * Buffer is being freed from a shrinker function. Skip any possible 124 * @shrinker: a shrinker for the heap 149 struct shrinker shrinker; member 186 * this function will be called to setup a shrinker to shrink the freelists 238 * shrinker you probably want to use this. Note that this relies on
|
H A D | ion.c | 535 objs = heap->shrinker.count_objects(&heap->shrinker, &sc); in debug_shrink_set() 539 heap->shrinker.scan_objects(&heap->shrinker, &sc); in debug_shrink_set() 552 objs = heap->shrinker.count_objects(&heap->shrinker, &sc); in debug_shrink_get() 581 pr_err("%s: Failed to register shrinker\n", __func__); in ion_device_add_heap() 602 if (heap->shrinker.count_objects && in ion_device_add_heap() 603 heap->shrinker.scan_objects) { in ion_device_add_heap()
|
/kernel/linux/linux-5.10/mm/ |
H A D | reclaim_acct.c | 32 enum reclaimacct_stubs stub, const struct shrinker *shrinker) in __reclaimacct_end() 50 if (shrinker) in __reclaimacct_end() 51 pr_warn_ratelimited("shrinker = %pF\n", shrinker); in __reclaimacct_end() 76 const struct shrinker *shrinker) in reclaimacct_substage_end() 81 __reclaimacct_end(current->reclaim_acct, freed, stub, shrinker); in reclaimacct_substage_end() 31 __reclaimacct_end(struct reclaim_acct *ra, u64 freed, enum reclaimacct_stubs stub, const struct shrinker *shrinker) __reclaimacct_end() argument 75 reclaimacct_substage_end(enum reclaimacct_stubs stub, unsigned long freed, const struct shrinker *shrinker) reclaimacct_substage_end() argument
|
H A D | vmscan.c | 117 static int prealloc_memcg_shrinker(struct shrinker *shrinker) in prealloc_memcg_shrinker() argument 122 /* This may call shrinker, so it must use down_read_trylock() */ in prealloc_memcg_shrinker() 123 id = idr_alloc(&shrinker_idr, shrinker, 0, 0, GFP_KERNEL); in prealloc_memcg_shrinker() 135 shrinker->id = id; in prealloc_memcg_shrinker() 142 static void unregister_memcg_shrinker(struct shrinker *shrinker) in unregister_memcg_shrinker() argument 144 int id = shrinker->id; in unregister_memcg_shrinker() 182 static int prealloc_memcg_shrinker(struct shrinker *shrinker) in prealloc_memcg_shrinker() argument 187 unregister_memcg_shrinker(struct shrinker *shrinker) unregister_memcg_shrinker() argument 262 prealloc_shrinker(struct shrinker *shrinker) prealloc_shrinker() argument 286 free_prealloced_shrinker(struct shrinker *shrinker) free_prealloced_shrinker() argument 301 register_shrinker_prepared(struct shrinker *shrinker) register_shrinker_prepared() argument 309 register_shrinker(struct shrinker *shrinker) register_shrinker() argument 323 unregister_shrinker(struct shrinker *shrinker) unregister_shrinker() argument 342 do_shrink_slab(struct shrink_control *shrinkctl, struct shrinker *shrinker, int priority) do_shrink_slab() argument 497 struct shrinker *shrinker; shrink_slab_memcg() local 580 struct shrinker *shrinker; shrink_slab() local [all...] |
H A D | workingset.c | 520 static unsigned long count_shadow_nodes(struct shrinker *shrinker, in count_shadow_nodes() argument 637 static unsigned long scan_shadow_nodes(struct shrinker *shrinker, in scan_shadow_nodes() argument 645 static struct shrinker workingset_shadow_shrinker = {
|
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gem/ |
H A D | i915_gem_shrinker.c | 77 * This function is the main interface to the shrinker. It will try to release 89 * backing storage pins at the buffer object level) result in the shrinker code 258 i915_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) in i915_gem_shrinker_count() argument 261 container_of(shrinker, struct drm_i915_private, mm.shrinker); in i915_gem_shrinker_count() 272 * the shrinker to fire, until it is worth the cost of freeing an in i915_gem_shrinker_count() 278 i915->mm.shrinker.batch = in i915_gem_shrinker_count() 279 max((i915->mm.shrinker.batch + avg) >> 1, in i915_gem_shrinker_count() 287 i915_gem_shrinker_scan(struct shrinker *shrinke argument [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/i915/gem/ |
H A D | i915_gem_shrinker.c | 83 * This function is the main interface to the shrinker. It will try to release 95 * backing storage pins at the buffer object level) result in the shrinker code 285 i915_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) in i915_gem_shrinker_count() argument 288 container_of(shrinker, struct drm_i915_private, mm.shrinker); in i915_gem_shrinker_count() 299 * the shrinker to fire, until it is worth the cost of freeing an in i915_gem_shrinker_count() 305 i915->mm.shrinker.batch = in i915_gem_shrinker_count() 306 max((i915->mm.shrinker.batch + avg) >> 1, in i915_gem_shrinker_count() 314 i915_gem_shrinker_scan(struct shrinker *shrinke argument [all...] |
/kernel/linux/linux-6.6/fs/nfs/ |
H A D | nfs42xattr.c | 30 * This makes freeing a cache, both from the shrinker and from the 42 * shrinker for the larger entries works more aggressively than 45 * The other shrinker frees the cache structures themselves. 153 * treated as one by the memory shrinker. 364 * invalid cache. Can also be called from a shrinker callback. 381 * shrinker callback. 790 static unsigned long nfs4_xattr_cache_count(struct shrinker *shrink, 792 static unsigned long nfs4_xattr_entry_count(struct shrinker *shrink, 794 static unsigned long nfs4_xattr_cache_scan(struct shrinker *shrink, 796 static unsigned long nfs4_xattr_entry_scan(struct shrinker *shrin 994 nfs4_xattr_shrinker_init(struct shrinker *shrinker, struct list_lru *lru, const char *name) nfs4_xattr_shrinker_init() argument 1010 nfs4_xattr_shrinker_destroy(struct shrinker *shrinker, struct list_lru *lru) nfs4_xattr_shrinker_destroy() argument [all...] |
/kernel/linux/linux-5.10/drivers/virtio/ |
H A D | virtio_balloon.c | 121 struct shrinker shrinker; member 839 static unsigned long virtio_balloon_shrinker_scan(struct shrinker *shrinker, in virtio_balloon_shrinker_scan() argument 842 struct virtio_balloon *vb = container_of(shrinker, in virtio_balloon_shrinker_scan() 843 struct virtio_balloon, shrinker); in virtio_balloon_shrinker_scan() 848 static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, in virtio_balloon_shrinker_count() argument 851 struct virtio_balloon *vb = container_of(shrinker, in virtio_balloon_shrinker_count() 852 struct virtio_balloon, shrinker); in virtio_balloon_shrinker_count() [all...] |
/kernel/linux/linux-6.6/drivers/virtio/ |
H A D | virtio_balloon.c | 114 struct shrinker shrinker; member 820 static unsigned long virtio_balloon_shrinker_scan(struct shrinker *shrinker, in virtio_balloon_shrinker_scan() argument 823 struct virtio_balloon *vb = container_of(shrinker, in virtio_balloon_shrinker_scan() 824 struct virtio_balloon, shrinker); in virtio_balloon_shrinker_scan() 829 static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, in virtio_balloon_shrinker_count() argument 832 struct virtio_balloon *vb = container_of(shrinker, in virtio_balloon_shrinker_count() 833 struct virtio_balloon, shrinker); in virtio_balloon_shrinker_count() [all...] |
/kernel/linux/linux-6.6/tools/cgroup/ |
H A D | memcg_shrinker.py | 27 for shrinker in subdirs: 28 count_path = os.path.join(root, shrinker, "count") 33 # (count, shrinker, memcg ino) 34 shrinkers.append((int(items[1]), shrinker, ino)) 45 shrinkers = scan_shrinkers("/sys/kernel/debug/shrinker/")
|
/kernel/linux/linux-5.10/fs/nfs/ |
H A D | nfs42xattr.c | 30 * This makes freeing a cache, both from the shrinker and from the 42 * shrinker for the larger entries works more aggressively than 45 * The other shrinker frees the cache structures themselves. 153 * treated as one by the memory shrinker. 365 * invalid cache. Can also be called from a shrinker callback. 382 * shrinker callback. 791 static unsigned long nfs4_xattr_cache_count(struct shrinker *shrink, 793 static unsigned long nfs4_xattr_entry_count(struct shrinker *shrink, 795 static unsigned long nfs4_xattr_cache_scan(struct shrinker *shrink, 797 static unsigned long nfs4_xattr_entry_scan(struct shrinker *shrin [all...] |
/kernel/linux/linux-6.6/fs/nfsd/ |
H A D | netns.h | 180 struct shrinker nfsd_reply_cache_shrinker; 198 struct shrinker nfsd_client_shrinker;
|