Home
last modified time | relevance | path

Searched refs:cgrp (Results 1 – 25 of 46) sorted by relevance

12

/kernel/linux/linux-5.10/kernel/cgroup/
Dfreezer.c14 static void cgroup_propagate_frozen(struct cgroup *cgrp, bool frozen) in cgroup_propagate_frozen() argument
24 while ((cgrp = cgroup_parent(cgrp))) { in cgroup_propagate_frozen()
26 cgrp->freezer.nr_frozen_descendants += desc; in cgroup_propagate_frozen()
27 if (!test_bit(CGRP_FROZEN, &cgrp->flags) && in cgroup_propagate_frozen()
28 test_bit(CGRP_FREEZE, &cgrp->flags) && in cgroup_propagate_frozen()
29 cgrp->freezer.nr_frozen_descendants == in cgroup_propagate_frozen()
30 cgrp->nr_descendants) { in cgroup_propagate_frozen()
31 set_bit(CGRP_FROZEN, &cgrp->flags); in cgroup_propagate_frozen()
32 cgroup_file_notify(&cgrp->events_file); in cgroup_propagate_frozen()
33 TRACE_CGROUP_PATH(notify_frozen, cgrp, 1); in cgroup_propagate_frozen()
[all …]
Drstat.c9 static void cgroup_base_stat_flush(struct cgroup *cgrp, int cpu);
11 static struct cgroup_rstat_cpu *cgroup_rstat_cpu(struct cgroup *cgrp, int cpu) in cgroup_rstat_cpu() argument
13 return per_cpu_ptr(cgrp->rstat_cpu, cpu); in cgroup_rstat_cpu()
25 void cgroup_rstat_updated(struct cgroup *cgrp, int cpu) in cgroup_rstat_updated() argument
32 if (!cgroup_parent(cgrp)) in cgroup_rstat_updated()
43 if (cgroup_rstat_cpu(cgrp, cpu)->updated_next) in cgroup_rstat_updated()
49 for (parent = cgroup_parent(cgrp); parent; in cgroup_rstat_updated()
50 cgrp = parent, parent = cgroup_parent(cgrp)) { in cgroup_rstat_updated()
51 struct cgroup_rstat_cpu *rstatc = cgroup_rstat_cpu(cgrp, cpu); in cgroup_rstat_updated()
62 prstatc->updated_children = cgrp; in cgroup_rstat_updated()
[all …]
Dcgroup.c158 struct cgroup_root cgrp_dfl_root = { .cgrp.rstat_cpu = &cgrp_dfl_root_rstat_cpu };
213 static int cgroup_apply_control(struct cgroup *cgrp);
214 static void cgroup_finalize_control(struct cgroup *cgrp, int ret);
217 static int cgroup_destroy_locked(struct cgroup *cgrp);
218 static struct cgroup_subsys_state *css_create(struct cgroup *cgrp,
223 struct cgroup *cgrp, struct cftype cfts[],
292 bool cgroup_on_dfl(const struct cgroup *cgrp) in cgroup_on_dfl() argument
294 return cgrp->root == &cgrp_dfl_root; in cgroup_on_dfl()
328 static bool cgroup_has_tasks(struct cgroup *cgrp) in cgroup_has_tasks() argument
330 return cgrp->nr_populated_csets; in cgroup_has_tasks()
[all …]
Dcgroup-internal.h28 #define TRACE_CGROUP_PATH(type, cgrp, ...) \ argument
34 cgroup_path(cgrp, trace_cgroup_path, \
36 trace_cgroup_##type(cgrp, trace_cgroup_path, \
97 struct cgroup *cgrp; member
186 static inline bool cgroup_is_dead(const struct cgroup *cgrp) in cgroup_is_dead() argument
188 return !(cgrp->self.flags & CSS_ONLINE); in cgroup_is_dead()
191 static inline bool notify_on_release(const struct cgroup *cgrp) in notify_on_release() argument
193 return test_bit(CGRP_NOTIFY_ON_RELEASE, &cgrp->flags); in notify_on_release()
224 bool cgroup_on_dfl(const struct cgroup *cgrp);
225 bool cgroup_is_thread_root(struct cgroup *cgrp);
[all …]
Dcgroup-v1.c197 void cgroup1_pidlist_destroy_all(struct cgroup *cgrp) in cgroup1_pidlist_destroy_all() argument
201 mutex_lock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all()
202 list_for_each_entry_safe(l, tmp_l, &cgrp->pidlists, links) in cgroup1_pidlist_destroy_all()
204 mutex_unlock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all()
207 BUG_ON(!list_empty(&cgrp->pidlists)); in cgroup1_pidlist_destroy_all()
278 static struct cgroup_pidlist *cgroup_pidlist_find(struct cgroup *cgrp, in cgroup_pidlist_find() argument
285 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find()
287 list_for_each_entry(l, &cgrp->pidlists, links) in cgroup_pidlist_find()
299 static struct cgroup_pidlist *cgroup_pidlist_find_create(struct cgroup *cgrp, in cgroup_pidlist_find_create() argument
304 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find_create()
[all …]
Ddebug.c101 struct cgroup *c = link->cgrp; in current_css_set_cg_links_read()
206 struct cgroup *cgrp; in cgroup_subsys_states_read() local
212 cgrp = cgroup_kn_lock_live(of->kn, false); in cgroup_subsys_states_read()
213 if (!cgrp) in cgroup_subsys_states_read()
217 css = rcu_dereference_check(cgrp->subsys[ss->id], true); in cgroup_subsys_states_read()
258 struct cgroup *cgrp; in cgroup_masks_read() local
260 cgrp = cgroup_kn_lock_live(of->kn, false); in cgroup_masks_read()
261 if (!cgrp) in cgroup_masks_read()
264 cgroup_masks_read_one(seq, "subtree_control", cgrp->subtree_control); in cgroup_masks_read()
265 cgroup_masks_read_one(seq, "subtree_ss_mask", cgrp->subtree_ss_mask); in cgroup_masks_read()
/kernel/linux/linux-5.10/tools/perf/util/
Dcgroup.c45 if (!counter->cgrp) in evlist__find_cgroup()
47 if (!strcmp(counter->cgrp->name, str)) in evlist__find_cgroup()
48 return cgroup__get(counter->cgrp); in evlist__find_cgroup()
93 struct cgroup *cgrp = evlist__findnew_cgroup(evlist, str); in add_cgroup() local
96 if (!cgrp) in add_cgroup()
109 cgroup__put(cgrp); in add_cgroup()
112 counter->cgrp = cgrp; in add_cgroup()
124 void cgroup__put(struct cgroup *cgrp) in cgroup__put() argument
126 if (cgrp && refcount_dec_and_test(&cgrp->refcnt)) { in cgroup__put()
127 cgroup__delete(cgrp); in cgroup__put()
[all …]
Dmetricgroup.h61 int metricgroup__copy_metric_events(struct evlist *evlist, struct cgroup *cgrp,
/kernel/linux/linux-5.10/include/linux/
Dcgroup.h311 static inline u64 cgroup_id(struct cgroup *cgrp) in cgroup_id() argument
313 return cgrp->kn->id; in cgroup_id()
421 static inline void cgroup_get(struct cgroup *cgrp) in cgroup_get() argument
423 css_get(&cgrp->self); in cgroup_get()
426 static inline bool cgroup_tryget(struct cgroup *cgrp) in cgroup_tryget() argument
428 return css_tryget(&cgrp->self); in cgroup_tryget()
431 static inline void cgroup_put(struct cgroup *cgrp) in cgroup_put() argument
433 css_put(&cgrp->self); in cgroup_put()
554 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument
556 struct cgroup_subsys_state *parent_css = cgrp->self.parent; in cgroup_parent()
[all …]
Dpsi.h30 int psi_cgroup_alloc(struct cgroup *cgrp);
31 void psi_cgroup_free(struct cgroup *cgrp);
50 static inline int psi_cgroup_alloc(struct cgroup *cgrp) in psi_cgroup_alloc() argument
54 static inline void psi_cgroup_free(struct cgroup *cgrp) in psi_cgroup_free() argument
Dbpf-cgroup.h93 int cgroup_bpf_inherit(struct cgroup *cgrp);
94 void cgroup_bpf_offline(struct cgroup *cgrp);
96 int __cgroup_bpf_attach(struct cgroup *cgrp,
100 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
103 int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
107 int cgroup_bpf_attach(struct cgroup *cgrp,
111 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
113 int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
391 static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } in cgroup_bpf_inherit() argument
392 static inline void cgroup_bpf_offline(struct cgroup *cgrp) {} in cgroup_bpf_offline() argument
/kernel/linux/linux-5.10/include/trace/events/
Dcgroup.h56 TP_PROTO(struct cgroup *cgrp, const char *path),
58 TP_ARGS(cgrp, path),
68 __entry->root = cgrp->root->hierarchy_id;
69 __entry->id = cgroup_id(cgrp);
70 __entry->level = cgrp->level;
80 TP_PROTO(struct cgroup *cgrp, const char *path),
82 TP_ARGS(cgrp, path)
87 TP_PROTO(struct cgroup *cgrp, const char *path),
89 TP_ARGS(cgrp, path)
94 TP_PROTO(struct cgroup *cgrp, const char *path),
[all …]
/kernel/linux/linux-5.10/kernel/bpf/
Dcgroup.c25 void cgroup_bpf_offline(struct cgroup *cgrp) in cgroup_bpf_offline() argument
27 cgroup_get(cgrp); in cgroup_bpf_offline()
28 percpu_ref_kill(&cgrp->bpf.refcnt); in cgroup_bpf_offline()
43 struct cgroup *cgrp) in bpf_cgroup_storages_alloc() argument
49 key.cgroup_inode_id = cgroup_id(cgrp); in bpf_cgroup_storages_alloc()
83 struct cgroup *cgrp, in bpf_cgroup_storages_link() argument
89 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); in bpf_cgroup_storages_link()
110 struct cgroup *p, *cgrp = container_of(work, struct cgroup, in cgroup_bpf_release() local
113 struct list_head *storages = &cgrp->bpf.storages; in cgroup_bpf_release()
120 for (type = 0; type < ARRAY_SIZE(cgrp->bpf.progs); type++) { in cgroup_bpf_release()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
Dtest_sockmap.c1332 static int __test_exec(int cgrp, int test, struct sockmap_options *opt) in __test_exec() argument
1356 err = run_options(opt, cgrp, test); in __test_exec()
1365 static void test_exec(int cgrp, struct sockmap_options *opt) in test_exec() argument
1372 err = __test_exec(cgrp, SENDMSG, opt); in test_exec()
1377 err = __test_exec(cgrp, SENDPAGE, opt); in test_exec()
1383 static void test_send_one(struct sockmap_options *opt, int cgrp) in test_send_one() argument
1388 test_exec(cgrp, opt); in test_send_one()
1393 test_exec(cgrp, opt); in test_send_one()
1398 test_exec(cgrp, opt); in test_send_one()
1402 static void test_send_many(struct sockmap_options *opt, int cgrp) in test_send_many() argument
[all …]
/kernel/linux/linux-5.10/net/netfilter/
Dxt_cgroup.c39 struct cgroup *cgrp; in cgroup_mt_check_v1() local
56 cgrp = cgroup_get_from_path(info->path); in cgroup_mt_check_v1()
57 if (IS_ERR(cgrp)) { in cgroup_mt_check_v1()
59 PTR_ERR(cgrp)); in cgroup_mt_check_v1()
62 info->priv = cgrp; in cgroup_mt_check_v1()
71 struct cgroup *cgrp; in cgroup_mt_check_v2() local
88 cgrp = cgroup_get_from_path(info->path); in cgroup_mt_check_v2()
89 if (IS_ERR(cgrp)) { in cgroup_mt_check_v2()
91 PTR_ERR(cgrp)); in cgroup_mt_check_v2()
94 info->priv = cgrp; in cgroup_mt_check_v2()
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
Dgpfifogk104.c44 struct nvkm_fifo_cgrp *cgrp = chan->cgrp; in gk104_fifo_gpfifo_kick_locked() local
47 if (cgrp) in gk104_fifo_gpfifo_kick_locked()
48 nvkm_wr32(device, 0x002634, cgrp->id | 0x01000000); in gk104_fifo_gpfifo_kick_locked()
56 cgrp ? "tsg" : "channel", in gk104_fifo_gpfifo_kick_locked()
57 cgrp ? cgrp->id : chan->base.chid, client->name); in gk104_fifo_gpfifo_kick_locked()
226 kfree(chan->cgrp); in gk104_fifo_gpfifo_dtor()
289 if (!(chan->cgrp = kmalloc(sizeof(*chan->cgrp), GFP_KERNEL))) in gk104_fifo_gpfifo_new_()
291 chan->cgrp->id = chan->base.chid; in gk104_fifo_gpfifo_new_()
292 INIT_LIST_HEAD(&chan->cgrp->head); in gk104_fifo_gpfifo_new_()
293 INIT_LIST_HEAD(&chan->cgrp->chan); in gk104_fifo_gpfifo_new_()
[all …]
Dgk110.c33 gk110_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *cgrp, in gk110_fifo_runlist_cgrp() argument
36 nvkm_wo32(memory, offset + 0, (cgrp->chan_nr << 26) | (128 << 18) | in gk110_fifo_runlist_cgrp()
37 (3 << 14) | 0x00002000 | cgrp->id); in gk110_fifo_runlist_cgrp()
44 .cgrp = gk110_fifo_runlist_cgrp,
Dgv100.c46 gv100_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *cgrp, in gv100_fifo_runlist_cgrp() argument
50 nvkm_wo32(memory, offset + 0x4, cgrp->chan_nr); in gv100_fifo_runlist_cgrp()
51 nvkm_wo32(memory, offset + 0x8, cgrp->id); in gv100_fifo_runlist_cgrp()
58 .cgrp = gv100_fifo_runlist_cgrp,
Dgk104.c185 struct nvkm_fifo_cgrp *cgrp; in gk104_fifo_runlist_update() local
197 list_for_each_entry(cgrp, &fifo->runlist[runl].cgrp, head) { in gk104_fifo_runlist_update()
198 func->cgrp(cgrp, mem, nr++ * func->size); in gk104_fifo_runlist_update()
199 list_for_each_entry(chan, &cgrp->chan, head) { in gk104_fifo_runlist_update()
212 struct nvkm_fifo_cgrp *cgrp = chan->cgrp; in gk104_fifo_runlist_remove() local
216 if (cgrp && !--cgrp->chan_nr) in gk104_fifo_runlist_remove()
217 list_del_init(&cgrp->head); in gk104_fifo_runlist_remove()
225 struct nvkm_fifo_cgrp *cgrp = chan->cgrp; in gk104_fifo_runlist_insert() local
227 if (cgrp) { in gk104_fifo_runlist_insert()
228 if (!cgrp->chan_nr++) in gk104_fifo_runlist_insert()
[all …]
Dgpfifogv100.c169 if (!(chan->cgrp = kmalloc(sizeof(*chan->cgrp), GFP_KERNEL))) in gv100_fifo_gpfifo_new_()
171 chan->cgrp->id = chan->base.chid; in gv100_fifo_gpfifo_new_()
172 INIT_LIST_HEAD(&chan->cgrp->head); in gv100_fifo_gpfifo_new_()
173 INIT_LIST_HEAD(&chan->cgrp->chan); in gv100_fifo_gpfifo_new_()
174 chan->cgrp->chan_nr = 0; in gv100_fifo_gpfifo_new_()
Dgk104.h35 struct list_head cgrp; member
68 void (*cgrp)(struct nvkm_fifo_cgrp *, member
/kernel/linux/linux-5.10/kernel/events/
Dcore.c702 if (!event->cgrp) in perf_cgroup_match()
706 if (!cpuctx->cgrp) in perf_cgroup_match()
715 return cgroup_is_descendant(cpuctx->cgrp->css.cgroup, in perf_cgroup_match()
716 event->cgrp->css.cgroup); in perf_cgroup_match()
721 css_put(&event->cgrp->css); in perf_detach_cgroup()
722 event->cgrp = NULL; in perf_detach_cgroup()
727 return event->cgrp != NULL; in is_cgroup_event()
734 t = per_cpu_ptr(event->cgrp->info, event->cpu); in perf_cgroup_event_time()
742 t = per_cpu_ptr(event->cgrp->info, event->cpu); in perf_cgroup_event_time_now()
762 struct perf_cgroup *cgrp = cpuctx->cgrp; in update_cgrp_time_from_cpuctx() local
[all …]
/kernel/linux/linux-5.10/tools/perf/tests/
Dexpand-cgroup.c70 if (strcmp(evsel->cgrp->name, cgrp_name[i / nr_events])) { in test_expand_events()
73 i, evsel->cgrp->name, cgrp_name[i / nr_events]); in test_expand_events()
/kernel/linux/linux-5.10/Documentation/bpf/
Dmap_cgroup_storage.rst80 __u32 map_lookup(struct bpf_map *map, __u64 cgrp, enum bpf_attach_type type)
83 .cgroup_inode_id = cgrp,
115 __u32 map_lookup(struct bpf_map *map, __u64 cgrp, enum bpf_attach_type type)
118 bpf_map_lookup_elem(bpf_map__fd(map), &cgrp, &value);
/kernel/linux/linux-5.10/Documentation/admin-guide/cgroup-v1/
Dcgroups.rst548 ``struct cgroup_subsys_state *css_alloc(struct cgroup *cgrp)``
563 ``int css_online(struct cgroup *cgrp)``
566 Called after @cgrp successfully completed all allocations and made
573 ``void css_offline(struct cgroup *cgrp);``
577 has succeeded on @cgrp. This signifies the beginning of the end of
578 @cgrp. @cgrp is being removed and the subsystem should start dropping
579 all references it's holding on @cgrp. When all references are dropped,
581 callback, @cgrp should be considered dead to the subsystem.
583 ``void css_free(struct cgroup *cgrp)``
586 The cgroup system is about to free @cgrp; the subsystem should free
[all …]

12