Searched refs:shrinker (Results 1 - 25 of 78) sorted by relevance

1234

/linux-master/include/linux/
H A Dshrinker.h13 * Bitmap and deferred work of shrinker::id corresponding to memcg-aware
66 * or shrinker should skip this cache for this time (e.g., their number
68 * count callback - the shrinker relies on aggregating scan counts that couldn't
80 * @flags determine the shrinker abilities, like numa awareness
82 struct shrinker { struct
83 unsigned long (*count_objects)(struct shrinker *,
85 unsigned long (*scan_objects)(struct shrinker *,
93 * The reference count of this shrinker. Registered shrinker have an
96 * the initial refcount will be discarded, and will free the shrinker
139 shrinker_try_get(struct shrinker *shrinker) argument
144 shrinker_put(struct shrinker *shrinker) argument
155 shrinker_debugfs_rename(struct shrinker *shrinker, const char *fmt, ...) argument
[all...]
H A Dlist_lru.h13 #include <linux/shrinker.h>
63 struct lock_class_key *key, struct shrinker *shrinker);
67 #define list_lru_init_memcg(lru, shrinker) \
68 __list_lru_init((lru), true, NULL, shrinker)
/linux-master/mm/
H A Dshrinker.c4 #include <linux/shrinker.h>
214 static int shrinker_memcg_alloc(struct shrinker *shrinker) argument
222 id = idr_alloc(&shrinker_idr, shrinker, 0, 0, GFP_KERNEL);
232 shrinker->id = id;
239 static void shrinker_memcg_remove(struct shrinker *shrinker) argument
241 int id = shrinker->id;
250 static long xchg_nr_deferred_memcg(int nid, struct shrinker *shrinker, argument
266 add_nr_deferred_memcg(long nr, int nid, struct shrinker *shrinker, struct mem_cgroup *memcg) argument
312 shrinker_memcg_alloc(struct shrinker *shrinker) argument
317 shrinker_memcg_remove(struct shrinker *shrinker) argument
321 xchg_nr_deferred_memcg(int nid, struct shrinker *shrinker, struct mem_cgroup *memcg) argument
327 add_nr_deferred_memcg(long nr, int nid, struct shrinker *shrinker, struct mem_cgroup *memcg) argument
334 xchg_nr_deferred(struct shrinker *shrinker, struct shrink_control *sc) argument
351 add_nr_deferred(long nr, struct shrinker *shrinker, struct shrink_control *sc) argument
369 do_shrink_slab(struct shrink_control *shrinkctl, struct shrinker *shrinker, int priority) argument
531 struct shrinker *shrinker; local
616 struct shrinker *shrinker; local
678 struct shrinker *shrinker; local
736 shrinker_register(struct shrinker *shrinker) argument
761 struct shrinker *shrinker = container_of(head, struct shrinker, rcu); local
767 shrinker_free(struct shrinker *shrinker) argument
[all...]
H A Dshrinker_debug.c6 #include <linux/shrinker.h>
18 static unsigned long shrinker_count_objects(struct shrinker *shrinker, argument
26 if (nid == 0 || (shrinker->flags & SHRINKER_NUMA_AWARE)) {
33 nr = shrinker->count_objects(shrinker, &sc);
49 struct shrinker *shrinker = m->private; local
62 memcg_aware = shrinker->flags & SHRINKER_MEMCG_AWARE;
69 total = shrinker_count_objects(shrinker,
108 struct shrinker *shrinker = file->private_data; local
162 shrinker_debugfs_add(struct shrinker *shrinker) argument
196 shrinker_debugfs_rename(struct shrinker *shrinker, const char *fmt, ...) argument
237 shrinker_debugfs_detach(struct shrinker *shrinker, int *debugfs_id) argument
258 struct shrinker *shrinker; local
[all...]
H A Dinternal.h1327 /* shrinker related functions */
1333 struct shrinker *shrinker, const char *fmt, va_list ap)
1335 shrinker->name = kvasprintf_const(GFP_KERNEL, fmt, ap);
1337 return shrinker->name ? 0 : -ENOMEM;
1340 static inline void shrinker_debugfs_name_free(struct shrinker *shrinker) argument
1342 kfree_const(shrinker->name);
1343 shrinker->name = NULL;
1346 extern int shrinker_debugfs_add(struct shrinker *shrinke
1332 shrinker_debugfs_name_alloc( struct shrinker *shrinker, const char *fmt, va_list ap) argument
1352 shrinker_debugfs_add(struct shrinker *shrinker) argument
1356 shrinker_debugfs_name_alloc(struct shrinker *shrinker, const char *fmt, va_list ap) argument
1361 shrinker_debugfs_name_free(struct shrinker *shrinker) argument
1364 shrinker_debugfs_detach(struct shrinker *shrinker, int *debugfs_id) argument
[all...]
H A Dzswap.c145 /* Enable/disable memory pressure-based shrinker. */
193 static struct shrinker *zswap_shrinker;
802 /* lock out zswap shrinker walking memcg tree */
1146 * shrinker. We generally writeback cold folios from zswap, and
1148 * For unlikely concurrent shrinker case, it will be unlinked
1149 * and freed when invalidated by the concurrent shrinker anyway.
1201 * shrinker functions
1232 * again immediately, almost never happen for this shrinker.
1261 * shrinker context).
1275 static unsigned long zswap_shrinker_scan(struct shrinker *shrinke argument
1316 zswap_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) argument
1367 struct shrinker *shrinker; local
[all...]
H A Dworkingset.c646 static unsigned long count_shadow_nodes(struct shrinker *shrinker, argument
775 static unsigned long scan_shadow_nodes(struct shrinker *shrinker, argument
791 struct shrinker *workingset_shadow_shrinker;
H A Dzsmalloc.c55 #include <linux/shrinker.h>
231 struct shrinker *shrinker; member in struct:zs_pool
2009 static unsigned long zs_shrinker_scan(struct shrinker *shrinker, argument
2013 struct zs_pool *pool = shrinker->private_data;
2025 static unsigned long zs_shrinker_count(struct shrinker *shrinker, argument
2031 struct zs_pool *pool = shrinker->private_data;
2046 shrinker_free(pool->shrinker);
[all...]
/linux-master/drivers/gpu/drm/panfrost/
H A Dpanfrost_gem_shrinker.c19 panfrost_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) argument
21 struct panfrost_device *pfdev = shrinker->private_data;
65 panfrost_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc) argument
67 struct panfrost_device *pfdev = shrinker->private_data;
93 * panfrost_gem_shrinker_init - Initialize panfrost shrinker
96 * This function registers and sets up the panfrost shrinker.
102 pfdev->shrinker = shrinker_alloc(0, "drm-panfrost");
103 if (!pfdev->shrinker)
[all...]
/linux-master/drivers/gpu/drm/msm/
H A Dmsm_gem_shrinker.c35 msm_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) argument
37 struct msm_drm_private *priv = shrinker->private_data;
100 msm_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc) argument
102 struct msm_drm_private *priv = shrinker->private_data;
152 if (priv->shrinker)
153 ret = msm_gem_shrinker_scan(priv->shrinker, &sc);
161 * and if necessary the shrinker will be invoked again.
207 * msm_gem_shrinker_init - Initialize msm shrinker
[all...]
/linux-master/fs/bcachefs/
H A Dbtree_key_cache_types.h20 struct shrinker *shrink;
/linux-master/tools/cgroup/
H A Dmemcg_shrinker.py27 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/")
/linux-master/drivers/gpu/drm/i915/gem/
H A Di915_gem_shrinker.c84 * This function is the main interface to the shrinker. It will try to release
96 * backing storage pins at the buffer object level) result in the shrinker code
289 i915_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) argument
291 struct drm_i915_private *i915 = shrinker->private_data;
302 * the shrinker to fire, until it is worth the cost of freeing an
308 i915->mm.shrinker->batch =
309 max((i915->mm.shrinker->batch + avg) >> 1,
317 i915_gem_shrinker_scan(struct shrinker *shrinker, struc argument
[all...]
/linux-master/fs/nfs/
H A Dnfs42xattr.c30 * 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
980 nfs4_xattr_shrinker_init(struct shrinker **shrinker, struct list_lru *lru, const char *name, count_objects_cb count, scan_objects_cb scan, long batch, int seeks) argument
1007 nfs4_xattr_shrinker_destroy(struct shrinker *shrinker, struct list_lru *lru) argument
[all...]
/linux-master/fs/f2fs/
H A DMakefile6 f2fs-y += shrinker.o extent_cache.o sysfs.o
H A Dshrinker.c3 * f2fs shrinker support
4 * the basic infra was copied from fs/ubifs/shrinker.c
40 unsigned long f2fs_shrink_count(struct shrinker *shrink,
79 unsigned long f2fs_shrink_scan(struct shrinker *shrink,
/linux-master/fs/ubifs/
H A DMakefile4 ubifs-y += shrinker.o journal.o file.o dir.o super.o sb.o io.o
H A Dshrinker.c12 * This file implements UBIFS shrinker which evicts clean znodes from the TNC
16 * would add additional overhead to the file system fast paths. So the shrinker
20 * also clean and old enough. So the shrinker walks the TNC in level order and
24 * The current shrinker first tries to evict old znodes, then young ones.
26 * Since the shrinker is global, it has to protect against races with FS
36 * We number each shrinker run and record the number on the ubifs_info structure
95 * after the commit, so the UBIFS shrinker does not report
267 unsigned long ubifs_shrink_count(struct shrinker *shrink,
279 unsigned long ubifs_shrink_scan(struct shrinker *shrink,
/linux-master/fs/nfsd/
H A Dnetns.h192 struct shrinker *nfsd_reply_cache_shrinker;
210 struct shrinker *nfsd_client_shrinker;
/linux-master/drivers/virtio/
H A Dvirtio_balloon.c114 struct shrinker *shrinker; member in struct:virtio_balloon
855 static unsigned long virtio_balloon_shrinker_scan(struct shrinker *shrinker, argument
858 struct virtio_balloon *vb = shrinker->private_data;
863 static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, argument
866 struct virtio_balloon *vb = shrinker->private_data;
887 shrinker_free(vb->shrinker);
892 vb->shrinker
[all...]
/linux-master/drivers/misc/
H A Dvmw_balloon.c381 * @shrinker: shrinker interface that is used to avoid over-inflation.
383 struct shrinker *shrinker; member in struct:vmballoon
1505 * @shrinker: pointer to the balloon shrinker.
1510 static unsigned long vmballoon_shrinker_scan(struct shrinker *shrinker, argument
1546 * @shrinker: pointer to the balloon shrinker
1552 vmballoon_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc) argument
[all...]
/linux-master/drivers/xen/xenbus/
H A Dxenbus_probe_backend.c276 * Returns 0 always because we are using shrinker to only detect memory
279 static unsigned long backend_shrink_memory_count(struct shrinker *shrinker, argument
289 struct shrinker *backend_memory_shrinker;
306 pr_warn("shrinker allocation failed\n");
/linux-master/fs/erofs/
H A Dutils.c206 static unsigned long erofs_shrink_count(struct shrinker *shrink,
212 static unsigned long erofs_shrink_scan(struct shrinker *shrink,
267 static struct shrinker *erofs_shrinker_info;
271 erofs_shrinker_info = shrinker_alloc(0, "erofs-shrinker");
/linux-master/fs/btrfs/
H A Dcompression.c23 #include <linux/shrinker.h>
174 struct shrinker *shrinker; member in struct:btrfs_compr_pool
181 static unsigned long btrfs_compr_pool_count(struct shrinker *sh, struct shrink_control *sc)
195 static unsigned long btrfs_compr_pool_scan(struct shrinker *sh, struct shrink_control *sc)
1066 compr_pool.shrinker = shrinker_alloc(SHRINKER_NONSLAB, "btrfs-compr-pages");
1067 if (!compr_pool.shrinker)
1080 compr_pool.shrinker->count_objects = btrfs_compr_pool_count;
1081 compr_pool.shrinker->scan_objects = btrfs_compr_pool_scan;
1082 compr_pool.shrinker
[all...]
/linux-master/fs/
H A Dmbcache.c40 struct shrinker *c_shrink;
293 static unsigned long mb_cache_count(struct shrinker *shrink,
332 static unsigned long mb_cache_scan(struct shrinker *shrink,
378 cache->c_shrink = shrinker_alloc(0, "mbcache-shrinker");
405 * (except shrinker) can reach @cache when calling this.

Completed in 288 milliseconds

1234