/tools/testing/selftests/cgroup/ |
D | test_freezer.c | 29 static int cg_check_frozen(const char *cgroup, bool frozen) in cg_check_frozen() argument 32 if (cg_read_strstr(cgroup, "cgroup.events", "frozen 1") != 0) { in cg_check_frozen() 33 debug("Cgroup %s isn't frozen\n", cgroup); in cg_check_frozen() 40 if (cg_read_strstr(cgroup, "cgroup.events", "frozen 0") != 0) { in cg_check_frozen() 41 debug("Cgroup %s is frozen\n", cgroup); in cg_check_frozen() 52 static int cg_freeze_nowait(const char *cgroup, bool freeze) in cg_freeze_nowait() argument 54 return cg_write(cgroup, "cgroup.freeze", freeze ? "1" : "0"); in cg_freeze_nowait() 60 static int cg_prepare_for_wait(const char *cgroup) in cg_prepare_for_wait() argument 70 ret = inotify_add_watch(fd, cg_control(cgroup, "cgroup.events"), in cg_prepare_for_wait() 116 static int cg_enter_and_wait_for_frozen(const char *cgroup, int pid, in cg_enter_and_wait_for_frozen() argument [all …]
|
D | cgroup_util.h | 22 extern char *cg_control(const char *cgroup, const char *control); 23 extern int cg_create(const char *cgroup); 24 extern int cg_destroy(const char *cgroup); 25 extern int cg_read(const char *cgroup, const char *control, 27 extern int cg_read_strcmp(const char *cgroup, const char *control, 29 extern int cg_read_strstr(const char *cgroup, const char *control, 31 extern long cg_read_long(const char *cgroup, const char *control); 32 long cg_read_key_long(const char *cgroup, const char *control, const char *key); 33 extern long cg_read_lc(const char *cgroup, const char *control); 34 extern int cg_write(const char *cgroup, const char *control, char *buf); [all …]
|
D | cgroup_util.c | 78 char *cg_control(const char *cgroup, const char *control) in cg_control() argument 80 size_t len = strlen(cgroup) + strlen(control) + 2; in cg_control() 83 snprintf(ret, len, "%s/%s", cgroup, control); in cg_control() 88 int cg_read(const char *cgroup, const char *control, char *buf, size_t len) in cg_read() argument 92 snprintf(path, sizeof(path), "%s/%s", cgroup, control); in cg_read() 100 int cg_read_strcmp(const char *cgroup, const char *control, in cg_read_strcmp() argument 117 if (cg_read(cgroup, control, buf, size)) { in cg_read_strcmp() 127 int cg_read_strstr(const char *cgroup, const char *control, const char *needle) in cg_read_strstr() argument 131 if (cg_read(cgroup, control, buf, sizeof(buf))) in cg_read_strstr() 137 long cg_read_long(const char *cgroup, const char *control) in cg_read_long() argument [all …]
|
D | with_stress.sh | 19 echo $verb$subsys_ctrl >$sysfs/cgroup.subtree_control 34 if ! echo +$subsys_ctrl >$sysfs/cgroup.subtree_control ; then 39 if ! echo -$subsys_ctrl >$sysfs/cgroup.subtree_control ; then
|
D | test_memcontrol.c | 89 static int alloc_anon_50M_check(const char *cgroup, void *arg) in alloc_anon_50M_check() argument 100 current = cg_read_long(cgroup, "memory.current"); in alloc_anon_50M_check() 107 anon = cg_read_key_long(cgroup, "memory.stat", "anon "); in alloc_anon_50M_check() 120 static int alloc_pagecache_50M_check(const char *cgroup, void *arg) in alloc_pagecache_50M_check() argument 134 current = cg_read_long(cgroup, "memory.current"); in alloc_pagecache_50M_check() 138 file = cg_read_key_long(cgroup, "memory.stat", "file "); in alloc_pagecache_50M_check() 189 static int alloc_pagecache_50M(const char *cgroup, void *arg) in alloc_pagecache_50M() argument 196 static int alloc_pagecache_50M_noexit(const char *cgroup, void *arg) in alloc_pagecache_50M_noexit() argument 210 static int alloc_anon_noexit(const char *cgroup, void *arg) in alloc_anon_noexit() argument 214 if (alloc_anon(cgroup, arg)) in alloc_anon_noexit() [all …]
|
D | test_kmem.c | 30 static int alloc_dcache(const char *cgroup, void *arg) in alloc_dcache() argument 96 static int alloc_kmem_smp(const char *cgroup, void *arg) in alloc_kmem_smp() argument 126 int (*fn)(const char *cgroup, void *arg), in cg_run_in_subcgroups() argument 242 static int spawn_1000_threads(const char *cgroup, void *arg) in spawn_1000_threads() argument 262 stack = cg_read_key_long(cgroup, "memory.stat", "kernel_stack "); in spawn_1000_threads()
|
/tools/perf/util/ |
D | cgroup.c | 38 static struct cgroup *evlist__find_cgroup(struct evlist *evlist, const char *str) in evlist__find_cgroup() 54 static struct cgroup *cgroup__new(const char *name, bool do_open) in cgroup__new() 56 struct cgroup *cgroup = zalloc(sizeof(*cgroup)); in cgroup__new() local 58 if (cgroup != NULL) { in cgroup__new() 59 refcount_set(&cgroup->refcnt, 1); in cgroup__new() 61 cgroup->name = strdup(name); in cgroup__new() 62 if (!cgroup->name) in cgroup__new() 66 cgroup->fd = open_cgroup(name); in cgroup__new() 67 if (cgroup->fd == -1) in cgroup__new() 70 cgroup->fd = -1; in cgroup__new() [all …]
|
D | cgroup.h | 11 struct cgroup { struct 21 struct cgroup *cgroup__get(struct cgroup *cgroup); argument 22 void cgroup__put(struct cgroup *cgroup); 27 struct cgroup *evlist__findnew_cgroup(struct evlist *evlist, const char *name); 31 void evlist__set_default_cgroup(struct evlist *evlist, struct cgroup *cgroup); 35 struct cgroup *cgroup__findnew(struct perf_env *env, uint64_t id, 37 struct cgroup *cgroup__find(struct perf_env *env, uint64_t id);
|
D | metricgroup.h | 16 struct cgroup; 61 int metricgroup__copy_metric_events(struct evlist *evlist, struct cgroup *cgrp,
|
/tools/bpf/bpftool/Documentation/ |
D | bpftool-cgroup.rst | 2 bpftool-cgroup 13 **bpftool** [*OPTIONS*] **cgroup** *COMMAND* 23 | **bpftool** **cgroup** { **show** | **list** } *CGROUP* [**effective**] 24 | **bpftool** **cgroup tree** [*CGROUP_ROOT*] [**effective**] 25 | **bpftool** **cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*] 26 | **bpftool** **cgroup detach** *CGROUP* *ATTACH_TYPE* *PROG* 27 | **bpftool** **cgroup help** 39 **bpftool cgroup { show | list }** *CGROUP* [**effective**] 40 List all programs attached to the cgroup *CGROUP*. 46 will execute for events within a cgroup. This includes [all …]
|
D | bpftool-prog.rst | 40 | **tracepoint** | **raw_tracepoint** | **xdp** | **perf_event** | **cgroup/skb** | 41 | **cgroup/sock** | **cgroup/dev** | **lwt_in** | **lwt_out** | **lwt_xmit** | 43 | **cgroup/bind4** | **cgroup/bind6** | **cgroup/post_bind4** | **cgroup/post_bind6** | 44 | **cgroup/connect4** | **cgroup/connect6** | **cgroup/getpeername4** | **cgroup/getpeername6** | 45 | **cgroup/getsockname4** | **cgroup/getsockname6** | **cgroup/sendmsg4** | **cgroup/… 46 | **cgroup/recvmsg4** | **cgroup/recvmsg6** | **cgroup/sysctl** | 47 | **cgroup/getsockopt** | **cgroup/setsockopt** | **cgroup/sock_release** |
|
D | bpftool-link.rst | 81 10: cgroup prog 25 90 "type": "cgroup",
|
D | bpftool-net.rst | 40 For programs attached to a particular cgroup, e.g., 43 users can use **bpftool cgroup** to dump cgroup attachments.
|
/tools/testing/selftests/vm/ |
D | write_hugetlb_memory.sh | 9 cgroup=$4 16 echo "Putting task in cgroup '$cgroup'" 17 echo $$ > ${cgroup_path:-/dev/cgroup/memory}/"$cgroup"/cgroup.procs
|
D | hugetlb_reparenting_test.sh | 22 CGROUP_ROOT=/dev/cgroup/memory 26 echo "+hugetlb +memory" >$CGROUP_ROOT/cgroup.subtree_control 28 CGROUP_ROOT=$(mount -t cgroup | grep ",hugetlb" | awk '{print $3}') 30 CGROUP_ROOT=/dev/cgroup/memory 31 mount -t cgroup memory,hugetlb $CGROUP_ROOT 129 echo "+hugetlb +memory" >$CGROUP_ROOT/a/cgroup.subtree_control 147 local cgroup="$1" 152 echo $$ >$CGROUP_ROOT/$cgroup/cgroup.procs 154 echo 0 >$CGROUP_ROOT/$cgroup/cpuset.mems 155 echo 0 >$CGROUP_ROOT/$cgroup/cpuset.cpus [all …]
|
D | charge_reserved_hugetlb.sh | 27 cgroup_path=/dev/cgroup/memory 31 echo "+hugetlb" >$cgroup_path/cgroup.subtree_control 33 cgroup_path=$(mount -t cgroup | grep ",hugetlb" | awk '{print $3}') 35 cgroup_path=/dev/cgroup/memory 36 mount -t cgroup memory,hugetlb $cgroup_path 44 echo $$ >$cgroup_path/cgroup.procs 95 echo writing cgroup limit: "$cgroup_limit" 111 local cgroup="$1" 112 local path="$cgroup_path/$cgroup/hugetlb.${MB}MB.$reservation_usage_file" 122 local cgroup="$1" [all …]
|
/tools/bpf/bpftool/bash-completion/ |
D | bpftool | 470 xdp perf_event cgroup/skb cgroup/sock \ 471 cgroup/dev lwt_in lwt_out lwt_xmit \ 473 lirc_mode2 cgroup/bind4 cgroup/bind6 \ 474 cgroup/connect4 cgroup/connect6 \ 475 cgroup/getpeername4 cgroup/getpeername6 \ 476 cgroup/getsockname4 cgroup/getsockname6 \ 477 cgroup/sendmsg4 cgroup/sendmsg6 \ 478 cgroup/recvmsg4 cgroup/recvmsg6 \ 479 cgroup/post_bind4 cgroup/post_bind6 \ 480 cgroup/sysctl cgroup/getsockopt \ [all …]
|
/tools/lib/api/fs/ |
D | Build | 3 libapi-y += cgroup.o
|
/tools/cgroup/ |
D | memcg_slabinfo.py | 41 name = prefix + '/' + css.cgroup.kn.name.string_().decode('utf-8') 43 MEMCGS[css.cgroup.kn.id.value_()] = memcg 169 cgroup_id = stat(args.cgroup).st_ino
|
/tools/testing/selftests/bpf/prog_tests/ |
D | cgroup_link.c | 226 CHECK(info.cgroup.cgroup_id == 0, "cgroup_id", "unexpected %llu\n", info.cgroup.cgroup_id); in test_cgroup_link() 235 CHECK(info.cgroup.cgroup_id != 0, "cgroup_id", "unexpected %llu\n", info.cgroup.cgroup_id); in test_cgroup_link()
|
/tools/vm/ |
D | page-types.c | 374 uint64_t cgroup, uint64_t mapcnt) in show_page_range() argument 383 if (flags == flags0 && cgroup == cgroup0 && mapcnt == mapcnt0 && in show_page_range() 403 cgroup0 = cgroup; in show_page_range() 416 uint64_t flags, uint64_t cgroup, uint64_t mapcnt) in show_page() argument 423 printf("@%llu\t", (unsigned long long)cgroup); in show_page() 634 uint64_t flags, uint64_t cgroup, uint64_t mapcnt, in add_page() argument 642 if (opt_cgroup && cgroup != (uint64_t)opt_cgroup) in add_page() 654 show_page_range(voffset, offset, 1, flags, cgroup, mapcnt); in add_page() 656 show_page(voffset, offset, flags, cgroup, mapcnt); in add_page() 974 uint64_t cgroup = 0; in walk_file() local [all …]
|
/tools/bpf/bpftool/ |
D | link.c | 144 info->cgroup.cgroup_id); in show_link_close_json() 145 show_link_attach_type_json(info->cgroup.attach_type, json_wtr); in show_link_close_json() 233 printf("\n\tcgroup_id %zu ", (size_t)info->cgroup.cgroup_id); in show_link_close_plain() 234 show_link_attach_type_plain(info->cgroup.attach_type); in show_link_close_plain()
|
/tools/testing/selftests/clone3/ |
D | clone3_selftests.h | 43 __aligned_u64 cgroup; member
|
/tools/include/uapi/linux/ |
D | sched.h | 103 __aligned_u64 cgroup; member
|
/tools/perf/Documentation/ |
D | perf-trace.txt | 72 --cgroup:: 73 Record events in threads in a cgroup. 75 Look for cgroups to set at the /sys/fs/cgroup/perf_event directory, then 76 remove the /sys/fs/cgroup/perf_event/ part and try: 81 _and_ sched:sched_switch to the 'A' cgroup, while: 85 will only set the sched:sched_switch event to the 'A' cgroup, all the 87 a cgroup (on the root cgroup, sys wide, etc). 93 the syscall ones go to the 'A' cgroup, the sched:sched_switch goes 94 to the 'B' cgroup.
|