/Linux-v5.4/kernel/cgroup/ |
D | freezer.c | 14 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 …]
|
D | rstat.c | 9 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() 46 if (cgroup_rstat_cpu(cgrp, cpu)->updated_next) in cgroup_rstat_updated() 52 for (parent = cgroup_parent(cgrp); parent; in cgroup_rstat_updated() 53 cgrp = parent, parent = cgroup_parent(cgrp)) { in cgroup_rstat_updated() 54 struct cgroup_rstat_cpu *rstatc = cgroup_rstat_cpu(cgrp, cpu); in cgroup_rstat_updated() 65 prstatc->updated_children = cgrp; in cgroup_rstat_updated() [all …]
|
D | cgroup.c | 161 struct cgroup_root cgrp_dfl_root = { .cgrp.rstat_cpu = &cgrp_dfl_root_rstat_cpu }; 216 static int cgroup_apply_control(struct cgroup *cgrp); 217 static void cgroup_finalize_control(struct cgroup *cgrp, int ret); 220 static int cgroup_destroy_locked(struct cgroup *cgrp); 221 static struct cgroup_subsys_state *css_create(struct cgroup *cgrp, 226 struct cgroup *cgrp, struct cftype cfts[], 298 bool cgroup_on_dfl(const struct cgroup *cgrp) in cgroup_on_dfl() argument 300 return cgrp->root == &cgrp_dfl_root; in cgroup_on_dfl() 334 static bool cgroup_has_tasks(struct cgroup *cgrp) in cgroup_has_tasks() argument 336 return cgrp->nr_populated_csets; in cgroup_has_tasks() [all …]
|
D | cgroup-internal.h | 28 #define TRACE_CGROUP_PATH(type, cgrp, ...) \ argument 34 cgroup_path(cgrp, trace_cgroup_path, \ 36 trace_cgroup_##type(cgrp, trace_cgroup_path, \ 78 struct cgroup *cgrp; member 168 static inline bool cgroup_is_dead(const struct cgroup *cgrp) in cgroup_is_dead() argument 170 return !(cgrp->self.flags & CSS_ONLINE); in cgroup_is_dead() 173 static inline bool notify_on_release(const struct cgroup *cgrp) in notify_on_release() argument 175 return test_bit(CGRP_NOTIFY_ON_RELEASE, &cgrp->flags); in notify_on_release() 206 bool cgroup_on_dfl(const struct cgroup *cgrp); 207 bool cgroup_is_thread_root(struct cgroup *cgrp); [all …]
|
D | cgroup-v1.c | 200 void cgroup1_pidlist_destroy_all(struct cgroup *cgrp) in cgroup1_pidlist_destroy_all() argument 204 mutex_lock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all() 205 list_for_each_entry_safe(l, tmp_l, &cgrp->pidlists, links) in cgroup1_pidlist_destroy_all() 207 mutex_unlock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all() 210 BUG_ON(!list_empty(&cgrp->pidlists)); in cgroup1_pidlist_destroy_all() 281 static struct cgroup_pidlist *cgroup_pidlist_find(struct cgroup *cgrp, in cgroup_pidlist_find() argument 288 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find() 290 list_for_each_entry(l, &cgrp->pidlists, links) in cgroup_pidlist_find() 302 static struct cgroup_pidlist *cgroup_pidlist_find_create(struct cgroup *cgrp, in cgroup_pidlist_find_create() argument 307 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find_create() [all …]
|
D | debug.c | 101 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()
|
/Linux-v5.4/include/linux/ |
D | cgroup.h | 413 static inline void cgroup_get(struct cgroup *cgrp) in cgroup_get() argument 415 css_get(&cgrp->self); in cgroup_get() 418 static inline bool cgroup_tryget(struct cgroup *cgrp) in cgroup_tryget() argument 420 return css_tryget(&cgrp->self); in cgroup_tryget() 423 static inline void cgroup_put(struct cgroup *cgrp) in cgroup_put() argument 425 css_put(&cgrp->self); in cgroup_put() 546 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument 548 struct cgroup_subsys_state *parent_css = cgrp->self.parent; in cgroup_parent() 564 static inline bool cgroup_is_descendant(struct cgroup *cgrp, in cgroup_is_descendant() argument 567 if (cgrp->root != ancestor->root || cgrp->level < ancestor->level) in cgroup_is_descendant() [all …]
|
D | psi.h | 28 int psi_cgroup_alloc(struct cgroup *cgrp); 29 void psi_cgroup_free(struct cgroup *cgrp); 48 static inline int psi_cgroup_alloc(struct cgroup *cgrp) in psi_cgroup_alloc() argument 52 static inline void psi_cgroup_free(struct cgroup *cgrp) in psi_cgroup_free() argument
|
D | bpf-cgroup.h | 84 int cgroup_bpf_inherit(struct cgroup *cgrp); 85 void cgroup_bpf_offline(struct cgroup *cgrp); 87 int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog, 89 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 91 int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, 95 int cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog, 97 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 99 int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, 339 static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } in cgroup_bpf_inherit() argument 340 static inline void cgroup_bpf_offline(struct cgroup *cgrp) {} in cgroup_bpf_offline() argument
|
/Linux-v5.4/include/trace/events/ |
D | cgroup.h | 56 TP_PROTO(struct cgroup *cgrp, const char *path), 58 TP_ARGS(cgrp, path), 68 __entry->root = cgrp->root->hierarchy_id; 69 __entry->id = cgrp->id; 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 …]
|
/Linux-v5.4/kernel/bpf/ |
D | cgroup.c | 25 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() 38 struct cgroup *cgrp = container_of(work, struct cgroup, in cgroup_bpf_release() local 46 for (type = 0; type < ARRAY_SIZE(cgrp->bpf.progs); type++) { in cgroup_bpf_release() 47 struct list_head *progs = &cgrp->bpf.progs[type]; in cgroup_bpf_release() 61 cgrp->bpf.effective[type], in cgroup_bpf_release() 68 percpu_ref_exit(&cgrp->bpf.refcnt); in cgroup_bpf_release() 69 cgroup_put(cgrp); in cgroup_bpf_release() 79 struct cgroup *cgrp = container_of(ref, struct cgroup, bpf.refcnt); in cgroup_bpf_release_fn() local [all …]
|
/Linux-v5.4/tools/perf/util/ |
D | cgroup.c | 101 if (!counter->cgrp) in evlist__find_cgroup() 103 if (!strcmp(counter->cgrp->name, str)) in evlist__find_cgroup() 104 return cgroup__get(counter->cgrp); in evlist__find_cgroup() 144 struct cgroup *cgrp = evlist__findnew_cgroup(evlist, str); in add_cgroup() local 147 if (!cgrp) in add_cgroup() 160 cgroup__put(cgrp); in add_cgroup() 163 counter->cgrp = cgrp; in add_cgroup() 174 void cgroup__put(struct cgroup *cgrp) in cgroup__put() argument 176 if (cgrp && refcount_dec_and_test(&cgrp->refcnt)) { in cgroup__put() 177 cgroup__delete(cgrp); in cgroup__put() [all …]
|
/Linux-v5.4/net/netfilter/ |
D | xt_cgroup.c | 39 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()
|
/Linux-v5.4/tools/testing/selftests/bpf/ |
D | test_sockmap.c | 1150 static int __test_exec(int cgrp, int test, struct sockmap_options *opt) in __test_exec() argument 1172 err = run_options(opt, cgrp, test); in __test_exec() 1180 static int test_exec(int cgrp, struct sockmap_options *opt) in test_exec() argument 1182 int err = __test_exec(cgrp, SENDMSG, opt); in test_exec() 1187 err = __test_exec(cgrp, SENDPAGE, opt); in test_exec() 1192 static int test_loop(int cgrp) in test_loop() argument 1213 err = test_exec(cgrp, &opt); in test_loop() 1223 static int test_txmsg(int cgrp) in test_txmsg() argument 1232 err = test_loop(cgrp); in test_txmsg() 1238 err = test_loop(cgrp); in test_txmsg() [all …]
|
/Linux-v5.4/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
D | gpfifogk104.c | 44 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 …]
|
D | gk110.c | 33 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,
|
D | gv100.c | 46 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,
|
D | gk104.c | 185 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 …]
|
D | gpfifogv100.c | 169 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_()
|
D | gk104.h | 35 struct list_head cgrp; member 68 void (*cgrp)(struct nvkm_fifo_cgrp *, member
|
D | changk104.h | 13 struct nvkm_fifo_cgrp *cgrp; member
|
D | tu102.c | 49 .cgrp = gv100_fifo_runlist_cgrp,
|
D | gm107.c | 43 .cgrp = gk110_fifo_runlist_cgrp,
|
/Linux-v5.4/Documentation/admin-guide/cgroup-v1/ |
D | cgroups.rst | 548 ``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 …]
|
/Linux-v5.4/kernel/events/ |
D | core.c | 677 if (!event->cgrp) in perf_cgroup_match() 681 if (!cpuctx->cgrp) in perf_cgroup_match() 690 return cgroup_is_descendant(cpuctx->cgrp->css.cgroup, in perf_cgroup_match() 691 event->cgrp->css.cgroup); in perf_cgroup_match() 696 css_put(&event->cgrp->css); in perf_detach_cgroup() 697 event->cgrp = NULL; in perf_detach_cgroup() 702 return event->cgrp != NULL; in is_cgroup_event() 709 t = per_cpu_ptr(event->cgrp->info, event->cpu); in perf_cgroup_event_time() 713 static inline void __update_cgrp_time(struct perf_cgroup *cgrp) in __update_cgrp_time() argument 720 info = this_cpu_ptr(cgrp->info); in __update_cgrp_time() [all …]
|