Home
last modified time | relevance | path

Searched refs:memcg (Results 1 – 25 of 27) sorted by relevance

12

/linux/tools/testing/selftests/cgroup/
H A Dtest_memcontrol.c263 char *memcg; in test_memcg_current_peak()
268 memcg = cg_name(root, "memcg_test"); in test_memcg_current_peak()
269 if (!memcg) in test_memcg_current_peak()
272 if (cg_create(memcg)) in test_memcg_current_peak()
275 current = cg_read_long(memcg, "memory.current"); in test_memcg_current_peak()
279 peak = cg_read_long(memcg, "memory.peak"); in test_memcg_current_peak()
283 if (cg_run(memcg, alloc_anon_50M_check, NULL)) in test_memcg_current_peak()
286 peak = cg_read_long(memcg, "memory.peak"); in test_memcg_current_peak()
295 peak_fd = cg_open(memcg, "memory.peak", O_RDWR | O_APPEND | O_CLOEXEC); in test_memcg_current_peak()
316 peak_fd2 = cg_open(memcg, "memor in test_memcg_current_peak()
248 char *memcg; test_memcg_current_peak() local
703 char *memcg; test_memcg_high() local
766 char *memcg; test_memcg_high_sync() local
828 char *memcg; test_memcg_max() local
886 reclaim_until(const char * memcg,long goal) reclaim_until() argument
922 char *memcg; test_memcg_reclaim() local
1026 char *memcg; test_memcg_swap_max_peak() local
1225 char *memcg; test_memcg_oom_events() local
1386 char *memcg; test_memcg_sock() local
1584 char *memcg; test_memcg_oom_group_score_events() local
[all...]
H A Dmemcg_protection.m5 % This script simulates reclaim protection behavior on a single level of memcg
65 % commit 1bc63fb1272b ("mm, memcg: make scan aggression always exclude protection")
/linux/mm/
H A Dshrinker.c62 static void __free_shrinker_info(struct mem_cgroup *memcg) in __free_shrinker_info() argument
71 pn = memcg->nodeinfo[nid]; in __free_shrinker_info()
79 void free_shrinker_info(struct mem_cgroup *memcg) in free_shrinker_info() argument
82 __free_shrinker_info(memcg); in free_shrinker_info()
86 int alloc_shrinker_info(struct mem_cgroup *memcg) in alloc_shrinker_info() argument
103 rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_info, info); in alloc_shrinker_info()
110 __free_shrinker_info(memcg); in alloc_shrinker_info()
115 static struct shrinker_info *shrinker_info_protected(struct mem_cgroup *memcg, in shrinker_info_protected() argument
118 return rcu_dereference_protected(memcg->nodeinfo[nid]->shrinker_info, in shrinker_info_protected()
122 static int expand_one_shrinker_info(struct mem_cgroup *memcg, int new_size, in expand_one_shrinker_info() argument
[all …]
H A Dshrinker_debug.c19 struct mem_cgroup *memcg, in shrinker_count_objects() argument
30 .memcg = memcg, in shrinker_count_objects()
51 struct mem_cgroup *memcg; in shrinker_debugfs_count_show() local
62 memcg = mem_cgroup_iter(NULL, NULL, NULL); in shrinker_debugfs_count_show()
64 if (memcg && !mem_cgroup_online(memcg)) in shrinker_debugfs_count_show()
68 memcg_aware ? memcg : NULL, in shrinker_debugfs_count_show()
71 seq_printf(m, "%llu", mem_cgroup_id(memcg)); in shrinker_debugfs_count_show()
78 mem_cgroup_iter_break(NULL, memcg); in shrinker_debugfs_count_show()
83 mem_cgroup_iter_break(NULL, memcg); in shrinker_debugfs_count_show()
87 } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL)) != NULL); in shrinker_debugfs_count_show()
[all …]
/linux/mm/damon/
H A Dsysfs-common.c106 static bool damon_sysfs_memcg_path_eq(struct mem_cgroup *memcg, in damon_sysfs_memcg_path_eq() argument
110 cgroup_path(memcg->css.cgroup, memcg_path_buf, PATH_MAX); in damon_sysfs_memcg_path_eq()
119 struct mem_cgroup *memcg; in damon_sysfs_memcg_path_to_id() local
130 for (memcg = mem_cgroup_iter(NULL, NULL, NULL); memcg; in damon_sysfs_memcg_path_to_id()
131 memcg = mem_cgroup_iter(NULL, memcg, NULL)) { in damon_sysfs_memcg_path_to_id()
133 if (!mem_cgroup_online(memcg)) in damon_sysfs_memcg_path_to_id()
135 if (damon_sysfs_memcg_path_eq(memcg, path, memcg_path)) { in damon_sysfs_memcg_path_to_id()
136 *id = mem_cgroup_id(memcg); in damon_sysfs_memcg_path_to_id()
138 mem_cgroup_iter_break(NULL, memcg); in damon_sysfs_memcg_path_to_id()
/linux/tools/cgroup/
H A Dmemcg_slabinfo.py42 memcg = container_of(css, 'struct mem_cgroup', 'css')
43 MEMCGS[css.cgroup.kn.id.value_()] = memcg
170 memcg = MEMCGS[cgroup_id]
186 obj_cgroups.add(memcg.objcg.value_())
188 memcg.objcg_list.address_of_(),
220 memcg.kmem_caches.address_of_(),
/linux/Documentation/admin-guide/cgroup-v1/
H A Dmemcg_test.rst9 Because VM is getting complex (one of reasons is memcg...), memcg's behavior
10 is complex. This is a document for memcg's internal behavior.
61 At commit(), the page is associated with the memcg.
112 But brief explanation of the behavior of memcg around shmem will be
134 Each memcg has its own vector of LRUs (inactive anon, active anon,
136 each LRU handled under a single lru_lock for that memcg and node.
143 9.1 Small limit to memcg.
146 When you do test to do racy case, it's good test to set memcg's limit
156 Historically, memcg's shmem handling was poor and we saw some amount
246 Besides management of swap is one of complicated parts of memcg,
[all …]
/linux/include/linux/sched/
H A Dmm.h476 * set_active_memcg - Starts the remote memcg charging scope.
477 * @memcg: memcg to charge.
479 * This function marks the beginning of the remote memcg charging scope. All the
481 * given memcg.
483 * Please, make sure that caller has a reference to the passed memcg structure,
491 set_active_memcg(struct mem_cgroup *memcg)
497 this_cpu_write(int_active_memcg, memcg); in set_active_memcg()
500 current->active_memcg = memcg; in set_active_memcg()
507 set_active_memcg(struct mem_cgroup *memcg)
492 set_active_memcg(struct mem_cgroup * memcg) set_active_memcg() argument
508 set_active_memcg(struct mem_cgroup * memcg) set_active_memcg() argument
[all...]
/linux/Documentation/translations/zh_CN/mm/
H A Dhwpoison.rst119 corrupt-filter-memcg
120 限制注入到memgroup拥有的页面。由memcg的inode号指定。
130 echo $memcg_ino > /debug/hwpoison/corrupt-filter-memcg
H A Dvmalloced-kernel-stacks.rst87 进行memcg核算。因此,__vmalloc_node_range被调用时没有__GFP_ACCOUNT。
/linux/Documentation/admin-guide/mm/
H A Dshrinker_debugfs.rst14 trigger *count_objects()* and *scan_objects()* callbacks for each memcg and
59 If the shrinker is not memcg-aware or CONFIG_MEMCG is off, 0 is printed
112 For a non-memcg-aware shrinker or on a system with no memory
H A Dmultigen_lru.rst106 accessed over different time intervals for each memcg and node.
111 memcg memcg_id memcg_path
/linux/Documentation/mm/
H A Dmultigen_lru.rst162 An ``mm_struct`` list is maintained for each memcg, and an
163 ``mm_struct`` follows its owner task to the new memcg when this task
173 ``mm_struct`` was migrated, pages left in the previous memcg will be
174 ignored when the current memcg is under reclaim. Similarly, page table
225 An memcg LRU is a per-node LRU of memcgs. It is also an LRU of LRUs,
226 since each node and memcg combination has an LRU of folios (see
229 data centers. Note that memcg LRU only applies to global reclaim.
231 The basic structure of an memcg LRU can be understood by an analogy to
238 3. Other events trigger similar operations, e.g., offlining an memcg
243 1. Sharding, which allows each thread to start at a random memcg (in
H A Dvmalloced-kernel-stacks.rst94 - Allocated stacks are cached and later reused by new threads, so memcg
/linux/kernel/bpf/
H A Dmemalloc.c209 struct mem_cgroup *memcg = NULL, *old_memcg; in alloc_bulk() local
240 memcg = get_memcg(c); in alloc_bulk()
241 old_memcg = set_active_memcg(memcg); in alloc_bulk()
254 mem_cgroup_put(memcg); in alloc_bulk()
988 struct mem_cgroup *memcg, *old_memcg; in bpf_mem_cache_alloc_flags() local
990 memcg = get_memcg(c); in bpf_mem_cache_alloc_flags()
991 old_memcg = set_active_memcg(memcg); in bpf_mem_cache_alloc_flags()
996 mem_cgroup_put(memcg); in bpf_mem_cache_alloc_flags()
H A Dsyscall.c528 struct mem_cgroup *memcg, *old_memcg; in bpf_map_kmalloc_node() local
531 bpf_map_memcg_enter(map, &old_memcg, &memcg); in bpf_map_kmalloc_node()
533 bpf_map_memcg_exit(old_memcg, memcg); in bpf_map_kmalloc_node()
541 struct mem_cgroup *memcg, *old_memcg; in bpf_map_kmalloc_nolock() local
544 bpf_map_memcg_enter(map, &old_memcg, &memcg); in bpf_map_kmalloc_nolock()
546 bpf_map_memcg_exit(old_memcg, memcg); in bpf_map_kmalloc_nolock()
553 struct mem_cgroup *memcg, *old_memcg; in bpf_map_kzalloc() local
556 bpf_map_memcg_enter(map, &old_memcg, &memcg); in bpf_map_kzalloc()
558 bpf_map_memcg_exit(old_memcg, memcg); in bpf_map_kzalloc()
566 struct mem_cgroup *memcg, *old_memcg; in bpf_map_kvcalloc() local
[all …]
/linux/include/linux/
H A Doom.h36 struct mem_cgroup *memcg; member
H A Dshrinker.h55 struct mem_cgroup *memcg; member
/linux/fs/notify/
H A Dgroup.c27 mem_cgroup_put(group->memcg); in fsnotify_final_destroy_group()
/linux/fs/notify/inotify/
H A Dinotify_fsnotify.c95 old_memcg = set_active_memcg(group->memcg); in inotify_handle_inode_event()
H A Dinotify_user.c664 group->memcg = get_mem_cgroup_from_mm(current->mm); in inotify_new_group()
/linux/fs/
H A Dbuffer.c735 struct mem_cgroup *memcg, *old_memcg; in folio_alloc_buffers() local
737 memcg = get_mem_cgroup_from_folio(folio); in folio_alloc_buffers()
738 old_memcg = set_active_memcg(memcg); in folio_alloc_buffers()
758 mem_cgroup_put(memcg); in folio_alloc_buffers()
H A Dsuper.c184 return !sc->memcg || mem_cgroup_is_root(sc->memcg); in super_fs_objects_eligible()
/linux/drivers/tty/
H A Dsysrq.c391 .memcg = NULL, in moom_callback()
/linux/fs/notify/fanotify/
H A Dfanotify.c841 old_memcg = set_active_memcg(group->memcg); in fanotify_alloc_event()

12