Home
last modified time | relevance | path

Searched refs:cgroup (Results 1 – 25 of 1327) sorted by relevance

12345678910>>...54

/linux/tools/testing/selftests/cgroup/
A Dtest_freezer.c143 if (!cgroup) in test_cgfreezer_simple()
167 if (cgroup) in test_cgfreezer_simple()
198 cgroup[1] = cg_name(cgroup[0], "B"); in test_cgfreezer_tree()
202 cgroup[2] = cg_name(cgroup[1], "C"); in test_cgfreezer_tree()
206 cgroup[3] = cg_name(cgroup[1], "D"); in test_cgfreezer_tree()
210 cgroup[4] = cg_name(cgroup[0], "E"); in test_cgfreezer_tree()
214 cgroup[5] = cg_name(cgroup[4], "F"); in test_cgfreezer_tree()
218 cgroup[6] = cg_name(cgroup[5], "G"); in test_cgfreezer_tree()
222 cgroup[7] = cg_name(cgroup[6], "H"); in test_cgfreezer_tree()
226 cgroup[8] = cg_name(cgroup[0], "I"); in test_cgfreezer_tree()
[all …]
A Dtest_kill.c64 if (!cgroup) in test_cgkill_simple()
92 if (cgroup) in test_cgkill_simple()
124 cgroup[1] = cg_name(cgroup[0], "B"); in test_cgkill_tree()
128 cgroup[2] = cg_name(cgroup[1], "C"); in test_cgkill_tree()
132 cgroup[3] = cg_name(cgroup[1], "D"); in test_cgkill_tree()
136 cgroup[4] = cg_name(cgroup[0], "E"); in test_cgkill_tree()
140 cgroup[5] = cg_name(cgroup[4], "F"); in test_cgkill_tree()
144 cgroup[6] = cg_name(cgroup[5], "G"); in test_cgkill_tree()
148 cgroup[7] = cg_name(cgroup[6], "H"); in test_cgkill_tree()
152 cgroup[8] = cg_name(cgroup[0], "I"); in test_cgkill_tree()
[all …]
A Dcgroup_util.h23 extern int cg_create(const char *cgroup);
24 extern int cg_destroy(const char *cgroup);
35 extern int cg_run(const char *cgroup,
36 int (*fn)(const char *cgroup, void *arg),
38 extern int cg_enter(const char *cgroup, int pid);
39 extern int cg_enter_current(const char *cgroup);
41 extern int cg_run_nowait(const char *cgroup,
42 int (*fn)(const char *cgroup, void *arg),
46 extern int alloc_anon(const char *cgroup, void *arg);
50 extern int cg_killall(const char *cgroup);
[all …]
A Dcgroup_util.c222 int cg_create(const char *cgroup) in cg_create() argument
224 return mkdir(cgroup, 0755); in cg_create()
252 int cg_killall(const char *cgroup) in cg_killall() argument
280 int cg_destroy(const char *cgroup) in cg_destroy() argument
285 ret = rmdir(cgroup); in cg_destroy()
287 cg_killall(cgroup); in cg_destroy()
316 int cg_run(const char *cgroup, in cg_run() argument
331 exit(fn(cgroup, arg)); in cg_run()
349 .cgroup = cgroup_fd, in clone_into_cgroup()
428 exit(fn(cgroup, arg)); in clone_into_cgroup_run_nowait()
[all …]
/linux/tools/perf/util/
A Dcgroup.c111 struct cgroup *cgroup = zalloc(sizeof(*cgroup)); in cgroup__new() local
117 if (!cgroup->name) in cgroup__new()
125 cgroup->fd = -1; in cgroup__new()
129 return cgroup; in cgroup__new()
134 free(cgroup); in cgroup__new()
140 struct cgroup *cgroup = evlist__find_cgroup(evlist, name); in evlist__findnew_cgroup() local
171 static void cgroup__delete(struct cgroup *cgroup) in cgroup__delete() argument
174 close(cgroup->fd); in cgroup__delete()
176 free(cgroup); in cgroup__delete()
186 struct cgroup *cgroup__get(struct cgroup *cgroup) in cgroup__get() argument
[all …]
A Dcgroup.h12 struct cgroup { struct
23 struct cgroup *cgroup__get(struct cgroup *cgroup); argument
24 void cgroup__put(struct cgroup *cgroup);
29 struct cgroup *evlist__findnew_cgroup(struct evlist *evlist, const char *name);
33 void evlist__set_default_cgroup(struct evlist *evlist, struct cgroup *cgroup);
37 struct cgroup *cgroup__findnew(struct perf_env *env, uint64_t id,
39 struct cgroup *cgroup__find(struct perf_env *env, uint64_t id);
44 int read_cgroup_id(struct cgroup *cgrp);
46 static inline int read_cgroup_id(struct cgroup *cgrp __maybe_unused) in read_cgroup_id()
/linux/include/linux/
A Dcgroup.h100 struct cgroup_subsys_state *cgroup_e_css(struct cgroup *cgroup,
102 struct cgroup_subsys_state *cgroup_get_e_css(struct cgroup *cgroup,
111 int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from);
553 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent()
590 static inline struct cgroup *cgroup_ancestor(struct cgroup *cgrp, in cgroup_ancestor()
705 struct cgroup;
731 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent()
790 struct cgroup *cgrp; in cgroup_account_cputime()
805 struct cgroup *cgrp; in cgroup_account_cputime_field()
838 return skcd->cgroup; in sock_cgroup_ptr()
[all …]
A Dcgroup-defs.h27 struct cgroup;
144 struct cgroup *cgroup; member
219 struct cgroup *dfl_cgrp;
277 struct cgroup *mg_src_cgrp;
278 struct cgroup *mg_dst_cgrp;
337 struct cgroup *updated_children; /* terminated by self cgroup */
338 struct cgroup *updated_next; /* NULL iff not on the list */
360 struct cgroup { struct
452 struct cgroup *dom_cgrp; argument
508 struct cgroup cgrp;
[all …]
/linux/tools/bpf/bpftool/Documentation/
A Dbpftool-cgroup.rst2 bpftool-cgroup
13 **bpftool** [*OPTIONS*] **cgroup** *COMMAND*
28 | **bpftool** **cgroup help**
53 bpftool uses cgroup v2 mountpoint.
68 some bpf program, the program in this cgroup yields to sub-cgroup
71 cgroup.
131 | **# mkdir /sys/fs/cgroup/test.slice**
133 | **# bpftool cgroup attach /sys/fs/cgroup/test.slice/ device id 1 allow_multi**
135 **# bpftool cgroup list /sys/fs/cgroup/test.slice/**
143 | **# bpftool cgroup detach /sys/fs/cgroup/test.slice/ device id 1**
[all …]
/linux/Documentation/admin-guide/cgroup-v1/
A Dcgroups.rst218 cgroup hierarchy, or to unbind a subsystem from an active cgroup
250 cgroup dir.
291 some other cgroup) and the last child cgroup of that cgroup
306 flag is enabled (1) in a cgroup, a new cpuset cgroup will copy its
317 3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
322 /sys/fs/cgroup/cpuset tasks file for that cgroup.
331 mount -t cgroup cpuset -ocpuset /sys/fs/cgroup/cpuset
354 # mount -t cgroup xxx /sys/fs/cgroup
375 # mount -t cgroup -o cpuset,memory hier1 /sys/fs/cgroup/rg1
406 If you want to create a new cgroup under /sys/fs/cgroup/rg1::
[all …]
A Dpids.rst14 the number of tasks in a cgroup.
46 # mkdir -p /sys/fs/cgroup/pids
47 # mount -t cgroup -o pids none /sys/fs/cgroup/pids
51 # mkdir -p /sys/fs/cgroup/pids/parent/child
52 # echo 2 > /sys/fs/cgroup/pids/parent/pids.max
53 # echo $$ > /sys/fs/cgroup/pids/parent/cgroup.procs
54 # cat /sys/fs/cgroup/pids/parent/pids.current
61 # cat /sys/fs/cgroup/pids/parent/pids.current
71 # echo $$ > /sys/fs/cgroup/pids/parent/child/cgroup.procs
72 # cat /sys/fs/cgroup/pids/parent/pids.current
[all …]
A Dfreezer-subsystem.rst5 The cgroup freezer is useful to batch job management system which start
56 The cgroup freezer is hierarchical. Freezing a cgroup freezes all
85 the cgroup also leave the freezing state.
102 # mkdir /sys/fs/cgroup/freezer
103 # mount -t cgroup -ofreezer freezer /sys/fs/cgroup/freezer
104 # mkdir /sys/fs/cgroup/freezer/0
105 # echo $some_pid > /sys/fs/cgroup/freezer/0/tasks
109 # cat /sys/fs/cgroup/freezer/0/freezer.state
115 # cat /sys/fs/cgroup/freezer/0/freezer.state
117 # cat /sys/fs/cgroup/freezer/0/freezer.state
[all …]
A Drdma.rst23 cgroup.
40 RDMA cgroup allows limit configuration of resources. Rdma cgroup maintains
41 resource accounting per cgroup, per device using resource pool structure.
43 by rdma cgroup, which can be extended later if required.
45 This resource pool object is linked to the cgroup css. Typically there
48 single cgroup may not be handled optimally, however there is no
64 a process from previously charged cgroup which is migrated to new cgroup,
69 of interest for the cgroup.
99 echo ocrdma1 hca_handle=3 > /sys/fs/cgroup/rdma/2/rdma.max
103 cat /sys/fs/cgroup/rdma/2/rdma.max
[all …]
A Dnet_cls.rst2 Network classifier cgroup
5 The Network classifier cgroup provides an interface to
23 mkdir /sys/fs/cgroup/net_cls
24 mount -t cgroup -onet_cls net_cls /sys/fs/cgroup/net_cls
25 mkdir /sys/fs/cgroup/net_cls/0
26 echo 0x100001 > /sys/fs/cgroup/net_cls/0/net_cls.classid
30 cat /sys/fs/cgroup/net_cls/0/net_cls.classid
40 tc filter add dev eth0 parent 10: protocol ip prio 10 handle 1: cgroup
44 iptables -A OUTPUT -m cgroup ! --cgroup 0x100001 -j DROP
A Dmemcg_test.rst229 /opt/cgroup/01/child_c
241 # mount -t cgroup none /cgroup -o cpuset,memory,cpu,devices
256 # mount -t cgroup none /cgroup -o memory
257 # mkdir /cgroup/test
265 # move all tasks in /cgroup/test to /cgroup
267 # rmdir /cgroup/test
305 #mkdir /cgroup/A
306 #echo $$ >/cgroup/A/tasks
312 #mkdir /cgroup/B
330 # mkdir /cgroup/A
[all …]
A Dcpuacct.rst12 Accounting groups can be created by first mounting the cgroup filesystem::
14 # mount -t cgroup -ocpuacct none /sys/fs/cgroup
17 visible at /sys/fs/cgroup. At bootup, this group includes all the tasks in
18 the system. /sys/fs/cgroup/tasks lists the tasks in this cgroup.
19 /sys/fs/cgroup/cpuacct.usage gives the CPU time (in nanoseconds) obtained
23 New accounting groups can be created under the parent group /sys/fs/cgroup::
25 # cd /sys/fs/cgroup
32 /sys/fs/cgroup/cpuacct.usage also.
35 CPU time obtained by the cgroup into user and system times. Currently
38 user: Time spent by tasks of the cgroup in user mode.
[all …]
A Dnet_prio.rst2 Network priority cgroup
5 The Network priority cgroup provides an interface to allow an administrator to
16 This cgroup allows an administrator to assign a process to a group which defines
18 be created by first mounting the cgroup filesystem::
20 # mount -t cgroup -onet_prio none /sys/fs/cgroup/net_prio
23 becomes visible at '/sys/fs/cgroup/net_prio'. This group includes all tasks in
24 the system. '/sys/fs/cgroup/net_prio/tasks' lists the tasks in this cgroup.
26 Each net_prio cgroup contains two files that are subsystem specific
31 cgroup.
52 One usage for the net_prio cgroup is with mqprio qdisc allowing application
[all …]
/linux/kernel/cgroup/
A D.built-in.a.cmd1cgroup/built-in.a := echo >/dev/null; rm -f kernel/cgroup/built-in.a; /usr/bin/ccache /home/test/w…
A Dcgroup-internal.h97 struct cgroup *cgrp;
225 bool cgroup_on_dfl(const struct cgroup *cgrp);
226 bool cgroup_is_thread_root(struct cgroup *cgrp);
227 bool cgroup_is_threaded(struct cgroup *cgrp);
243 int cgroup_migrate_vet_dst(struct cgroup *dst_cgrp);
266 int __cgroup_task_count(const struct cgroup *cgrp);
267 int cgroup_task_count(const struct cgroup *cgrp);
272 int cgroup_rstat_init(struct cgroup *cgrp);
273 void cgroup_rstat_exit(struct cgroup *cgrp);
291 void cgroup1_pidlist_destroy_all(struct cgroup *cgrp);
[all …]
A Drstat.c46 struct cgroup *parent = cgroup_parent(cgrp); in cgroup_rstat_updated()
87 static struct cgroup *cgroup_rstat_cpu_pop_updated(struct cgroup *pos, in cgroup_rstat_cpu_pop_updated()
88 struct cgroup *root, int cpu) in cgroup_rstat_cpu_pop_updated()
119 struct cgroup *parent = cgroup_parent(pos); in cgroup_rstat_cpu_pop_updated()
123 struct cgroup **nextp; in cgroup_rstat_cpu_pop_updated()
158 struct cgroup *pos = NULL; in cgroup_rstat_flush_locked()
198 void cgroup_rstat_flush(struct cgroup *cgrp) in cgroup_rstat_flush()
248 int cgroup_rstat_init(struct cgroup *cgrp) in cgroup_rstat_init()
270 void cgroup_rstat_exit(struct cgroup *cgrp) in cgroup_rstat_exit()
320 struct cgroup *parent = cgroup_parent(cgrp); in cgroup_base_stat_flush()
[all …]
A Dcgroup.c1671 struct cgroup *cgrp = css->cgroup; in css_clear_dir()
1700 struct cgroup *cgrp = css->cgroup; in css_populate_dir()
3086 struct cgroup *cgrp = css->cgroup; in css_visible()
3566 struct cgroup *cgroup = seq_css(seq)->cgroup; in cgroup_stat_show() local
4088 struct cgroup *cgrp = css->cgroup; in cgroup_apply_cftypes()
5104 struct cgroup *cgrp = css->cgroup; in css_free_rwork_fn()
5153 struct cgroup *cgrp = css->cgroup; in css_release_work_fn()
5457 struct cgroup *cgroup; in cgroup_check_hierarchy_limits() local
5463 for (cgroup = parent; cgroup; cgroup = cgroup_parent(cgroup)) { in cgroup_check_hierarchy_limits()
6641 struct cgroup *cgroup; in cgroup_sk_alloc() local
[all …]
/linux/include/trace/events/
A Dcgroup.h3 #define TRACE_SYSTEM cgroup
54 DECLARE_EVENT_CLASS(cgroup,
56 TP_PROTO(struct cgroup *cgrp, const char *path),
78 DEFINE_EVENT(cgroup, cgroup_mkdir,
80 TP_PROTO(struct cgroup *cgrp, const char *path),
85 DEFINE_EVENT(cgroup, cgroup_rmdir,
87 TP_PROTO(struct cgroup *cgrp, const char *path),
92 DEFINE_EVENT(cgroup, cgroup_release,
99 DEFINE_EVENT(cgroup, cgroup_rename,
106 DEFINE_EVENT(cgroup, cgroup_freeze,
[all …]
/linux/Documentation/admin-guide/
A Dcgroup-v2.rst106 What is cgroup?
251 0::/test-cgroup/test-cgroup-nested
258 0::/test-cgroup/test-cgroup-nested (deleted)
789 All cgroup core files are prefixed with "cgroup."
791 cgroup.type
1218 (if the memory cgroup is not a leaf cgroup) are killed
1593 cgroup.
1648 cgroup.
2436 /batchjobs/container_id1 cgroup calls unshare, cgroup
2454 cgroup paths (in /proc/self/cgroup) only inside their root cgroup.
[all …]
/linux/tools/testing/selftests/vm/
A Dcharge_reserved_hugetlb.sh27 cgroup_path=/dev/cgroup/memory
33 mount -t cgroup memory,hugetlb $cgroup_path
38 echo "+hugetlb" >/dev/cgroup/memory/cgroup.subtree_control
43 echo $$ >$cgroup_path/cgroup.procs
94 echo writing cgroup limit: "$cgroup_limit"
110 local cgroup="$1"
121 local cgroup="$1"
134 local cgroup="$1"
147 local cgroup="$1"
248 local cgroup="$1"
[all …]
/linux/kernel/bpf/
A Dcgroup.c100 link->cgroup = NULL; in bpf_cgroup_link_auto_detach()
110 struct cgroup *p, *cgrp = container_of(work, struct cgroup, in cgroup_bpf_release()
160 struct cgroup *cgrp = container_of(ref, struct cgroup, bpf.refcnt); in cgroup_bpf_release_fn()
201 struct cgroup *p; in hierarchy_allows_attach()
294 struct cgroup *p; in cgroup_bpf_inherit()
338 struct cgroup *desc = container_of(css, struct cgroup, self); in update_effective_progs()
350 struct cgroup *desc = container_of(css, struct cgroup, self); in update_effective_progs()
371 struct cgroup *desc = container_of(css, struct cgroup, self); in update_effective_progs()
552 struct cgroup *cg; in replace_effective_prog()
556 struct cgroup *desc = container_of(css, struct cgroup, self); in replace_effective_prog()
[all …]

Completed in 73 milliseconds

12345678910>>...54